Backgammon

Eight tables games from one plugin: Backgammon, Nackgammon, Hypergammon, Acey-Deucey, Fevga, Nardi, Plakoto and Chouette. No variant has code of its own; each is the handful of keys below.

Embed via iframe

Select the family and variant through the URL, as every family does.

<iframe
  src="https://engine.moddable.games/play/?embed=1&family=backgammon&variant=standard"
  style="width:100%;max-width:560px;aspect-ratio:1/1;border:none"
  title="Play Backgammon"
></iframe>

Variant keys

Keys go in the variant's engine.plugins.backgammon block.

KeyMeaning
movementopposite or same: which way the two sides travel
startThe track index of each side's starting point
contacthit, pin or block: what landing on a lone opposing checker does
doublingCube, cubeOwnerOffer, take or drop a doubled stake; who holds the cube at the start
gammons, backgammonsDouble and triple stakes for a heavier loss
aceyDeuceyA 1-2 is played, then a doublet of the player's choosing, then another roll
headLimit, headDoublesCheckers that may leave the starting point in one turn, and the opening doublets that may take one more
primeLimitNo block this long with no opposing checker ahead of it
firstPastNo second checker leaves the start until one has passed the opponent's
pinStartWinsPinning the opponent's last checker on its own start wins at once
openingRollEach side rolls one die and the higher plays both
gamesA session of games: the box against a rotating team (Chouette)

Dice and moves

A turn begins with a { action: 'roll' } move, drawn from the game's seeded generator, so a game replays from its seed. A roll that names its dice ({ action: 'roll', dice: [3, 5] }) is played as that fall. Each checker move uses one die, { from, to, die }, and the turn continues until the dice are spent.

chanceOutcomes lists every fall of the dice with its probability, which is how a search weighs a roll instead of the one it got.

AI

The AI chooses whole plays of the dice. Easy and medium judge the position after each play; hard and expert also weigh the best few plays over every one of the opponent's 21 rolls.