This repository contains two separate RL experiments in one place:
- Tic-Tac-Toe RL Agent โ a gentle introduction where the agent learns not to play like a potato.
- Atari Pitfall RL Agent โ pure chaos mode, where the agent struggles against holes, ladders, and the meaning of existence.
Each experiment lives in its own notebook. Run them independently.
Notebook: tic-tac-toe.ipynb
This notebook trains an agent to play Tic-Tac-Toe using reinforcement learning.
- Agent initially places moves at random.
- Learns that losing feels bad.
- Eventually begins to block and win (sometimes intentionally).
- Open the notebook in Jupyter / Colab.
- Run cells in order.
- Observe the transition from โhuh???โ to โoh, I get it!โ
Notebook: atari_pitfall.ipynb
This notebook attempts to teach an agent how to play Pitfall, a game where falling into holes is less of a possibility and more of a destiny.
- Agent tries to move and jump.
- Agent discovers gravity the hard way.
- Training is slow but sometimes rewarding.
- Make sure you have gym + Atari environments installed.
- Preferably train using GPU (CPU training may take your entire lifespan).
- Run notebook step-by-step.
- Python
- Jupyter Notebook
gym(with Atari dependencies for Pitfall)- Torch / TensorFlow (depending on your implementation)
- Patience (mandatory)
If the agent performs well, you may celebrate.
If it fails spectacularly โ thatโs part of the show.
We learn. We fall. We fall again. And then maybe we jump correctly once.