Skip to content

Commit

Permalink
cleanup readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Krasto committed Jan 22, 2024
1 parent 7206b2a commit 1eb93de
Showing 1 changed file with 15 additions and 24 deletions.
39 changes: 15 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ The game Quixo is a Tic-Tac-Toe variant, played on a five-by-five board of cubes

## What I've Done
- Minmax
- Alpha-Beta Pruning
- Hash-Tables
- Symmetries
- Montecarlo Tree Search
- Random
- w/ heuristic

## Navigate through the code

- `custom_game.py`: Wrapper around Game class, with some utility methods and symmetry (canonical representation) handling
- `minmax.py`: Minmax implementation
- Features:
- Depth-Limited
- Alpha-Beta Pruning
Expand All @@ -28,27 +17,29 @@ The game Quixo is a Tic-Tac-Toe variant, played on a five-by-five board of cubes
- Pruning lvl 1 - At each node consider only the moves that land on different boards (default)
- Pruning lvl 2 - At each node consider only the moves that land on different boards and that are not symmetric to each other (from this level onwards, the tradeoff between time wasted in computing the symmetries and the time saved in the search is not worth it)
- Pruning lvl 3 - All of the above and filter also board that have been already visited on a higher level (not really that useful since we limit to a depth of 3, so there really is not a chance for a cycle to happen)
- Montecarlo Tree Search
- Random
- w/ heuristic

## Navigate through the code

- `custom_game.py`: Wrapper around Game class, with some utility methods and symmetry (canonical representation) handling
- `minmax.py`: Minmax implementation
- `mcts.py`: MonteCarlo Tree Search implementation
- Features:
- Random
- w/ Heuristic
- `__main__.py`: containis the code to perform the evaluation

## Results obtained

### Vs Random
## Results obtained vs Random

| Agent | Games | Win Rate (%) | Average Time per Game (s) | Average Time per Move (s) | Total Number of Moves |
|:-------------------------------------------------:|:-----:|:------------:|:-------------------------:|:-------------------------:|:---------------------:|
| MinMax(AB,D2,P1) - αβ + Depth 2 + Pruning lvl 1 | 100 | 100 | 0.61 | 0.07 | 831 |
| MinMax(AB,D3,P2) - αβ + Depth 3 + Pruning lvl 2 | 100 | 100 | 11.97 | 1.47 | 816 |
| MCTS(R500) - 500 Games with Random Moves | 100 | 84 | 8.91 | 0.90 | 985 |
| MCTS(H500) - 500 Games with Heuristic | 100 | 79 | 52.45 | 4.42 | 1186 |

![Win Rates](./ci_quixo/results/players_wr.png)
| MinMax(AB,D2,P1): αβ + Depth 2 + Pruning lvl 1 | 100 | 100 | 0.61 | 0.07 | 831 |
| MinMax(AB,D3,P2): αβ + Depth 3 + Pruning lvl 2 | 100 | 100 | 11.97 | 1.47 | 816 |
| MCTS(R500): 500 Games with Random Moves | 100 | 84 | 8.91 | 0.90 | 985 |
| MCTS(H500): 500 Games with Heuristic | 100 | 79 | 52.45 | 4.42 | 1186 |

![Time Comparison](./ci_quixo/results/time_comparison.png)
![Win Rates - https://i.imgur.com/EG4VHRS.png](./ci_quixo/results/players_wr.png)

![Time Comparison - https://i.imgur.com/QyHemXw.png](./ci_quixo/results/time_comparison.png)
## Possible Improvements

- [ ] Minmax w/ RankCut
Expand Down

0 comments on commit 1eb93de

Please sign in to comment.