Jump to content
  • Advertisement
Sign in to follow this  
InsideTheAsylum

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

This topic is 4609 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!