I finished the basic naughts and crosses engine last night, as well as created a partial probability algorithm (I will post the algorithm to the routines page later, as it could be useful in other places).
As of this point I have a very basic AI going, which randomly chooses a position and plays it. This means I created the playing interface for the AI, and am able to start building the logic. However, I would like opinions of which version of menace to implement: With mirroring/rotation, or without mirroring. I for some reason believe that without mirroring would be easier to implement, but am not sure.
Unmirrored:
X _ _ is different than _ _ X
_ O _ _ O _
_ _ _ _ _ _
Mirrored:
X _ _ is the same as _ _ X and _ _ _
_ O _ _ O _ _ O _
_ _ _ _ _ _ _ _ XI would also like suggestions on how to implement the memory for storing each gameboard. The only criteria is that it must be a list of 9 numbers which correspond to the places on the board. I can convert lists to strings, but my thought was a matrix for each move. This would only require 4 matricies. Each matrix would correspond to a turn that MENACE makes. [G] would contain gameboard states for menaces 1st move, where each line represents a gameboard state. -1 would be used to indicate a position which has already been played. This would mean that [G] would look something like this, with the 0's being the partial probability of each layout after the first move. I can then use my list of moves which have been played to determine which line of the matrix is the current gameboard. I could then load that row into the probability list, make the selection and repeat. However, There are thousands of different gameboards that could be played, so i might have to narrow it to a subset based on the moves already played
-1 0 0 0 0 0 0 0 0
0 -1 0 0 0 0 0 0 0
0 0 -1 0 0 0 0 0 0
0 0 0 -1 0 0 0 0 0
0 0 0 0 -1 0 0 0 0
0 0 0 0 0 -1 0 0 0
0 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 0 0 -1