Skip to main content

Visrl

Visrl (pronounced "visceral") is a simple wrapper to analyse and visualise reinforcement learning agents' behaviour in the environment.

Reinforcement learning requires a lot of overhead code to inspect an agent's behaviour visually, typically through env.render(). Visrl allows users to easily intervene and switch between agent control and human control, and allows inserting a breakpoint in the game state to pause only at a relevant state of interest.

Features

  • Set action hotkeys
  • Human intervention: Take actions 1 step at a time
  • Agent control: Return control to the agent
  • Speed up/ slow down frame rate
  • Visualise relevant values across history
  • Breakpoint: Run until a condition involving values is fulfilled
  • Playback: Show past frames and ations
  • Record: Record a .mp4, .gif or download a .csv of the history.

Install

pip install visrl

Usage

import gym
from stable_baselines3 import DQN
from visrl import Visrl

env = gym.make('LunarLander-v2')
agent = DQN('MlpPolicy', env, verbose=1)
agent.learn(total_timesteps=int(2e5))

Visrl(env, agent).run()

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visrl-0.1.7.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file visrl-0.1.7.tar.gz.

File metadata

  • Download URL: visrl-0.1.7.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for visrl-0.1.7.tar.gz
Algorithm Hash digest
SHA256 55c3d564497e50cd194b337dcfe9562da78ee5b29f7826c4766778588c211f3d
MD5 dd30d99d5159beeee43b197cd22aef62
BLAKE2b-256 8bd31885e8c488c828bf0c8676d0983ef2715cd5d326adb932c061344a29fa33

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.7 This release

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page