Created
July 31, 2012 07:26
-
-
Save dtrailin/3214498 to your computer and use it in GitHub Desktop.
Logic for Tic Tac Toe AI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| : | |
| 1. Check if there is a tile that you can win in 1 move | |
| if there is no such tile: | |
| 2. Check if there is a tile that your opponent can win in 1 move | |
| if there is no such tile: | |
| 3. Check if there is a tile that can make two tiles apply to the rule #1 | |
| if there is no such tile: | |
| 4. Check if there is a tile that your opponent can make two tiles apply to the rule #2 | |
| if there is no such tile: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment