Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
For a classic tic tac toe, you verify if player 1 played center: case true AI will play corner case false AI will play center Now the 2nd and 3rd moves are to play to avoid defeat ( 3 in a row ) . If you want an AI try doing simple games as this
8th Aug 2016, 6:13 AM
Pedro Costa
Pedro Costa - avatar