Minimax Algorithm Tic-Tac-Toe

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
lilfinn
Prole
Posts: 10
Joined: Thu Jul 18, 2013 5:58 am

Minimax Algorithm Tic-Tac-Toe

Post by lilfinn »

I'm trying to figure out how to create an unbeatable tic-tac-toe opponent with the minmax algorithm. Im having trouble deciding how to save the placements of the player and ai so that i can check win states and create the minmax trees, which leads to my next problem. How to do a minmax tree. I would really appreciate if someone could set me in the right direction and let me go from there. I'm doing this project to try and learn, releasing my badass tic-tac-toe game will come later...

Just to see if i'm even started in the right direction heres the .love
Attachments
TTT.love
(1.48 KiB) Downloaded 165 times
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Minimax Algorithm Tic-Tac-Toe

Post by Robin »

Three years ago, I wrote a Tic-Tac-Toe minimax in Python, if that helps.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests