Motor Dashboard

Usage Guide

To use the dashboard, you have to import the class, define the plots, instantiate the dashboard and pass it to the environment.

The most common plots can be quickly selected directly in the constructor of the dashboard. Further plots like a MeanEpisodeRewardPlot or self-defined ones have to be instantiated and passed to the dashboard.

import gym_electric_motor as gem
from gym_electric_motor.visualization import MotorDashboard
from gym_electric_motor.visualization.motor_dashboard_plots import MeanEpisodeRewardPlot

# create the dashboard and define the plots
dashboard = MotorDashboard(
    state_plots = ['omega', 'i'], # Pass a list of state names or 'all' for all states to plot
    reward_plot = True, # True / False (False default)
    action_plots = [0] # 'all' plots all actions (if multiple are applied)
    additional_plots=[MeanEpisodeRewardPlot()] # Add all further plots here
)

# pass it to the environment
env = gem.make('my-env-id-v0', visualization=dashboard)

Motor Dashboard API