Behind the Game
How DominoZnif works — from game rules to the AI brain that plays against you.
DominoZnif is the Israeli / Eastern-Mediterranean team variant of All Fives (Muggins). Four players, two teams of two, one goal: be the first team to reach 51 points.
After each tile is placed, sum the pip values at all open arm ends. If the total is a multiple of 5, the playing team scores total ÷ 5 points.
First team to reach 51 points wins. The current round still finishes. If both teams end a round at ≥ 51 with equal scores, play continues until one team strictly leads.
The AI in DominoZnif is not random. Every move is calculated. Here is how it thinks.
The AI has 9 difficulty levels. The higher the level, the more simulations it runs before choosing a move:
| Difficulty | Simulations (N) | Method |
|---|---|---|
| Novice | 0 | Single-ply heuristic only |
| Beginner | 200 | Heuristic-guided rollouts |
| Casual | 350 | Heuristic-guided rollouts |
| Average | 500 | Heuristic-guided rollouts |
| Skilled | 650 | Heuristic-guided rollouts |
| Sharp | 800 | Heuristic-guided rollouts |
| Expert | 950 | Heuristic-guided rollouts |
| Master | 1,100 | Heuristic-guided rollouts |
| Legend | 1,250 | Heuristic-guided rollouts |
For each possible move, the AI runs N simulations:
The move with the best average wins.
The AI plays fair. It can only use information a real human player could observe:
It never peeks at opponents' hands. Unknown tiles are sampled randomly from a pool that excludes placed tiles and the AI's own hand.
For Novice difficulty, and as the evaluator inside every rollout simulation, the AI scores each legal move using a weighted sum of these factors:
| Factor | What it does |
|---|---|
| ScoreVal | Rewards scoring points right now. |
| PrvOpp | Penalises leaving a big scoring opportunity for the next opponent. |
| BlkVal | Rewards forcing the opponent to pass. |
| HvyDump | Encourages playing heavy doubles early — they hurt if you're stuck with them at round end. |
| SelfDom | Rewards keeping your dominant pip value playable on the board. |
| TeamDom | Supports your partner's likely future plays based on inference. |
| ArmAln | Leaves open arm ends showing values you dominate. |
| Kill5 | Closes a 5-end before the opponent can score from it. (+60) |
| SelfDbl | Soft bonus for denying the opponent their strongest double reply. (+50) |
| BlkChain | Hard bonus when a move forces all three opponents to pass AND your team has lighter tiles. (+500) |
| NoReply | Bonus when you score AND the opponent cannot reply: +100 if net gain ≥ 3, +200 if ≥ 5. |
When a team's score approaches 51, the AI adjusts: if a move scores points, it ignores the opponent-reply penalty and takes the points. Winning is more important than defensive positioning when the game is close.
Before running any simulation, the AI checks for a dominant opening:
If all conditions are met, the AI immediately opens with [X|X] as the spinner — no simulation needed. This is the strongest possible opening position.