imitation.policies.interactive#
Interactive policies that query the user for actions.
Classes
|
Interactive policy for Atari environments. |
|
Abstract class for interactive policies with discrete actions. |
|
DiscreteInteractivePolicy that renders image observations. |
- class imitation.policies.interactive.AtariInteractivePolicy(env, *args, **kwargs)[source]#
Bases:
ImageObsDiscreteInteractivePolicy
Interactive policy for Atari environments.
- features_extractor: BaseFeaturesExtractor#
- optimizer: th.optim.Optimizer#
- training: bool#
- class imitation.policies.interactive.DiscreteInteractivePolicy(observation_space, action_space, action_keys_names, clear_screen_on_query=True)[source]#
Bases:
NonTrainablePolicy
,ABC
Abstract class for interactive policies with discrete actions.
For each query, the observation is rendered and then the action is provided as a keyboard input.
- __init__(observation_space, action_space, action_keys_names, clear_screen_on_query=True)[source]#
Builds DiscreteInteractivePolicy.
- Parameters
observation_space (
Space
) – Observation space.action_space (
Space
) – Action space.action_keys_names (
OrderedDict
) – OrderedDict containing pairs (key, name) for every action, where key will be used in the console interface, and name is a semantic action name. The index of the pair in the dictionary will be used as the discrete, integer action.clear_screen_on_query (
bool
) – If True, console will be cleared on every query.
- features_extractor: BaseFeaturesExtractor#
- optimizer: th.optim.Optimizer#
- training: bool#
- class imitation.policies.interactive.ImageObsDiscreteInteractivePolicy(observation_space, action_space, action_keys_names, clear_screen_on_query=True)[source]#
Bases:
DiscreteInteractivePolicy
DiscreteInteractivePolicy that renders image observations.
- features_extractor: BaseFeaturesExtractor#
- optimizer: th.optim.Optimizer#
- training: bool#