An Introduction to Reinforcement Learning - Snake Your Way out of a Paper Bag
summary
Implements tabular Q‑learning in C++ (std::vector, std::deque, std::map) starting on a 1D five‑cell line then a 2D grid, using epsilon‑greedy (epsilon=0.1), learning rate (alpha≈0.1) and discount (gamma≈0.9). Builds a console Snake: state encodes local tiles plus horizontal/vertical displacement to food, actions use discrete_distribution, Q‑table persists to disk. Training over ~100 episodes moves performance from ~50% random to reliably reaching food and avoiding obstacles, though occasional zigzagging remains unexplained.
AI-written summary · about
chapters (9)
- 0:00Reinforcement learning intro
- 1:51Moving from one to two dimensions
- 10:20Basic RL concepts
- 20:41Q-learning fundamentals
- 29:13Expanding to two-dimensional environments
- 37:36Better state representation
- 41:03Snake with Q-learning
- 48:18Q-learning vs deep RL
- 51:46Key takeaways
related talks
56mAn Introduction to Reinforcement Learning - Snake Your Way Out of a Paper Bag
01h 01mReinforcement Learning: Pac-Man
01h 31mReinforcement Learning- Pac-Man
33mBreakthroughs and the Future of (Deep) Reinforcement Learning
49mML: Teaching machine to learn from its own mistakes (...)
01h 31mWorkshop on developing Reinforcement Learning
33mA Code-Driven Introduction to Reinforcement Learning
28mDeep Reinforcement Learning: theory, intuition, code
