1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00
Files
coach/rl_coach/presets
Gal Novik c9738280fd Require Python 3.6 + Changes to CI configuration (#452)
* Change build_*_env jobs to pull base image of current "tag"
  instead of "master" image
* Change nightly flow so build_*_env jobs now gated by build_base (so
  change in previous bullet works in nightly)
* Bugfix in CheckpointDataStore: Call to object.__init__ with
  parameters
* Disabling unstable Doom A3C and ACER golden tests
2020-07-26 16:11:22 +03:00
..
2018-08-13 17:11:34 +03:00
2019-03-17 15:33:28 +02:00
2018-10-02 13:43:36 +03:00
2018-10-02 13:43:36 +03:00
2018-10-02 13:43:36 +03:00
2019-06-16 11:11:21 +03:00
2019-02-20 23:52:34 +02:00
2019-06-16 11:11:21 +03:00
2019-03-19 18:07:09 +02:00
2018-10-24 18:27:58 -07:00
2019-06-16 11:11:21 +03:00
2019-03-19 18:07:09 +02:00
2019-06-16 11:11:21 +03:00
2019-08-28 21:15:58 +03:00
2019-05-01 18:37:49 +03:00
2019-06-16 11:11:21 +03:00
2018-10-02 13:43:36 +03:00
2019-06-16 11:11:21 +03:00

Defining Presets

In Coach, we use a Preset mechanism in order to define reproducible experiments. A Preset defines all the parameters of an experiment in a single file, and can be executed from the command line using the file name. Presets can be very simple by using the default parameters of the algorithm and environment. They can also be explicit and define all the parameters in order to avoid hidden logic. The outcome of a preset is a GraphManager.

Let's start with the simplest preset possible. We will define a preset for training the CartPole environment using Clipped PPO. The 3 minimal things we need to define in each preset are the agent, the environment and a schedule.

from rl_coach.agents.clipped_ppo_agent import ClippedPPOAgentParameters
from rl_coach.environments.gym_environment import GymVectorEnvironment
from rl_coach.graph_managers.basic_rl_graph_manager import BasicRLGraphManager
from rl_coach.graph_managers.graph_manager import SimpleSchedule

graph_manager = BasicRLGraphManager(
    agent_params=ClippedPPOAgentParameters(),
    env_params=GymVectorEnvironment(level='CartPole-v0'),
    schedule_params=SimpleSchedule()
)

Most presets in Coach are much more explicit than this. The motivation behind this is to be as transparent as possible regarding all the changes needed relative to the basic parameters defined in the algorithm paper.