# AI finds optimal positions

• @slow

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 player `X` should find based on the marks of player `O`.
• The scenario number indicates the alternating sequence numbers of how player `X` and `O` 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
Scenarios
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.