Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m8nt0/frozenlake-q-learning-project
demonstrates how to use Q-Learning to solve the FrozenLake environment from OpenAI Gym. It includes advanced features such as logging, configuration files, model saving/loading, plotting, and hyperparameter tuning.
https://github.com/m8nt0/frozenlake-q-learning-project
Last synced: 1 day ago
JSON representation
demonstrates how to use Q-Learning to solve the FrozenLake environment from OpenAI Gym. It includes advanced features such as logging, configuration files, model saving/loading, plotting, and hyperparameter tuning.
- Host: GitHub
- URL: https://github.com/m8nt0/frozenlake-q-learning-project
- Owner: m8nt0
- License: mit
- Created: 2024-05-23T03:53:16.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-23T04:21:19.000Z (9 months ago)
- Last Synced: 2024-05-23T05:25:02.364Z (9 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FrozenLake-Q-Learning-Project
demonstrates how to use Q-Learning to solve the FrozenLake environment from OpenAI Gym. It includes advanced features such as logging, configuration files, model saving/loading, plotting, and hyperparameter tuning.## Requirements
- Python 3.6+
- numpy
- gym
- matplotlib
- scikit-optimize
- pyyaml## Project Structure
- `configs/`: Contains configuration files.
- `logs/`: Contains logs and saved data.
- `models/`: Contains saved models.
- `plots/`: Contains generated plots.
- `src/`: Contains source code.## Setup
1. **Install the required packages:**
```bash
pip install -r requirements.txt## Instructions
### Configure the Hyperparameters
Configure the hyperparameters in `configs/params.json`.
### Run the Training Script
```bash
python src/main.py --mode train## Run the Evaluation Script
```bash
python src/main.py --mode evaluate## Configuration
- **configs/config.json**: Contains environment and file paths configurations.
- **configs/params.json**: Contains hyperparameters for the Q-Learning algorithm.## Logging and Plotting
- Logs are saved in the `logs/` directory.
- Training progress plots are saved in the `plots/` directory.## Advanced Features
- **Logging**: Logs training progress to a file.
- **Configuration Files**: Use JSON for environment and hyperparameter configurations.
- **Model Saving and Loading**: Save and load the Q-table to and from a file.
- **Plotting**: Generate plots for training rewards and episode lengths.
- **Hyperparameter Tuning**: Supports basic hyperparameter tuning using a configuration file.## Example Usage
### Training the Agent
To train the Q-Learning agent, run:
```bash
python src/main.py --mode train## Evaluating the Agent
To evaluate the trained Q-Learning agent, run:
```bash
python src/main.py --mode evaluate