Dec-14-2022, 08:05 PM
(This post was last modified: Jan-06-2023, 12:41 AM by Yoriz.
Edit Reason: removed unnecessary quote of previous post
)
You didn't look very hard. I googled "python tic-tac-toe algorithm" and got several great links on the first page. Ignore the random selection type algorithms. They don't respond to your play. Defeating them is too simple to be any fun. The minimax algorithm is fairly easy to implement. If you want to have any chance at beating the computer you need to limit the "depth" of the search, otherwise the best a human player can hope for is a draw.