class maze.core.log_events.kpi_calculator.KpiCalculator

Interface for calculating KPI metrics. If available, is called by statistics wrapper at the end of each episode.

abstract calculate_kpis(episode_event_log: maze.core.log_events.episode_event_log.EpisodeEventLog, last_maze_state: Any) → Dict[str, float]

Compute KPIs for the current episode.

This is expected to be called once at the end of the episode, if statistics logging is enabled.

  • episode_event_log – Log of events recorded during the past episode.

  • last_maze_state – State of the environment at the end of the episode


Values of KPI metrics in the format {kpi_name: kpi_value}