Fork me on GitHub

bolero.environment.SetContext

class bolero.environment.SetContext(contextual_environment, context)[source]

A contextual environment with a fixed context.

Parameters:
contextual_environment : ContextualEnvironment

Environment that we want to wrap

context : array-like, shape (n_context_dims,)

Specific context

__init__(contextual_environment, context)[source]
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 feedback obtainable.

get_num_inputs()[source]

Get number of environment inputs.

Parameters:
n : int

number of environment inputs

get_num_outputs()[source]

Get number of environment outputs.

Parameters:
n : int

number of environment outputs

get_outputs(values)[source]

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

Parameters:
values : array

outputs for 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.