Sign in to follow this  
InsideTheAsylum

Tic-Tac-Toe & min-max algorithms..

Recommended Posts

Sorry for making another thread, I tried deleting or editing the other thread, but it just won't let me : Here's my question: Tic-Tac-Toe is a zero sum game, correct? That means if all players play to their best, there'll be no winner, right? Well, I'm just wondering if it's normal behaviour for my min-max function to return the value of '0' as the best move when the computer is making the first move? (Winning boards are +100 and losing boards -100) It usually ends up in move 1 (the upper left) and while I still haven't been able to beat my AI, doesn't mean it's right.. Any input?

Share this post


Link to post
Share on other sites
A zero sum game means that the sum of the player results at the end of the game must total to zero. That doesn't mean that if all players play their best there will be no winner. It is possible to have a zero sum game where one player has an advantage and will always win if both players play their best.

Anyways, for Tic Tac Toe, the first move will always have a 0 value if solved by min-max because there is no way to make a first move that will guarantee a win.

Share this post


Link to post
Share on other sites
I once wasted a two hour maths class working through every possible line of that game

Hint: If you are starting put your mark in one of the corners. If your opponent does not respond by putting theirs in the center then you can force a win.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this