Fork me on GitHub

bolero.environment.Environment

class bolero.environment.Environment[source]

Common interface for environments.

An environment can execute actions, measure states and compute rewards. It defines a learning problem.

__init__()

x.__init__(…) initializes x; see help(type(x)) for signature

get_args()

Get parameters for this estimator.

Returns:
params : mapping of string to any

Parameter names mapped to their values.

get_feedback()[source]

Get the feedbacks for the last evaluation period.

Returns:
feedbacks : array

Feedback values

get_maximum_feedback()[source]

Returns the maximum sum of feedbacks obtainable.

get_num_inputs()[source]

Get number of environment inputs.

Parameters:
n_inputs : int

Number of environment inputs

get_num_outputs()[source]

Get number of environment outputs.

Parameters:
n_outputs : int

Number of environment outputs

get_outputs(values)[source]

Get environment outputs, e.g. state of the environment.

Parameters:
values : array

Outputs of the environment, will be modified

init()[source]

Initialize environment.

is_behavior_learning_done()[source]

Check if the behavior learning is finished.

Returns:
finished : bool

Is the learning of a behavior finished?

is_evaluation_done()[source]

Check if the evaluation of the behavior is finished.

Returns:
finished : bool

Is the evaluation finished?

reset()[source]

Reset state of the environment.

set_inputs(values)[source]

Set environment inputs, e.g. next action.

Parameters:
values : array,

Input of the environment

step_action()[source]

Take a step in the environment.