Othello AI Algorithm
The following describes a greedy AI algorithm for playing Othello. The AI simply chooses which spot on the board will gain
it the most number of discs without considering future moves or board positions. The algorithm assumes the AI is playing
with the O discs, and the board is represented as a 2D array.
Save a copy of the board
For each position on the board
If the board position is unoccupied then
Place an O at the position and flip the appropriate discs
If the number of Os that were flipped is the best possible move seen so far then
Save this as the best possible move and save how many discs were flipped
Return the board back to its original values (using your saved copy)
If we found a move that turned over at least 1 disc then
Place an O at the position and flip the appropriate discs
Else
The computer is not able to make a legal move