Fork me on GitHub

bolero.representation.HierarchicalBehaviorTemplate

class bolero.representation.HierarchicalBehaviorTemplate(upper_level_policy, behavior, explore=False)[source]

Behavior template that consists of an upper-level policy and a behavior.

Parameters:
upper_level_policy : UpperLevelPolicy or callable

Upper-level policy that selects the parameters of a black-box behavior for a given context

behavior : BlackBoxBehavior

A black-box behavior that is completely defined by a parameter vector of fixed size

explore : bool, optional (default: False)

Allow upper-level policy to be stochastic

__init__(upper_level_policy, behavior, explore=False)[source]
get_args()

Get parameters for this estimator.

Returns:
params : mapping of string to any

Parameter names mapped to their values.

get_behavior(context)[source]

Get behavior for a given context.

Parameters:
context : array-like, shape (n_context_dims,)

Current context

Returns:
behavior : BlackBoxBehavior

Behavior for the given context