Full Report for Bagel by Phil Leduc

Full Report for Bagel by Phil Leduc

Bagel is a quick, tense game with random setup for two players in which players try to create as many 3-in-a-rows as possible – similar to Tic-Tac-Toe. Each turn, players must decide whether to score points,set up scoring opportunities, or hinder their opponent. Although players will develop general strategiesfor optimizing their scores, the random set up of the board requires players to closely examine eachgame state before placing discs.

Generated at 21/07/2021, 18:59 from 1000 logged games.


Representative game (in the sense of being of mean length). Wherever you see the 'representative game' referred to in later sections, this is it!

Game Term

An n-in-a-row consists of 1 or more (n) like-colored discs that are aligned and connected. The center space, empty tiles, and opponent discs break connectivity.

Game Play

The first player starts the game by placing a white disc on any empty tile. The pie rule can be applied; see Pie Rule below.

Following the first player's placement, player turns will alternate


On a turn, a player must place either one or two discs from his or her reserve. Using the following restrictions:

To end a turn, the player should update his or her score using paper and pencil or scoring dice by addingone for each new 3-in-a-row created on the current turn – rows that contain at least one of the newlyplaced discs. For example, extending a pre-existing 3-in-a-row to a 4-in-a-row only adds one to theplayer’s score. See the Scoring section below.

Pie Rule

To apply the pie rule, on the second player's first turn only, he may opt to accept the firstplayer's move as his own. The second player exchanges discs with his opponent and does not place anydiscs. In effect, the second player becomes the new first player! Following this role exchange playcontinues with no further role swapping.

Game End

The game ends when one player cannot place a disc, either due to no remaining empty tiles on theboard or no remaining discs in reserve. At game’s end scoring verification takes place.


Players count the number of 3-in-a-rows created by their discs. The 3-in-a-rows can overlap or intersect.For example, a 5-in-a-row counts as three overlapping 3-in-a-rows. The 3-in-a-rows are counted in allthree directions established by the hex layout. In general, an n-in-a-row scores n-2 points.


General comments:

Play: Combinatorial

Mechanism(s): Line

Components: Board

BGG Stats

BGG EntryBagel
BGG Ratingnull
BGG Weightnull

Kolomogorov Complexity Analysis

Size (bytes)26882
Reference Size10293

Ai Ai calculates the size of the implementation, and compares it to the Ai Ai implementation of the simplest possible game (which just fills the board). Note that this estimate may include some graphics and heuristics code as well as the game logic. See the wikipedia entry for more details.

Playout Complexity Estimate

Playouts per second45295.60 (22.08µs/playout)
Reference Size297530.41 (3.36µs/playout)
Ratio (low is good)6.57

Tavener complexity: the heat generated by playing every possible instance of a game with a perfectly efficient programme. Since this is not possible to calculate, Ai Ai calculates the number of random playouts per second and compares it to the fastest non-trivial Ai Ai game (Connect 4). This ratio gives a practical indication of how complex the game is. Combine this with the computational state space, and you can get an idea of how strong the default (MCTS-based) AI will be.

Playout/Search Speed

LabelIts/sSDNodes/sSDGame lengthSD
Random playout3,947151167,0816,426422

Random: 10 second warmup for the hotspot compiler. 100 trials of 1000ms each.

Other: 100 playouts, means calculated over the first 5 moves only to avoid distortion due to speedup at end of game.

Mirroring Strategies

Rotation (Half turn) lost each game as expected.
Reflection (X axis) lost each game as expected.
Reflection (Y axis) lost each game as expected.
Copy last move lost each game as expected.

Mirroring strategies attempt to copy the previous move. On first move, they will attempt to play in the centre. If neither of these are possible, they will pick a random move. Each entry represents a different form of copying; direct copy, reflection in either the X or Y axis, half-turn rotation.

Win % By Player (Bias)

1: White win %85.80±2.30Includes draws = 50%
2: Black win %14.20±2.03Includes draws = 50%
Draw %14.80Percentage of games where all players draw.
Decisive %85.20Percentage of games with a single winner.
Samples1000Quantity of logged games played

Note: that win/loss statistics may vary depending on thinking time (horizon effect, etc.), bad heuristics, bugs, and other factors, so should be taken with a pinch of salt. (Given perfect play, any game of pure skill will always end in the same result.)

Note: Ai Ai differentiates between states where all players draw or win or lose; this is mostly to support cooperative games.

UCT Skill Chains

MatchAIStrong WinsDrawsStrong Losses#GamesStrong Scorep1 Win%Draw%p2 Win%Game Length
1UCT (its=2)596702519170.6574 <= 0.6881 <= 0.717353.657.6338.7141.83
4UCT (its=5)584943109880.6082 <= 0.6387 <= 0.668054.359.5136.1340.92
10UCT (its=11)592782969660.6226 <= 0.6532 <= 0.682656.008.0735.9240.06
18UCT (its=19)585913179930.6045 <= 0.6349 <= 0.664353.079.1637.7639.35
29UCT (its=30)5781052849670.6214 <= 0.6520 <= 0.681452.2210.8636.9238.73
36UCT (its=98)61041677180.8522 <= 0.8781 <= 0.900151.955.7142.3438.31
37UCT (its=266)59963947560.8058 <= 0.8340 <= 0.858842.468.3349.2137.70
38UCT (its=723)587871858590.7034 <= 0.7340 <= 0.762524.5610.1365.3137.76
39UCT (its=1966)5531552789860.6090 <= 0.6395 <= 0.668810.9515.7273.3337.61
40UCT (its=5343)5411792039230.6524 <= 0.6831 <= 0.712315.2819.3965.3337.66
41UCT (its=14523)4503611239340.6444 <= 0.6751 <= 0.704318.9538.6542.4037.78
UCT (its=39479)
0.5394 <= 0.5862 <= 0.6315
UCT (its=39479)
0.4691 <= 0.5000 <= 0.5309

Search for levels ended: time limit reached.

Level of Play: Strong beats Weak 60% of the time (lower bound with 95% confidence).

Draw%, p1 win% and game length may give some indication of trends as AI strength increases.

1st Player Win Ratios by Playing Strength

This chart shows the win(green)/draw(black)/loss(red) percentages, as UCT play strength increases. Note that for most games, the top playing strength show here will be distinctly below human standard.


Game length38.32 
Branching factor11.13 
Complexity10^31.69Based on game length and branching factor
Computational Complexity10^6.19Sample quality (100 best): 8.61
Samples1000Quantity of logged games played

Computational complexity (where present) is an estimate of the game tree reachable through actual play. For each game in turn, Ai Ai marks the positions reached in a hashtable, then counts the number of new moves added to the table. Once all moves are applied, it treats this sequence as a geometric progression and calculates the sum as n-> infinity.

Move Classification

Distinct actions38Number of distinct moves (e.g. "e4") regardless of position in game tree
Good moves13A good move is selected by the AI more than the average
Bad moves25A bad move is selected by the AI less than the average
Response distance2.86Mean distance between move and response; a low value relative to the board size may mean a game is tactical rather than strategic.
Samples1000Quantity of logged games played

Board Coverage

A mean of 97.30% of board locations were used per game.

Colour and size show the frequency of visits.

Game Length

Game length frequencies.


Change in Material Per Turn

This chart is based on a single representative* playout, and gives a feel for the change in material over the course of a game. (* Representative in the sense that it is close to the mean length.)


Table: branching factor per turn, based on a single representative* game. (* Representative in the sense that it is close to the mean game length.)

Action Types per Turn

This chart is based on a single representative* game, and gives a feel for the types of moves available throughout that game. (* Representative in the sense that it is close to the mean game length.)

Red: removal, Black: move, Blue: Add, Grey: pass, Purple: swap sides, Brown: other.


This chart shows the best move value with respect to the active player; the orange line represents the value of doing nothing (null move).

The lead changed on 5% of the game turns. Ai Ai found 0 critical turns (turns with only one good option).

Position Heatmap

This chart shows the relative temperature of all moves each turn. Colour range: black (worst), red, orange(even), yellow, white(best).

Good/Effective moves

MeasureAll playersPlayer 1Player 2
Mean % of effective moves66.6252.1882.67
Mean no. of effective moves5.844.157.72
Effective game space10^21.1410^7.7410^13.40
Mean % of good moves47.4589.310.93
Mean no. of good moves5.139.450.33
Good move game space10^15.6810^14.9010^0.78

These figures were calculated over a single game.

An effective move is one with score 0.1 of the best move (including the best move). -1 (loss) <= score <= 1 (win)

A good move has a score > 0. Note that when there are no good moves, an multiplier of 1 is used for the game space calculation.

Quality Measures

Hot turns50.00%A hot turn is one where making a move is better than doing nothing.
Momentum15.79%% of turns where a player improved their score.
Correction15.79%% of turns where the score headed back towards equality.
Depth3.28%Difference in evaluation between a short and long search.
Drama0.17%How much the winner was behind before their final victory.
Foulup Factor34.21%Moves that looked better than the best move after a short search.
Surprising turns0.00%Turns that looked bad after a short search, but good after a long one.
Last lead change10.53%Distance through game when the lead changed for the last time.
Decisiveness28.95%Distance from the result being known to the end of the game.

These figures were calculated over a single representative* game, and based on the measures of quality described in "Automatic Generation and Evaluation of Recombination Games" (Cameron Browne, 2007). (* Representative, in the sense that it is close to the mean game length.)

Unique Positions Reachable at Depth


Note: most games do not take board rotation and reflection into consideration.
Multi-part turns could be treated as the same or different depth depending on the implementation.
Counts to depth N include all moves reachable at lower depths.
Inaccuracies may also exist due to hash collisions, but Ai Ai uses 64-bit hashes so these will be a very small fraction of a percentage point.

Shortest Game(s)

No solutions found to depth 8.



White to win in 12 moves

Black to win in 8 moves

White to win in 8 moves

White to win in 6 moves

White to win in 6 moves

Black to win in 6 moves

White to win in 5 moves

White to win in 5 moves

Black to win in 4 moves

Black to win in 4 moves

White to win in 4 moves

White to win in 4 moves

Weak puzzle selection criteria are in place; the first move may not be unique.