This repository contains a collection of Reinforcement Learning (RL) implementations in Jupyter notebooks. Each notebook demonstrates a different RL algorithm or problem, providing hands-on examples and clear explanations.
Below is a list of the notebooks included in this repository, along with a brief description of each.
- Description: This notebook implements a Deep Q-Network (DQN) to solve the CartPole-v1 environment from OpenAI Gym. The goal is to balance a pole on a cart by applying forces to the cart.
- Algorithm: Deep Q-Network (DQN)
- Environment: CartPole-v1
- Description: This notebook demonstrates the Deep Deterministic Policy Gradient (DDPG) algorithm, which is designed for continuous action spaces. It is applied to the Pendulum-v1 environment.
- Algorithm: Deep Deterministic Policy Gradient (DDPG)
- Environment: Pendulum-v1
- Description: This notebook solves the Frozen Lake environment using Dynamic Programming. It demonstrates how to find the optimal policy in a grid-based environment where the agent must navigate from a starting point to a goal while avoiding holes.
- Algorithm: Dynamic Programming (Policy Iteration)
- Environment: FrozenLake-v1
- Description: This notebook implements a simple Grid World environment and solves it using Q-learning. The agent learns to navigate a grid to reach a goal state while receiving rewards and penalties.
- Algorithm: Q-Learning
- Environment: Custom Grid World
- Description: This notebook compares the performance of Q-Learning and SARSA on the LunarLander-v2 environment. It showcases the differences between these two temporal-difference learning algorithms in a more complex environment.
- Algorithms: Q-Learning, SARSA
- Environment: LunarLander-v2
To run these notebooks, you will need to have Python and Jupyter installed. You can install the required libraries using pip:
```bash pip install numpy gym torch matplotlib ```
After installing the dependencies, you can launch Jupyter Notebook and open the desired .ipynb file.
Contributions are welcome! If you have any improvements or new implementations to add, feel free to open a pull request.