Game AI works powerfully on one side and becomes dumb on the other in Tic-Tac-Toe
问题 I am trying to make a Tic-Tac-Toe game in Python using PyGame and the MiniMax algorithm. The AI plays really well when given the first chance (playing as 'X'), but becomes dumb enough to help the user win when not given the first chance (playing as 'O'). I think I know what the problem is but changing it is messing with the whole program and is not going by the given docstrings. I've made two python files - one for the GUI (runner.py) and the other for the logic behind the game and the AI