StateCriticInput

class maze.core.agent.state_critic_input_output.StateCriticInput

State Critic output defined as it’s own type, since it has to be explicitly build to be compatible with shared embedding networks.

property actor_ids

List of actor IDs for the individual sub-steps.

append(item: maze.core.agent.state_critic_input_output.StateCriticStepInput)None

Append an CriticStepInput object to the Critic input internal list.

Parameters

item – The item to add.

classmethod build(policy_output: maze.core.agent.torch_policy_output.PolicyOutput, record: maze.core.trajectory_recording.records.structured_spaces_record.StructuredSpacesRecord)maze.core.agent.state_critic_input_output.StateCriticInput

Build the critic input from the policy outputs and the spaces record (policy input).

This method is responsible for building a List that hold the appropriate input for each critic w.r.t. the substep and the shared-embedding-keys.

Parameters
  • policy_output – The full policy output.

  • record – The structured spaces record used to compute the policy output.

Returns

A Critic input.

property substep_inputs

List of CriticStepInputs for the individual sub-steps.

property tensor_dict

List of tensor dicts for the individual sub-steps.