CS241: Implementing a game tree

  1. Administrivia - Conflict between 363Y and 451... will move 363Y...
  2. Programming trick: holding the details at arm's length for as long as possible.
  3. lab
  4. Writing boolean gameOver() for Board, sometimes written Board:gameOver() -- perhaps there are 7 cases?
    1. no empty squares
    2. row win for X
    3. col win for X
    4. diag win for X
    5. row win for O
    6. col win for O
    7. diag win for O
    Or... perhaps only 2?
    1. The board is full
    2. Somebody won (Xwin() || Owin()...)
  5. Board representation
    1. The board itself -- 2D array of... what?
    2. Whose turn -- boolean? char? int? Turn?
    3. ...and... how to represent a move? Row/col? Move?
  6. What if the tree won't fit in memory?
    1. Making the Board representation smaller
    2. Storing less Boards (by eliminating duplicates)
    3. Storing already stored Boards in a HashMap