From 0c72f70ddcfd299ce06dd1fcf107952fdcebbb86 Mon Sep 17 00:00:00 2001 From: William Budiatmadjaja Date: Mon, 6 Dec 2021 10:26:13 +0100 Subject: [PATCH] Howto Documentation draft #188 --- doc/rtd/content/append1/howto.bf.rst | 39 ++++++++-- doc/rtd/content/append1/howto.gt.rst | 14 +++- doc/rtd/content/append1/howto.rl.rst | 112 ++++++++++++++++++++++++--- doc/rtd/content/append1/howto.ui.rst | 13 +++- 4 files changed, 159 insertions(+), 19 deletions(-) diff --git a/doc/rtd/content/append1/howto.bf.rst b/doc/rtd/content/append1/howto.bf.rst index 04d43c240..d10828b3e 100644 --- a/doc/rtd/content/append1/howto.bf.rst +++ b/doc/rtd/content/append1/howto.bf.rst @@ -3,9 +3,38 @@ Basic Functions We provide some examples of `MLPro `_'s basic funcionalities implementation, which is available on our GitHub file. -- File 01: `(Various) Log and Timer `_ -- File 02: `(Math) Spaces, subspaces and elements `_ -- File 03: `(Various) Store, plot, and save variables `_ -- File 04: `(ML) Hyperparameters setup `_ +`(Various) Logging `_ +----------------- -Moreover, you can find the UML diagram of MLPro's basic funcionalities `here `_. +.. literalinclude:: ../../../../examples/bf/Howto 01 - (Various) Logging.py + :language: python + +`(Various) Timer `_ +----------------- + +.. literalinclude:: ../../../../examples/bf/Howto 02 - (Various) Timer.py + :language: python + +`(Math) Spaces, subspaces and elements `_ +----------------- + +.. literalinclude:: ../../../../examples/bf/Howto 03 - (Math) Spaces, subspaces and elements.py + :language: python + +`(Data) Store, plot, and save variables `_ +----------------- + +.. literalinclude:: ../../../../examples/bf/Howto 04 - (Data) Store, plot, and save variables.py + :language: python + +`(ML) Hyperparameters setup `_ +----------------- + +.. literalinclude:: ../../../../examples/bf/Howto 05 - (ML) Hyperparameters setup.py + :language: python + +`(Data) Buffer `_ +----------------- + +.. literalinclude:: ../../../../examples/bf/Howto 06 - (Data) Buffer.py + :language: python \ No newline at end of file diff --git a/doc/rtd/content/append1/howto.gt.rst b/doc/rtd/content/append1/howto.gt.rst index 4d6ecdafc..f3f1e42ea 100644 --- a/doc/rtd/content/append1/howto.gt.rst +++ b/doc/rtd/content/append1/howto.gt.rst @@ -3,7 +3,15 @@ Game Theory We provide some examples of `MLPro `_'s GT implementation, which is available on our GitHub file. -- File 06: `(GT) Run multi-player with own policy in multicartpole game board `_ -- File 07: `(GT) Train own multi-player with multicartpole game board `_ +`Run multi-player with own policy in multicartpole game board `_ +----------------- -Moreover, you can find the UML diagram of MLPro's GT funcionalities `here `_. +.. literalinclude:: ../../../../examples/gt/Howto 06 - (GT) Run multi-player with own policy in multicartpole game board.py + :language: python + + +`Train own multi-player with multicartpole game board `_ +----------------- + +.. literalinclude:: ../../../../examples/gt/Howto 07 - (GT) Train own multi-player with multicartpole game board.py + :language: python \ No newline at end of file diff --git a/doc/rtd/content/append1/howto.rl.rst b/doc/rtd/content/append1/howto.rl.rst index 31cf617d1..004d30087 100644 --- a/doc/rtd/content/append1/howto.rl.rst +++ b/doc/rtd/content/append1/howto.rl.rst @@ -3,12 +3,106 @@ Reinforcement Learning We provide some examples of `MLPro `_'s RL funcionalities implementation, which is available on our GitHub file. -- File 01: `(RL) Types of reward `_ -- File 02: `(RL) Run agent with own policy with gym environment `_ -- File 03: `(RL) Train agent with own policy on gym environment `_ -- File 04: `(RL) Run multi-agent with own policy in multicartpole environment `_ -- File 05: `(RL) Train multi-agent with own policy on multicartpole environment `_ -- File 06: `(RL) A2C Implementation `_ -- File 08: `(RL) Run own agents with petting zoo environment `_ - -Moreover, you can find the UML diagram of MLPro's RL funcionalities `here `_. +`Types of reward `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 01 - (RL) Types of reward.py + :language: python + + +`Run agent with own policy with gym environment `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 02 - (RL) Run agent with own policy with gym environment.py + :language: python + + +`Train agent with own policy on gym environment `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 03 - (RL) Train agent with own policy on gym environment.py + :language: python + + +`Run multi-agent with own policy in multicartpole environment `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 04 - (RL) Run multi-agent with own policy in multicartpole environment.py + :language: python + + +`Train multi-agent with own policy on multicartpole environment `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 05 - (RL) Train multi-agent with own policy on multicartpole environment.py + :language: python + + +`A2C Implementation `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 06 - (RL) A2C Implementation.py + :language: python + + +`Train UR5 Robot environment with A2C Algorithm `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 07 - (RL) Train UR5 Robot environment with A2C Algorithm.py + :language: python + + +`Run own agents with petting zoo environment `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 08 - (RL) Run own agents with petting zoo environment.py + :language: python + + +`SAC Implementation `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 09 - (RL) SAC Implementation.py + :language: python + + +`Train using SB3 Wrapper `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 10 - (RL) Train using SB3 Wrapper.py + :language: python + + +`Wrap mlpro Environment class to gym environment `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 11 - (RL) Wrap mlpro Environment class to gym environment.py + :language: python + + +`Wrap mlpro Environment class to petting zoo environment `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 12 - (RL) Wrap mlpro Environment class to petting zoo environment.py + :language: python + + +`Comparison Native and Wrapper SB3 Policy `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 13 - (RL) Comparison Native and Wrapper SB3 Policy.py + :language: python + + +`Train UR5 with SB3 wrapper `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 14 - (RL) Train UR5 with SB3 wrapper.py + :language: python + + +`Train Robothtm with SB3 Wrapper `_ +----------------- + +.. literalinclude:: ../../../../examples/rl/Howto 15 - (RL) Train Robothtm with SB3 Wrapper.py + :language: python \ No newline at end of file diff --git a/doc/rtd/content/append1/howto.ui.rst b/doc/rtd/content/append1/howto.ui.rst index c7c5cd0d4..2a4c9aa2a 100644 --- a/doc/rtd/content/append1/howto.ui.rst +++ b/doc/rtd/content/append1/howto.ui.rst @@ -3,6 +3,15 @@ User Interface We provide some examples of `MLPro `_'s SciUI funcionalities implementation, which is available on our GitHub file. -- File 01: `(SciUI) - Reuse of interactive 2D,3D input space `_ +`Reuse of interactive 2D,3D input space `_ +----------------- -Moreover, you can find the UML diagram of MLPro's UI funcionalities `here `_. \ No newline at end of file +.. literalinclude:: ../../../../examples/sciui/Howto 01 (SciUI) - Reuse of interactive 2D,3D input space.py + :language: python + + +`Reinforcement learning cockpit `_ +----------------- + +.. literalinclude:: ../../../../examples/sciui/Howto 02 (SciUI) - Reinforcement learning cockpit.py + :language: python \ No newline at end of file