generated from mwc/lab_tic_tac_toe
43 lines
1.5 KiB
Markdown
43 lines
1.5 KiB
Markdown
# 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
|
|
### Determining which actions are available at a particular state
|
|
TTTGame
|
|
### Showing the board
|
|
TTTView
|
|
### Choosing which action to play on a turn
|
|
TTTHumanPlayer
|
|
|
|
## 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 | | | |
|
|
|
|
For the first board I would play 5 because I would win.
|
|
For the second board I would play 5 because I would block O from winning.
|
|
For the third board I would play 0 because I would be guaranteed a board where I could always win next turn.
|
|
For the third board I would play 4 because it gets me closer to winning and blocks O from getting closer
|
|
|
|
### 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?
|
|
|
|
The current reward state is 0, which means the game is either incomplete or it has ended in a draw. In this case, the game is incomplete.
|
|
|
|
The future reward state is 0, which means if both players play optimally, the game will end in a draw.
|