Advertisement
Gorgozoth

Tic Tac No

Dec 13th, 2022
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | Gaming | 0 0
  1. Algorithm that will tie or beat you at tic-tac-toe:
  2.  
  3. 1 2 3
  4. 4 5 6
  5. 7 8 9
  6.  
  7. The algorithm always goes first. It will always choose 5.
  8. Choose a number to represent your turn.
  9. The algorithm will choose your last turn * 2. If the result is >= 9, subtract 9.
  10. If the algorithm chooses a place that is already taken, subtract 1 until it finds a place that isn't. If it hits 1, add 1 until it finds a free place.
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement