YoloYamb
Expert neural network Yamb player
A 7 million parameter expert neural network that taught itself all the variations of Yamb by playing 3 million games against itself with no human coaching. It runs directly in your browser.
To play against YoloYamb, just choose AI as your opponent in any game with five dice.
Inspired by AlphaZero, YoloYamb is a custom transformer-based (the architecture behind ChatGPT) neural network built from scratch to play Yamb. It trained for about 625 hours on one RTX 4090.
- Input
- The raw game state including the dice, the scoresheet, the roll count, and any declared calls. Everything the model needs to make a decision.
- Tokenizer
- The game state turns into 14 different tokens. There’s one for each column, one for each die, and one for the overall state. Each token is a vector in a 192-dimensional space.
- Shared Trunk
- Three transformer blocks with four attention heads each. Like in an LLM, every token attends to every other. Dice attend to columns, columns attend to dice, and columns attend to one another.
- Policy
- Three more transformer blocks dedicated to deciding the next move. The Score Head picks which box to fill while the Hold Head picks which dice to keep for re-rolls.
- Value
- Predicts the points still to come from any position. It guides the AI during training. In play it doesn’t choose moves, but it’s used to show YoloYamb’s predicted final score during turns.
- At the Table
- Unlike AlphaZero, YoloYamb doesn’t use search when playing. It reads all the info, rates every legal move, and plays the best one instinctually. Search and exact solvers were used only during training, as its teachers.
Playing itself
YoloYamb played about 200,000 games against itself and learned from how each one turned out.
Studying simple solved positions
A computer calculated the perfect move in 493,000 positions on much simpler boards, and YoloYamb learned to copy them.
A perfect end-game teacher
In 58,600 more games, a program that plays turns perfectly when the game is almost over showed it the best move, and YoloYamb learned to match.
Learning about luck
In about 2.7 million more games, it learned to judge each move by how the game went, minus how lucky the dice were compared to what’s expected.
