issues
search
nickumia
/
cap6635
A summary of the AI techniques explored in Dr. Zhu's AI class
GNU General Public License v3.0
0
stars
0
forks
source link
Proper Tic-Tac-Toe 🤦♀️
#15
Closed
nickumia
closed
1 year ago
nickumia
commented
1 year ago
Related to
https://github.com/nickumia/cap6635/issues/4
Notes:
WAAAYYYYYYYYYY TOOOO Long in the making....
Combining
max
and
min
failed the first (AND second) times I tried it.. but I went back to the basics with the example code
The original issue with the other method was the win function had a terribly insignificant one char typo 😒
This is much simpler
If the AI wins, it's
+1
If the Player wins, it's
-1
Have a separate variable to track whose turn it is and update as the game progresses
Add tests to just get the algorithm to run (the auto script does a random move, so it's not guaranteed to play to win)
Run
MiniMax
and
MiniMaxAlphaBeta
from the same script
This isn't very abstract for any minimax, but that'll be future work.
Related to
Notes:
max
andmin
failed the first (AND second) times I tried it.. but I went back to the basics with the example code+1
-1
MiniMax
andMiniMaxAlphaBeta
from the same script