Python game based on gomoku (5 in a row) with human vs. human and human vs. AI options.
Minimax algorithm used for AI, and pygame used for the GUI.
Gomoku-demo.mov
Home Screen
User selection of different gaming modes, and option to quit.
Human vs. Human Mode
Live user competition (switches player within the window). Note: requires two users to use the same device.
Human vs. AI Mode
User competition with AI that uses the minimax algorithm. AI will automatically play after player 1's move.
After Clicking Refresh Button
Option to clear the board and restart.
- Download zip file or clone repository
- Open code in IDE of your choosing
- Install libraries (pygame, math, numpy, pygame-menu, button)
- Run code
- Pieces and home screen image created using figma (c)
- Used a connect four tutorial as inspiriation during the learning/brainstorming process. Linked: https://www.youtube.com/watch?v=8392NJjj8s0&ab_channel=freeCodeCamp.org
- Future thoughts/improvements:
- Use neural networks (reinforcement learning) to improve the speed and accuracy of algorithm (minimax is limited by computer power)
- Add a database for keeping the highest user score and other data
- Create an easier access such as making it web based or deployed on a hosting site