Downloads · 30 days
0
pkalkman/cliff-walking-ql
cliff-walking-ql is a reinforcement learning model from pkalkman. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for gymnasium. The card lists the license as apache-2.0.
This repository contains a Q-learning agent trained on the CliffWalking-v0 environment from Gymnasium. The agent learns to navigate the cliff, avoiding falling into the cliff zone while reaching the goal with minimal…
Downloads · 30 days
0
Access
Public
Updated Oct 2, 2024
Repo size
1.7 KB
Likes
0
Public
Click a slice to open those files.
.mp447.5 KB · 87%
From the Hugging Face model README
This repository contains a Q-learning agent trained on the CliffWalking-v0 environment from Gymnasium. The agent learns to navigate the cliff, avoiding falling into the cliff zone while reaching the goal with minimal penalties. The Q-learning algorithm is implemented with epsilon-greedy exploration and updates the Q-table based on state-action-reward transitions.
train.py: The main script that trains the Q-learning agent.cliffWalking_qtable.npy: The saved Q-table after training.replay.mp4: A video of the agent's performance after training.CliffWalking-v0 (Gymnasium)The agent starts by exploring the environment randomly and gradually learns the optimal path to avoid falling off the cliff while reaching the goal.
Make sure you have the required packages installed:
pip install gymnasium numpy imageio[ffmpeg]
To train the agent, run the script train.py:
python train.py