Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
minimax help
#1
I need help with the issue that the code is returning 1s for all the moves instead of 1s and 0s and -1s for the best or the worst moves. Also it is marking suboptimal moves.


Attached Files

.py   board.py (Size: 3.55 KB / Downloads: 83)
.py   player.py (Size: 9.91 KB / Downloads: 48)
.py   tictac.py (Size: 1.2 KB / Downloads: 41)
Reply
#2
Just post your minmax code. Sounds like you are not really alternating between X and O. There are many ways to mess up the algorithm and they are difficult to spot if you don't really understand what the algorithm does.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020