Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 2.16 KB

howto.rl.011.rst

File metadata and controls

57 lines (44 loc) · 2.16 KB

Ver. 1.0.3 (2022-03-21)

This module shows how to wrap mlpro's Environment class to gym compatible.

Prerequisites

Please install the following packages to run this examples properly:

Results

The GridWorld environment will be wrapped to a gym environment. By making use of gym's environment checker, we could confirm the success of the environment wrapping.

YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment GridWorld: Instantiated
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment GridWorld: Instantiated
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment GridWorld: Operation mode set to 0
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment GridWorld: Reset
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment GridWorld: Reset
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment GridWorld: Start processing action
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment GridWorld: Actions of agent 0 = [3.415721893310547, -7.9934492111206055]
YYYY-MM-DD  HH:MM:SS.SSSSSS  I  Environment GridWorld: Action processing finished successfully
...

There will be several more lines of action processing logs due to the nature of the environment checker. When there is no detected failure, the environment is successfully wrapped.

Example Code

.. literalinclude:: ../../../../../examples/rl/Howto 11 - (RL) Wrap mlpro Environment class to gym environment.py
    :language: python