Reinforcement learning agent to play the South-Asian tabletop board game Carrom (similar to billiards). CCS 1L project authored by Rohil Shah. See video and summary below for more details.
Carrom.Final.Presentation.Edited.mp4
Auto-generated Video Summary:
-
Understanding Carrom:
- Brief overview: A two-player tabletop game involving flicking a striker to pocket coins.
-
Project Structure:
-
Simulation:
- Leveraged an open-source simulator from IIT Bombay.
- Written in Python, using Pymunk for 2D physics and Pygame for graphics.
- Customized the open-source code to suit my project's needs.
-
Hand-Coded Algorithms:
- Implemented various strategies, including a random-coin player and a center-of-mass player.
- Aimed for a progression in complexity to facilitate performance measurement.
-
Reinforcement Learning:
- Initial steps involved standardizing the simulation into an "environment."
- Utilized Proximal Policy Optimization (PPO) as the reinforcement learning algorithm.
-
-
Training Progress:
- See videos demonstrating the simulation and hand-coded algorithms.
- See the win-rate graph of the reinforcement learning algorithm (PPO) against a randomly shooting player.
-
Next Steps:
-
Simulation Enhancement:
- There is a need for optimization to improve speed and iteration time.
- Potential adjustments to the physics to better mimic real-life carrom conditions.
-
Hand-Coded Agents Improvement:
- Could develop more intelligent algorithms with advanced strategies like pocket targeting and defensive maneuvers.
-
Reinforcement Learning Opportunities:
- PPO algorithm could be optimized.
- Can try other reinforcement learning algorithms such as Q-learning or model-based approaches.
- Genetic algorithms like NEAT are potential alternatives for achieving positive results.
-
- Ensure that you have Python 3.9 installed.
- Install the dependencies using
python -m pip install -r requirements.txt
- Run two random agents against each other using
python3 main.py
Gymnasium-based environment
PettingZoo-based environment
Initial translation from https://github.com/samiranrl/Carrom_rl/blob/master/2_player_server/