|
AI for tic tac toe
I've been working on a tic tac toe game for a week or two now. Right now I've got a random number AI system set up for it. I also have it set so that it has a 2/3 chance of blocking a human attempt at getting three in a row. But I'm having problems setting it to try to get its own side three in a row. I know that I could set every single scenario into it, but that might take a while. Right now I have my board set up like:
s1|s2|s3
----------
s4|s5|s6
----------
s7|s8|s9
there is a label on each of the squares, then one of those variables is assigned to it. This is in visual basic. How do I set it to simultaneously look out for me trying to get three in a row but also try to get three in a row itself?
|