Jump to content
  • Advertisement
Sign in to follow this  

Figure out AI for 9 board tic tac toe?

This topic is 2536 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

When I made my 3x3 Tic Tac Toe game, I first simply looped through all positions to see if the computer could win that round, If I couldn't I, then looped through to check if the player could win the next round, and if the AI still didn't have a position to place its piece, I would simply select the first available place from an array of places that went from the best positions (middle, middle right/left etc).

You could try that or , for an extra challenge you could make it loop through the options twice or three times so the computer can plan ahead.

Hope that helped with some of the planning at least. =D

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!