build_gym_env: Build a new gym environment

Description Usage Arguments Required members Optional members Examples

Description

Take a function intended for training with reinforcement learning and create a valid gym environment object.

Usage

1

Arguments

...

Members to add to the new gym environment. This must contain at least a 'func', 'action_space' and 'observation_space' member

Required members

A new gym environment requires the following key members:

func

The func function you want to learn parameters for

action_space

A vector of possible actions for the func

observation_space

A vector of possible observations from the func function

Optional members

There are also the following optional members:

random

A number between 0 and 1 dictating the level of randomness applied when running the func function. A lower number means it will return the intended result less often (exploring the total observation space more often)

Examples

1
2
3
4
5
6
7
## Not run: 
build_gym_env(func = nchain_function,
  action_space = c(1, 2),
  observation_space = 1:5),
  random = 0.5
 
## End(Not run)

liamgilbey/gymr documentation built on June 1, 2019, 3:56 a.m.