https://github.com/tamimehsan/tic_tac_toe_with_alpha_beta_pruning
Efficient Algortihm for Tic Tac Toe game ai with alpha beta pruning
https://github.com/tamimehsan/tic_tac_toe_with_alpha_beta_pruning
alpha-beta-pruning game-ai game-theory minimax-algorithm tic-tac-toe zobrist-hashing
Last synced: 7 months ago
JSON representation
Efficient Algortihm for Tic Tac Toe game ai with alpha beta pruning
- Host: GitHub
- URL: https://github.com/tamimehsan/tic_tac_toe_with_alpha_beta_pruning
- Owner: TamimEhsan
- Created: 2022-07-01T03:58:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-20T03:16:42.000Z (about 3 years ago)
- Last Synced: 2025-01-21T14:38:32.049Z (9 months ago)
- Topics: alpha-beta-pruning, game-ai, game-theory, minimax-algorithm, tic-tac-toe, zobrist-hashing
- Language: C++
- Homepage: https://tamimehsan.github.io/Tic_Tac_Toe_with_Alpha_Beta_Pruning/
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tic Tac Toe with Alpha Beta Pruning
The goal here is to create an AI to play simple games. first of which is a tic tac toe.
The board visualizer is stolen shamelessly from the coding train that can be found here -> [Coding Challenge #149: Tic Tac Toe](https://www.youtube.com/watch?v=GTWrWM1UsnA&t=0s)Visit https://tamimehsan.github.io/Tic_Tac_Toe_with_Alpha_Beta_Pruning/ and open console to find the console log
## Benchmarking
AI goes first
| Move Number | Minimax | Alpha Beta | Zobrist Hashing | Ratio |
| ----------- | ------- | ---------- | --------------- | ---------- |
| 1 | 549945 | 30709 | 6197 | 88:5:1 |
| 2 | 7331 | 1519 | 7 | 1047:217:1 |
| 3 | 197 | 97 | 5 | 40:19:1 |
| 4 | 13 | 13 | 3 | 4:4:1 |
| 5 | 1 | 1 | 1 | 1:1:1 |Hooman goes first
| Move Number | Minimax | Alpha Beta | Zobrist Hashing | Ratio |
| ----------- | ------- | ---------- | --------------- | -------- |
| 1 | 59704 | 6138 | 1874 | 32:3:1 |
| 2 | 1172 | 477 | 6 | 195:80:1 |
| 3 | 50 | 44 | 4 | 13:11:1 |
| 4 | 4 | 4 | 2 | 2:2:1 |