For your consideration... TIC-TAC-MAX... a tic-tac-toe game with miniMax AI.
|
11-15-2016, 06:37 PM
Post: #9
|
|||
|
|||
RE: For your consideration... TIC-TAC-MAX... a tic-tac-toe game with miniMax AI.
(11-01-2016 01:15 PM)falcon56215 Wrote: The way I had originally coded the application, if the computer got to move first in a new game, it had to recurse through 9! or 362,880 possible moves. Since you are doing this as an educational experience, you might want to explore making use of the symmetries. For instance, there are only 3 possible opening moves: center, corner, side. If the opening move is at the: center - there are only two possible replies (corner, side) corner - there are 5 possible replies side - there are 5 possible replies There are 7 symmetries on a tic-tac-toe board: four reflections (vertical line, horizontal line, positive slope diagonal, negative slope diagonal) and 3 rotations (90°, 180°, 270°). However, only 3 are needed (say, vertical line, horizontal line, pos slope diagonal) while the other 4 are redundant. For instance, a rotation of 90° could be accomplished by reflecting over the diagonal then over the horizontal. By the way, if you haven't yet seen the xkcd tic-tac-toe map, check out https://xkcd.com/832/ |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)