Skip to content

undextrois/reinforcement-learning

Repository files navigation

Reinforcement-Learning

A repository for implementing & experimenting with reinforcement learning (RL) algorithms — built and maintained by @undextrois.

What’s this repo about

This project provides implementations of key reinforcement-learning algorithms (both classic and deep-RL), suitable for study, experimentation, benchmarking and extension. Whether you’re learning RL, researching, or building prototypes — this repo gives you a launch pad.

Key goals:

  • Provide clean, readable implementations of RL algorithms.
  • Support standard environments (e.g., via OpenAI Gym) for reproducible results.
  • Enable extension: add new algorithms, environments, hyper-parameters.
  • Offer scripts and notebooks for experimentation & visualization.

Contents

/
├── algorithms/         ← source code for each RL algorithm  
├── envs/               ← environment wrappers, helper utilities  
├── experiments/        ← experiment scripts, configuration files  
├── notebooks/          ← Jupyter notebooks for demonstration & exploration  
├── tests/              ← unit/integration tests  
├── requirements.txt    ← Python dependencies  
└── README.md           ← you’re reading it!  

Supported Algorithms

Below is a non-exhaustive list of RL methods included (or planned):

  • Tabular methods: Value Iteration, Policy Iteration (Markov Decision Processes)
  • Monte Carlo prediction & control
  • Temporal Difference (TD) learning: SARSA, Q-Learning
  • Function Approximation (linear, maybe simple neural nets)
  • Deep RL: Deep Q-Networks (DQN), Double DQN, (optionally) Dueling DQN / Prioritized Experience Replay
  • Policy Gradient methods: REINFORCE, Actor-Critic, (optionally) Proximal Policy Optimization (PPO)
  • Exploration methods: ε-greedy, Upper-Confidence Bounds (UCB) for bandits / RL Note: if some algorithms above aren’t yet implemented, they may be marked as “WIP” or “planned”.

Getting Started

Prerequisites

  • Python 3.x (recommended 3.7+)
  • virtualenv or conda (recommended)
  • pip install -r requirements.txt

Installation

git clone https://github.com/undextrois/reinforcement-learning.git  
cd reinforcement-learning  
pip install -r requirements.txt  

Quick-Start Example

Here’s how you might run a simple algorithm/experiment:

python algorithms/q_learning.py --env FrozenLake-v1 --episodes 1000 --render  

Replace with correct script name & arguments as per your code.

Running Notebooks

Open notebooks/ in JupyterLab / Jupyter Notebook.

jupyter notebook notebooks/DQN_CartPole.ipynb  

Experiments & Results

Experiments are stored under experiments/. Each run creates a folder with the date/time, parameters used, results (e.g., cumulative reward, loss curves), and optionally saved models or logs. You can quickly reproduce results by:

python experiments/run_experiment.py --config experiments/configs/dqn_cartpole.yaml  

Modern usage: tweak the config file, rerun, check results/ folder.

Extending the Repo

Want to add a new algorithm or environment? Here’s how:

  1. Create a new file in algorithms/your_algorithm.py implementing the RL agent class.
  2. Add associated config under experiments/configs/your_algorithm_*.yaml.
  3. Write or update a notebook under notebooks/ to demonstrate usage.
  4. Add unit tests in tests/ to validate the new algorithm.
  5. Submit a pull request / version bump if you intend to share.

Roadmap & Planned Features

  • More advanced Deep RL algorithms: PPO, A3C, SAC
  • Support for continuous-action environments (e.g., MuJoCo, Unity ML-Agents)
  • Better logging & visualization: TensorBoard / Weights & Biases integration
  • Hyper-parameter search (grid / random / Bayesian)
  • Docker / reproducible environments for easier deployment

References & Learning Resources

  • Sutton, R. S. & Barto, A. G. (2018) Reinforcement Learning: An Introduction
  • David Silver’s RL course (UCL / DeepMind)
  • OpenAI Gym: toolkit for developing RL algorithms
  • Various deep-RL research papers (DQN, PPO, SAC, etc.)

License

This project is released under the MIT License. Feel free to use, modify, and extend — attribution appreciated.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/your-algorithm)
  3. Make your changes (code, tests, notebook, documentation)
  4. Submit a Pull Request and describe your changes
  5. Ensure all tests pass, code quality maintained

Thank you for your interest and contributions!


Happy Reinforcement Learning! — @undextrois

About

RL Experiments and what not

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages