Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8923759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:13:19+00:00 2026-06-15T07:13:19+00:00

I made a tic tac toe A.I. Given each board state, my A.I. will

  • 0

I made a tic tac toe A.I. Given each board state, my A.I. will return 1 exact place to move. (Even if moves are equally correct, it chooses same one every time, it does not pick a random one)

I also made a function that loops though all possible plays made with the A.I.

So it’s a recursive function that lets the A.I. make a move for a given board, then lets the other play make all possible moves and calls the recursive function in it self with a new board for each possible move.

I do this for when the A.I goes first, and when the other one goes first… and add these together. I end up with 418 possible wins and 115 possible ties, and 0 possible loses.

But now my problem is, how do I maximize the amount of wins? I need to compare this statistic to something, but I can’t figure out what to compare it to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:13:20+00:00Added an answer on June 15, 2026 at 7:13 am

    Did you read article on wikipedia? link

    Number of terminal positions

    When considering only the state of the board, and after taking into account board symmetries (i.e. rotations and reflections), there are only 138 terminal board positions. Assuming that X makes the first move every time:

    • 91 unique positions are won by (X)
    • 44 unique positions are won by (O)
    • 3 unique positions are drawn

    Number of possible games

    Without taking symmetries into account, the number of possible games can be determined by hand with an exact formula that leads to 255,168 possible games. Assuming that X makes the first move every time:

    • 131,184 finished games are won by (X)
    • 77,904 finished games are won by (O)
    • 46,080 finished games are drawn

    You may generate 138 terminal board positions from first paragraph

    or

    Yo may run enough tests on random fields and compare your results with statistics from here link

    Win in 5 moves    1440     0.6%
    Win in 6 moves    5328     2.1%
    Win in 7 moves    47952   18.8%
    Win in 8 moves    72576   28.4%
    Win in 9 moves    81792   32.1%
    Draw              46080   18.1%    
    Total             255168 100.0%
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I made a tic-tac-toe game in c++ want to learn how to use SDL
I'm creating a Tic tac toe game, in that after click made by user
I'm generating a Tic-Tac-Toe game tree (9 seconds after the first move), and I'm
I have a tic tac toe game I made, I am not done yet,
My daughters have made a game not unlike tic-tac-toe. Of course as I played
I have made a Tic-Tac-Toe game for 2 players. Now, I want to give
I have made a simple tic tac toe app for Android which needs no
I am trying to make tic tac toe using websockets running on glassfish. I've
I have read a book and am trying to make a game of tic-tac-toe
I'm making a tic tac toe game and I'm making the player's opponent now.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.