Im tryin to create a tic tac toe ( more then 3x3 but startin with 3x3) with ai. the prob is gettin the ai to work. many eg of 3x3 are out there but they seem to be done based on if this then do this. i kinda want a recursive function cause if else hard to be implemented on a bigger tic tac toe board.
i think i figured out part of the ai.
human is X comp is O
first if O can place a winnin spot it will else
O to see if X is winnin and block else *
place randomly
* this is my prob in finding out how to know if the human has already two in a row and is goin to win unless there is a block
i think i figured out part of the ai.
human is X comp is O
first if O can place a winnin spot it will else
O to see if X is winnin and block else *
place randomly
* this is my prob in finding out how to know if the human has already two in a row and is goin to win unless there is a block
Comment