Train a deep reinforcement learning model to solve the Open AI Lunar Lander problem.
OpenAI Gym library Lunar Lander.
Code is mainly based on the following repos:
Step 1:
- Microsoft C++ Build Tools: → "MSVCv142 - VS 2019 C++ x64/x86 build tools" or greater
pip install gym
pip install gym[box2d]
pip install tensorflow==2.12.0
pip install keras==2.12.0
pip install keras-rl2
Step 2 (for DQNAgent Model):
Since the keras rl library (keras-rl2
) is outdated and not updated anymore, some changed had to be made to the existing library files. In ...site-packages\rl
replace the callbacks.py
and core.py
file with the files in this repo. Same for dqn.py
in ...site-packages\rl\agents
.
Code provides two classes/models for training the Open AI Lunar Lander: DQNAgent (from keras rl library) and custom DQN model (based on keras library). Both models use a greedy policy (more information at Reinforcement-Learning-Lunar_Lander). In the main file, the model as well as other options like rendering and testing can be selected.