This is just a concept test. The AI-algorithm is very slow and uses easy defensive tactics. Still it'll make no stupid mistakes.
Plans for the near future: v.0.6 Better interface, better board, Win/lose counter. v.1.0 Complete AI-"engine" change: From slow water based if-blocks to extremely fast wi-fi based while-loops. v.2.0 Flawless AI-algorithm with no lose possibility.
Makes two moves at a time whenever I do this: Spark middle one(wait till the ai makes its move, it always goes for top left corner) Spark bottom left corner The ai will then go for the top right corner, and then a second later also light the bottom right corner
I'm getting craisy... Tried almost everything, but cant reproduce this "double-turn-bug" Can it be that you are sparking fields for to long? If so - thanks for your reports. Will build a guard with blocking function into the next version.
Nice, I was thinking about adding AI to my tic-tac-toe as well. The only problem I see is that the number of combinations the player could use against the AI is pretty high.
Also, what fun is a game if you never win. Maybe make a random number generator chain to decide wether the AI makes the correct move or a "mistake". Maybe a 10% chance?