Fork me on GitHub

Quick Start with the Controller

In this section, we will give you a brief introduction how to use the C++ implementation of a controller to run experiments with BOLeRo.

We call the application that runs experiments in BOLeRo “controller”. It reads configuration files and connects learning algorithms and problems. An experiment in BOLeRo can be specified with only one YAML file.

You can run the controller with

bolero_controller

You can configure it with two environment variables:

  • BL_LOG_PATH - the path in which results will be logged, default: “.”
  • BL_CONF_PATH - the path from which we load the configuration file, default: “.”

The configuration file is called learning_config.yml. It will have the following form:

Environment:
    type: ...
    ...
BehaviorSearch:
    type: ...
    ...
Controller:
    MaxEvaluations: 1000
    LogAllBehaviors: false
    GenerateFitnessLog: true
    LogResults: false
    EvaluateExperiment: false
    TestEveryXRun: 0

Results will be stored in a directory that you specified. That includes fitness values and intermediate results.

Example

The following configuration will run Monte Carlo Reinforcement Learning on the environment FrozenLake-v0 from OpenAI Gym.

Controller:
    MaxEvaluations: 10000
    GenerateFitnessLog: true
    LogResults: true
    TestEveryXRun: 100
Environment:
    type: bolero.environment.OpenAiGym
    env_name: FrozenLake-v0
BehaviorSearch:
    type: bolero.behavior_search.MonteCarloRL
    action_space: [0, 1, 2, 3]