class_docstr: Heuristic agent. Always picks the smallest piece possible for cutting (by area).
  
  :param action_conversion: ActionConversionInterface.
class_docstr_tok: ["Heuristic","agent",".","Always","picks","the","smallest","piece","possible","for","cutting","(","by","area",")",".",":","param","action_conversion",":","ActionConversionInterface","."]
docstr: implementation of :class:`~maze.core.agent.policy.Policy` interface
          
docstr_tok: ["implementation","of",":","class",":","`","~maze.core.agent.policy.Policy","`","interface"]
code: def compute_action(
      self,
      observation: ObservationType,
      maze_state: Optional[MazeStateType] = None,
      env: Optional[BaseEnv] = None,
      actor_id: Optional[ActorID] = None,
      deterministic: bool = False,
  ) -> ActionType:
      """implementation of :class:`~maze.core.agent.policy.Policy` interface"""
      candidates = self.get_candidate_pieces(observation)
  
      if len(candidates) == 0:
          # No piece fits => this should not happen (we should always have the full-size raw piece in stock)
          raise ValueError(
              "No piece in inventory fits the given order."
          )
  
      # convert MazeAction to agent action
      return self.action_conversion.maze_to_space(candidates[0])
  
imports: from typing import Dict, Sequence, Tuple, Union, Optional
  import numpy
  from maze.core.agent.policy import Policy
  from maze.core.annotations import override
  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.utils.factory import Factory, ConfigType
  from maze_envs.logistics.cutting_2d.env.maze_action import Cutting2DMazeAction
  from maze_envs.logistics.cutting_2d.space_interfaces.action_conversion.base import BaseActionConversion
label_desc: Use image node_id 6 for calling the GreedyPolicy obj's underlying member method code with example usage: obj.compute_action(observation, maze_state, env, actor_id, deterministic) and returns: self