Problem 701. Play Tic-Tac-Toe: Easy Bots
Interactive Tic-Tac-Toe game versus the test suite algorithms.
The contest will be 50 games of Computer first and 50 games of Player first.
The tic-tac-bots are not strong and are named Up, Down, and Random.
Initial board is zeros(3). Computer moves are 1s and Player moves are 2s.
Player output is an integer 1:9 to identify array position
1 4 7
2 5 8
3 6 9
Examples:
Input: [1 0 0;0 0 0;0 0 0] % Computer first case
Output: 5
Yields : [1 0 0; 0 2 0;0 0 0] with computer then picking position 2.
Second Input: [1 0 0;1 2 0;0 0 0] with computer's second move shown
.
Passing Score is 66 Wins out of 100 games.
It may be possible to score 100 Wins against the tic-tac-bots.
Your Total Wins will be displayed.
A follow-on problem will be 100 Tic-Tac-Toe Games: Never Lose Challenge
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers20
Suggested Problems
-
2974 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
369 Solvers
-
1155 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1047 Solvers
-
389 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!