Howto 22 - (RL) Train DoublePendulum with SB3 Wrapper

Ver. 1.0.2 (2022-02-27)

This module shows how to use SB3 wrapper to train double pendulum

Prerequisites

Please install the following packages to run this examples properly:

Results

content/append1/rl/images/DoublePendulum.png

The Double Pendulum environment window should appear. Afterwards, the training should run for a few episodes before terminating and printing the result. The training log is also stored in the location specified.

YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment DoublePendulum: Instantiated
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment DoublePendulum: Instantiated
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment DoublePendulum: Operation mode set to 0
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment DoublePendulum: Reset
YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: ------------------------------------------------------------------------------
YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: ------------------------------------------------------------------------------
YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: -- Training run 0 started...
YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: ------------------------------------------------------------------------------
YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: ------------------------------------------------------------------------------

YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: ------------------------------------------------------------------------------
YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: -- Evaluation period 0 started...
YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: ------------------------------------------------------------------------------

YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: ------------------------------------------------------------------------------
YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: -- Evaluation episode 0 started...
YYYY-MM-DD  HH:MM:SS.SSSSSS  W  Training RL: ------------------------------------------------------------------------------
...
In the folder, there should be some files including:
  • agent_actions.csv

  • env_rewards.csv

  • env_states.csv

  • evaluation.csv

  • summary.csv

  • trained model.pkl

Example Code