A reinforcement learning agent that lands on the Moon
- context
- EPITECH · team of 3
- period
- May 2026
- platforms
- Python · Gymnasium
> cat context.md
An EPITECH artificial intelligence project, built with Ariel Amriou and Pierrick Simon. The agent pilots a lander in Gymnasium's LunarLander-v3 environment and learns by trial and error from sparse rewards. The goal: an average score of at least 200 over 100 consecutive episodes. My part: classifying how each episode ends (crash, out of view, landing), the score and the success criterion, the configurable discretisation for Q-Learning and the reproduction script. The Deep Q-Network was written by my teammates.
> cat how-it-works.md
- 01A random agent as a baseline to compare every model against.
- 02Tabular Q-Learning with a configurable discretisation of the continuous 8-value state, Bellman updates and decaying ε-greedy exploration.
- 03A Dueling Deep Q-Network in PyTorch that splits state value from action advantage, with a 50,000-transition replay memory and a target network.
- 04An ablation study on learning rate, replay memory size and ε decay to pick the most stable configuration.
> cat lessons.md
Q-Learning needed 10,000 episodes (30 minutes) and stayed unstable, because discretising the state makes the lander jerky. The DQN learned smoother, better anticipated landings in about 500 episodes (10 minutes).