class_docstr: Structured policy class designed to work with structured environments.
  (see :class:`~maze.core.env.structured_env.StructuredEnv`).
  
  It encapsulates policies and queries them for actions according to the provided policy ID.
class_docstr_tok: ["Structured","policy","class","designed","to","work","with","structured","environments",".","(","see",":","class",":","`","~maze.core.env.structured_env.StructuredEnv","`",")",".","It","encapsulates","policies","and","queries","them","for","actions","according","to","the","provided","policy","ID","."]
docstr: Get the top :num_candidates actions as well as the probabilities, q-values, .. leading to the decision.
  
  :param observation: Current observation of the environment
  :param num_candidates: The number of actions that should be returned. If None all candidates are returned.
  :param maze_state: Current state representation of the environment
                     (only provided if `needs_state()` returns True)
  :param env: The environment instance (only provided if `needs_env()` returns True)
  :param actor_id: ID of actor to query policy for
                   (does not have to be provided if policies dict contains only 1 policy)
  :return: a tuple of sequences, where the first sequence corresponds to the possible actions, the other sequence
           to the associated scores (e.g, probabilities or Q-values).
docstr_tok: ["Get","the","top",":","num_candidates","actions","as","well","as","the","probabilities",",","q-values",",","..","leading","to","the","decision",".",":","param","observation",":","Current","observation","of","the","environment",":","param","num_candidates",":","The","number","of","actions","that","should","be","returned",".","If","None","all","candidates","are","returned",".",":","param","maze_state",":","Current","state","representation","of","the","environment","(","only","provided","if","`","needs_state","(",")","`","returns","True",")",":","param","env",":","The","environment","instance","(","only","provided","if","`","needs_env","(",")","`","returns","True",")",":","param","actor_id",":","ID","of","actor","to","query","policy","for","(","does","not","have","to","be","provided","if","policies","dict","contains","only","1","policy",")",":","return",":","a","tuple","of","sequences",",","where","the","first","sequence","corresponds","to","the","possible","actions",",","the","other","sequence","to","the","associated","scores","(","e.g",",","probabilities","or","Q-values",")","."]
code: def compute_top_action_candidates(
      self,
      observation: ObservationType,
      num_candidates: Optional[int],
      maze_state: Optional[MazeStateType],
      env: Optional[BaseEnv],
      actor_id: Optional[ActorID] = None,
  ) -> Tuple[List[ActionType], List[float]]:
      """
      Get the top :num_candidates actions as well as the probabilities, q-values, .. leading to the decision.
  
      :param observation: Current observation of the environment
      :param num_candidates: The number of actions that should be returned. If None all candidates are returned.
      :param maze_state: Current state representation of the environment
                         (only provided if `needs_state()` returns True)
      :param env: The environment instance (only provided if `needs_env()` returns True)
      :param actor_id: ID of actor to query policy for
                       (does not have to be provided if policies dict contains only 1 policy)
      :return: a tuple of sequences, where the first sequence corresponds to the possible actions, the other sequence
               to the associated scores (e.g, probabilities or Q-values).
      """
  
file_path: maze/maze/core/agent/policy.py
imports: from abc import ABC, abstractmethod
  from typing import Tuple, Optional, List
  from maze.core.env.action_conversion import ActionType
  from maze.core.env.base_env import BaseEnv
  from maze.core.env.maze_state import MazeStateType
  from maze.core.env.observation_conversion import ObservationType
  from maze.core.env.structured_env import ActorID
  from maze.core.trajectory_recording.records.spaces_record import PolicyRecordType
label_desc: Use image node_id 5 for calling the Policy obj's underlying member method code with example usage: obj.compute_top_action_candidates(observation, num_candidates, maze_state, env, actor_id) without return types