To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorAI finds optimal positions
In order to win ASAP
As an AI player
I want to place my numerical marks in the optimal positions
- Numeric marks indicate sequence positions that the AI player
X
should find and mark. - Alphabetic marks indicate sequence positions that the player
O
will mark when it is its ply. X
marks have previously already been analyzed and can therefore be placed on the initial board in any order.O
marks can be placed on the initial board in any order.*
indicates the optimal winning position that the AI playerX
should find based on the marks of playerO
.- The scenario number indicates the alternating sequence numbers of how player
X
andO
place their marks in this game. - Based on Wikipedia optimal decision tree for player X in Tic-Tac-Toe without:
- the two draws
- reduced requirements for: 1342, 1347, 1423, 1523, 1652, 1659, 1723, 1832, 193274
- the two draws
- Scenarios
-
- 12437
- 12457
- 12467
- 1247536
- 1247569
- 1247586
- 1247596
- 12487
- 12497
- 13427
- 13457
- 13467
- 1347526
- 1347569
- 1347586
- 1347596
- 13487
- 13497
- 1423568
- 1423578
- 1423589
- 1423598
- 14253
- 14263
- 14273
- 14283
- 14293
- 1523764
- 1523784
- 1523794
- 15243
- 15263
- 15273
- 15283
- 15293
- 16529
- 16539
- 16549
- 16579
- 16589
- 1659327
- 1659342
- 1659372
- 1659382
- 1723548
- 1723568
- 1723589
- 1723598
- 17243
- 17253
- 17263
- 17283
- 17293
- 1832547
- 1832567
- 1832579
- 1832597
- 18342
- 18352
- 18362
- 18372
- 18392
- 1932745
- 1932754
- 1932764
- 1932784
- 19342
- 19352
- 19362
- 19372
- 19382
- 12437
-
- Given
-
the grid sequence:
X O B 2 _ _ 3 _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 12457
-
- Given
-
the grid sequence:
X O _ X O _ 3 _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 12467
-
- Given
-
the grid sequence:
X O _ X _ O 3 _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1247536
-
- Given
-
the grid sequence:
X O C X 3 4 O _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1247569
-
- Given
-
the grid sequence:
X O _ X X O O _ 4 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1247586
-
- Given
-
the grid sequence:
X O _ X X 4 O O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1247596
-
- Given
-
the grid sequence:
X O _ X X 4 O _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 12487
-
- Given
-
the grid sequence:
X O _ X _ _ 3 O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 12497
-
- Given
-
the grid sequence:
X O _ X _ _ 3 _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 13427
-
- Given
-
the grid sequence:
X O O X _ _ 3 _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 13457
-
- Given
-
the grid sequence:
X _ O X O _ 3 _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 13467
-
- Given
-
the grid sequence:
X _ O X _ O 3 _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1347526
-
- Given
-
the grid sequence:
X C O X 3 4 O _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1347569
-
- Given
-
the grid sequence:
X _ O X X O O _ 4 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1347586
-
- Given
-
the grid sequence:
X _ O X X 4 O O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1347596
-
- Given
-
the grid sequence:
X _ O X X 4 O _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 13487
-
- Given
-
the grid sequence:
X _ O X _ _ 3 O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 13497
-
- Given
-
the grid sequence:
X _ O X _ _ 3 _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1423568
-
- Given
-
the grid sequence:
X X O O 3 C _ 4 _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1423578
-
- Given
-
the grid sequence:
X X O O X _ O 4 _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1423589
-
- Given
-
the grid sequence:
X X O O X _ _ O 4 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1423598
-
- Given
-
the grid sequence:
X X O O X _ _ 4 O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 14253
-
- Given
-
the grid sequence:
X X 3 O O _ _ _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 14263
-
- Given
-
the grid sequence:
X X 3 O _ O _ _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 14273
-
- Given
-
the grid sequence:
X X 3 O _ _ O _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 14283
-
- Given
-
the grid sequence:
X X 3 O _ _ _ O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 14293
-
- Given
-
the grid sequence:
X X 3 O _ _ _ _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1523764
-
- Given
-
the grid sequence:
X X O 4 O C 3 _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1523784
-
- Given
-
the grid sequence:
X X O 4 O _ X O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1523794
-
- Given
-
the grid sequence:
X X O 4 O _ X _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 15243
-
- Given
-
the grid sequence:
X X 3 O O _ _ _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 15263
-
- Given
-
the grid sequence:
X X 3 _ O O _ _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 15273
-
- Given
-
the grid sequence:
X X 3 _ O _ O _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 15283
-
- Given
-
the grid sequence:
X X 3 _ O _ _ O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 15293
-
- Given
-
the grid sequence:
X X 3 _ O _ _ _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 16529
-
- Given
-
the grid sequence:
X O _ _ X O _ _ 3 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 16539
-
- Given
-
the grid sequence:
X _ O _ X O _ _ 3 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 16549
-
- Given
-
the grid sequence:
X _ _ O X O _ _ 3 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 16579
-
- Given
-
the grid sequence:
X _ _ _ X O O _ 3 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 16589
-
- Given
-
the grid sequence:
X _ _ _ X O _ O 3 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1659327
-
- Given
-
the grid sequence:
X C 3 _ X O 4 _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1659342
-
- Given
-
the grid sequence:
X 4 X O X O _ _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1659372
-
- Given
-
the grid sequence:
X 4 X _ X O O _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1659382
-
- Given
-
the grid sequence:
X 4 X _ X O _ O O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1723548
-
- Given
-
the grid sequence:
X X O C 3 _ O 4 _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1723568
-
- Given
-
the grid sequence:
X X O _ X O O 4 _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1723589
-
- Given
-
the grid sequence:
X X O _ X _ O O 4 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1723598
-
- Given
-
the grid sequence:
X X O _ X _ O 4 O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 17243
-
- Given
-
the grid sequence:
X X 3 O _ _ O _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 17253
-
- Given
-
the grid sequence:
X X 3 _ O _ O _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 17263
-
- Given
-
the grid sequence:
X X 3 _ _ O O _ _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 17283
-
- Given
-
the grid sequence:
X X 3 _ _ _ O O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 17293
-
- Given
-
the grid sequence:
X X 3 _ _ _ O _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1832547
-
- Given
-
the grid sequence:
X O X C 3 _ 4 O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1832567
-
- Given
-
the grid sequence:
X O X _ X O 4 O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1832579
-
- Given
-
the grid sequence:
X O X _ X _ O O 4 - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1832597
-
- Given
-
the grid sequence:
X O X _ X _ 4 O O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 18342
-
- Given
-
the grid sequence:
X 3 X O _ _ _ O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 18352
-
- Given
-
the grid sequence:
X 3 X _ O _ _ O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 18362
-
- Given
-
the grid sequence:
X 3 X _ _ O _ O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 18372
-
- Given
-
the grid sequence:
X 3 X _ _ _ O O _ - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 18392
-
- Given
-
the grid sequence:
X 3 X _ _ _ _ O O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1932745
-
- Given
-
the grid sequence:
X O X O 4 _ X _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1932754
-
- Given
-
the grid sequence:
X O X 4 O _ X _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1932764
-
- Given
-
the grid sequence:
X O X 4 _ O X _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 1932784
-
- Given
-
the grid sequence:
X O X 4 _ _ X O O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 19342
-
- Given
-
the grid sequence:
X 3 X O _ _ _ _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 19352
-
- Given
-
the grid sequence:
X 3 X _ O _ _ _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 19362
-
- Given
-
the grid sequence:
X 3 X _ _ O _ _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 19372
-
- Given
-
the grid sequence:
X 3 X _ _ _ O _ O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
- 19382
-
- Given
-
the grid sequence:
X 3 X _ _ _ _ O O - When
- the AI places its best sequential positions
- Then
- the AI should have placed its marks at the indicated positions
- And
- "X" should "win"
Last published almost 7 years ago by esambo.