Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To be honest, when dealing with AI and heuristics, the most simple tasks can become complicated very quickly. The minimax approach is going to give you the best results and it shouldn't be too difficult considering the fact that you are implementing AI. It is an established standard with 2 player turn based gaming logic.</p> <p>Check out this website... it gives some good insight into tic-tac-toe AI and the minimax implementation.</p> <p><a href="http://www.ntu.edu.sg/home/ehchua/programming/java/JavaGame_TicTacToe_AI.html" rel="noreferrer">http://www.ntu.edu.sg/home/ehchua/programming/java/JavaGame_TicTacToe_AI.html</a></p> <p>Edit:</p> <p>Noticing that someone wrote "Brute Force"... this is going to end up being an inefficient way of the implementation of the heuristics involved in minimax. Iteration through every possible move based on the other players last move is just another way to implement a heuristic.. except it seems to be, in my opinion, more work. Minimax implementation will be simple and effective.</p> <p>Edit2:</p> <p>"Simpler implementation" is somewhat relative. Minimax is the standard and as I said in the comment you can manipulate the heuristic to suit the cases you are looking for...</p> <p>I wish I could tell you the simplest way but there are so many variables dependent on the implantation of your game in code.</p> <p>Take the suggestions, look at you game implementation, and then see what suits you best!</p> <p>What is simple to one person might be complicated to another. I'm just trying to give you options and minimax is pretty solid. Maybe try adjusting it to fit your needs.</p> <p>Edit3:</p> <p>Let me know if you need more direction. I'm happy to help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload