Rules
- The four 2s are the horses. One player owns ♠ and ♣, the other (or Muxing’s agent) owns ♥ and ♦.
- Seven face-down cards form the track next to cells 1–7. Cell 8 is the finish.
- Each card drawn from the pile moves the horse of its suit forward one cell.
- Once every horse has reached cell k, track card k is turned over. The owner of the horse with that suit may move any other horse, including their own, to the cell right behind that horse, or skip.
- The first horse to reach the finish wins. If the pile runs out, the drawn cards are reshuffled.
- Under the board, cards not yet seen counts the cards of each suit still in the pile or face down on the track; a suit with more of them tends to move faster. The agent uses these counts too.
Choose Play Muxing’s agent or Two players above the board and enter your names. In a two-player game on one device, each player decides when a track card of their suit turns over.
The agent
The agent was trained with tabular Q-learning by self-play: 50 million games, both sides sharing one Q table, with a reward of +1 for a win and −1 for a loss. A decision state records the cells of the four horses, how many track cards are still face down, and two coarse counting features: which opponent has more unseen cards, and whether the teammate has more unseen cards than the horse whose track card turned over. The table covers the 6,656 states seen at least 200 times in training, which account for 99.96% of decisions; anywhere else the agent falls back to a simple rule. The win chances in the game log are its learned estimates, (Q + 1) / 2.
Win rates over 200,000 games against other policies:
| Opponent |
Agent’s win rate |
| Never moves another horse |
81.1% |
| Random choices |
75.8% |
| Rule: maximize my best horse minus theirs, ties by suit |
50.8% |
| The same rule, ties to the opponent with more unseen cards |
50.2% |
Most of the game is luck. A player only gets to choose when a track card of their suit turns over, about 1.8 times per game.