View Single Post
Old Jan 8th, 2006, 8:17 AM   #1
Indigno
Professional Programmer
 
Indigno's Avatar
 
Join Date: Dec 2005
Location: Anywhere non-productive
Posts: 267
Rep Power: 0 Indigno is an unknown quantity at this point
Send a message via AIM to Indigno Send a message via MSN to Indigno Send a message via Yahoo to Indigno
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?
Indigno is offline   Reply With Quote