Everything from the opening roll to the bear-off, plus the strategy that separates luck from skill
Backgammon is a race between two players, each with 15 checkers, moving in opposite directions around a board of 24 triangular points. On PlayVersusAI you play white, moving from point 24 down toward point 1; your home board is points 1-6. Your opponent moves the other way, toward their home on points 19-24.
To start, each side rolls one die and the higher roll moves first using both opening dice. On every turn you roll two dice and move checkers forward by those amounts - one checker twice or two checkers once each. Doubles are moved four times. You must use both dice if any legal way exists; if only one can be played and either die would be legal on its own, you must play the higher one.
A point occupied by two or more enemy checkers is closed to you. A point with exactly one enemy checker is a blot: land on it and that checker is hit, going to the bar in the middle of the board. A player with checkers on the bar must re-enter them in the opponent's home board - rolling a number whose entry point is open - before making any other move. If no entry point is open, the whole turn is forfeited.
Once all 15 of your checkers are in your home board you may bear off: a roll of 3 bears off a checker from point 3, and so on. A larger roll may bear off from your highest occupied point only when no checker sits above it. The first player to bear off all 15 wins; if the loser has borne off none, the win is a gammon. This version is played without a doubling cube - every game is played to completion.
The opening (rolls 1-6). The early game is about claiming key points, not racing. The best opening plays make points - especially your 5-point (the "golden point") - or bring builders down from the 24- and 13-point stacks into positions where the next roll can make points. Splitting your back checkers to the opponent's 4- or 5-point gives them somewhere useful to anchor.
The middle game. Games take one of a few shapes. In a racing game, both sides break contact and it becomes a pure pip-count sprint. In a priming game, one side builds a wall of consecutive made points that traps enemy checkers behind it. In a holding game, the trailing side keeps an anchor (a made point in the opponent's territory) and waits for a shot at a passing blot. Knowing which game you're in tells you what to do: count the pips after any exchange of hits, race when ahead, and hold or prime when behind.
The bear-off. Bring checkers home efficiently - fill empty home points rather than stacking - and bear off greedily when contact is broken. If the opponent still holds a point or anchor in your home board, bear off carefully: never leave a blot within direct range if a safe play exists, because one late hit can lose a won game.
Easy picks a random legal play, so it wastes dice constantly - it will leave blots in direct range and break its own points for no reason. Punish it by hitting everything hittable and making home-board points, so its checkers on the bar struggle to re-enter. This is the mode to learn move mechanics and bear-off rules.
Medium plays the best move it can see one roll deep. It hits, makes points, and races sensibly, but it doesn't weigh future shot exposure well. Beat it with structure: build a prime in front of its back checkers and it will keep feeding you material rather than escaping while it can.
Hard evaluates every legal play with a full positional heuristic - pip count, blot exposure, home-board strength, and primes. It rarely leaves careless shots. Against it, play the odds honestly: take small safe gains, keep your own exposure indirect, and grab racing chances when the pip count favors you, because it will not hand you free hits.
AI Training goes a step further and samples your likely replies to its candidate plays within its two-second budget. It punishes loose, "hopeful" moves harshly. Your edge is long-term planning across multiple turns - commit early to a priming or holding plan and follow it consistently, and accept that you will need the dice on your side too. Nobody wins every backgammon game; the goal is to win the ones your rolls allow.