in reply to Othello/Tree-Style Data Storage

Othello is a particularly tricky game to model, since there isn't a particular orientation to the board, nor is there a "direction" that players "move".

This is similar to the way tic-tac-toe works ... it doesn't matter how you orient the board, so you want to make sure these two boards are both considered "equal"...

 x | o |         |   |
---+---+---   ---+---+---   
 o | x |       o | x |
---+---+---   ---+---+---   
   |   |       x | o |
...and if you are keeping track of the game state, and potential game state, you want to model the board insome way that considers those teh same "state".

Personally, I'd start with a simpiler game (backgammon is good, because it is very linear) but no matter what game you decide to use, make sure you search for existing documentation on game modeling, strategies, and board "ranking".

If the main thing you are intested in developing is a learning algorithm, then I would first spend some time looking for an existing framework/API for building an Othello playing bot. (many College AI classes have frameworks like this provided by the instructor which include all of the game modeling you need ... you just impliment some "player" interface.) Then you can focus on what you are really interested in, and not spend a lot of time worrying about modelling the game itself.

UPDATE: You should definitley consider using Games::Goban for representing boards/pieces, and you probably ought to read up on the SGF Format mentioned in the "See Also" section.

Replies are listed 'Best First'.
Re: Re: Othello/Tree-Style Data Storage
by Muoyo (Novice) on Jun 08, 2003 at 16:10 UTC

    Its true that there isn't an intrinsic orientation to the board in Othello, (or Tic Tac Toe), however, that shouldn't be an immediate concern for designing the board structure. A 2D array would probably be sufficient for all data-keeping purposes, and a 3-d array if you wish to be able to review the game.

    The no-orientation aspect of the game will play a huge role in the construction of any strategic algorithms(the fun part of this project), as you do not want to waste time reading out future sequences which are equivalent due to the geometry.

    One way to avoid this would be to create equvalence classes of positions on the board. For example you could store center, side and corner data for a tic tac toe game, as opposed to storing x-y coordinates. Think graph theory.

    This is a little vauge, let me know if you'd like some elaboartion. -muoyo