Skip to content

Commit

Permalink
Organize repo
Browse files Browse the repository at this point in the history
  • Loading branch information
s2t2 committed Jan 19, 2022
1 parent 6291cc3 commit 6289468
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 10 additions & 0 deletions learn/README.md → app/ai/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

# Tic Tac Toe (AI)

> NOTE: this is currently a work in progress!
The [computer players](/app/player.py) in the Tic Tac Toe app use a predefined algorithm to select the best move. Let's see if we can train machine learning models to play the game instead.

## Generating Moves Data
Expand Down Expand Up @@ -44,3 +46,11 @@ Exports a CSV file in the "data" directory (e.g "/data/moves/x_random_vs_o_rando
|3 |4 |`--X-X--O-` |`O` |8 |1 |
|3 |5 |`--X-X--OO` |`X` |5 |-1 |
|3 |6 |`--X-XX-OO` |`O` |6 |1 |

## Model Selection and Evaluation

TBD

## Model Training

TBD
8 changes: 1 addition & 7 deletions app/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,8 @@ def play(self):








if __name__ == "__main__":


# PLAYER SELECTION

x_strategy = input("SELECT X PLAYER TYPE ('HUMAN' / 'COMPUTER-EASY' / 'COMPUTER-HARD'): ") or "HUMAN"
Expand All @@ -117,7 +111,7 @@ def play(self):
select_player(letter="O", strategy=o_strategy),
]

# PRELOAD SELECTION
# GAME PLAY

preload = input("Would you like to use a pre-saved game state? (Y/N): ") or "N"
if preload.upper() == "Y":
Expand Down

0 comments on commit 6289468

Please sign in to comment.