Skip to content

Genereux-akotenou/RLs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RLs: Reinforcement Learning Algorithms in Gaming-Like Style

This repository demonstrates the application of Reinforcement Learning (RL) algorithms in gaming-like scenarios, making learning RL intuitive, practical, and engaging.


Project Structure

RLs/
├── algorithms/          # Core RL algorithms (Q-Learning, DQL, etc.)
├── environments/        # Prebuilt gaming-style RL environments
├── config/              # Configuration files for training and environments
├── prebuilt/            # Store trained model utils
├── tests/               # Test scripts for validation
├── utils/               # Helper functions for metrics, visualization, etc.
├── x-samples/           # Examples
└── main.py              # Main entry point for running experiments

Installation

# Clone
git clone https://github.com/Genereux-akotenou/RLs.git
cd RLs

# Create env
python -m venv .rl_env
source .rl_env/bin/activate
pip install -r requirements.txt

# Ready?
# NB: Before you start a notebook in this project make sur to select as a kernel '.rl_env/bin/python'

Examples

  1. Run a Predefined Scenario Execute an RL algorithm in a prebuilt gaming environment:
python main.py --env "FrozenLake" --algo "DQN" --mode "test" --test_episodes 3 --verbose "1"
    --model_path "prebuilt/frozenlake-v1/weights_0150.weights.h5" \
  1. Training a DQN Agent in a FrozenLake Environment
python main.py --env "FrozenLake" --algo "DQN" --mode "train" \
    --output_dir "prebuilt/frozenlake-v1" --map "SFFF" "FHFH" "FFFH" "HFFG" \
    --batch_size 32 --n_episodes 1000 --max_steps 300 --verbose "0"
  1. Comparing Algorithms (comming)
python benchmark.py --env "CustomGame" --algos "DQN PPO"
  1. Visualizing Results (comming)
python visualize_results.py --log_dir "./logs/"

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a detailed description.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Model-free and Model-based reinforcement learning algorithm implemented in gaming like scenarios.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors