lab_tic_tac_toe/notes.md

1.5 KiB

Tic Tac Toe notes

Checkpoint 1 Notes

Which class is responsible for each of the following behaviors? For each, explain how the behavior is accomplished.

Checking to see whether the game is over

TTTGame checks whether the board is full and which player (if any) wins. If a player meets a win condition (yet to be defined) or if all spaces are full and no additional moves are possible, the end of the game is (or should be) triggered in is_over()

Determining which actions are available at a particular state

TTTGame generates the list of available actions based on the current state

Showing the board

TTTView controls generating the board and printing it to the screen through the print_board() and get_action() methods

Choosing which action to play on a turn

TTTHumanPlayer allows the user to play an action based on the list of available actions generated

Checkpoint 2 Notes

TTT Strategy

For each of the following board states, if you are playing as X and it's your turn, which action would you take? Why?

| O | O | | O | X | X | O |
---+---+--- ---+---+--- ---+---+--- ---+---+--- X | X | | X | X | O | O | |
---+---+--- ---+---+--- ---+---+--- ---+---+--- | | | | O | | | |

Initial game state

You can get the inital game state using game.get_initial_state(). What is the current and future reward for this state? What does this mean?