https://github.com/bdrhnsen/rl_visualizer
Visualize reinforcement learning model action probabilities (values of state action pairs)
https://github.com/bdrhnsen/rl_visualizer
reinforcement-learning stable-baselines3 state-action-reward-state-action visualization
Last synced: 2 months ago
JSON representation
Visualize reinforcement learning model action probabilities (values of state action pairs)
- Host: GitHub
- URL: https://github.com/bdrhnsen/rl_visualizer
- Owner: bdrhnsen
- License: other
- Created: 2024-11-04T23:34:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-25T17:44:42.000Z (over 1 year ago)
- Last Synced: 2025-08-19T14:36:03.636Z (11 months ago)
- Topics: reinforcement-learning, stable-baselines3, state-action-reward-state-action, visualization
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RL Visualizer
RL Visualizer is a Python package for visualizing action probabilities, entropy, and rewards in reinforcement learning models.
## Features
- Visualize action probabilities as bar charts
- Track entropy to monitor model uncertainty
- Plot per-step rewards within a single episode
- Compatible with Gym and Gymnasium environments
## Installation
```bash
pip install rl-visualizer
```
## Example
- Here you can see what rl_visualizer do in action:
- This is a custom highway simulated environment in Gymasium format
- Action space: is defined with this
```python
- Enum class Action(Enum):
NO_ACTION = 0
CHANGE_LANE_RIGHT = 1
CHANGE_LANE_LEFT = 2
ACCELERATE = 3
DECELERATE = 4
EMERGENCY_BRAKE = 5
```
- Given reward for driving between 75km/h and 104km/h (max reward for 104km/h and driving not on leftmost lane)
- Given extra reward if driving not in the leftmost lane
- Given negative reward for near collisions and collisions. Near collision is calculated by ttc
