Skip to content

MdpContext

class · namespace Hazel

Immutable context passed to MDP component Compute/Evaluate methods. Provides access to the MuJoCo scene, agent state, and per-step timing without exposing mutable engine internals. Analogous to TimeManager's StepContext: immutable during callback execution, no dynamic allocation, all data available by reference.

public sealed class MdpContext

Constructors

MdpContext(MujocoSceneComponent, RobotAgent, CommandManager, float, int, float, float[], float[])

public MdpContext(MujocoSceneComponent mujocoScene, RobotAgent agent, CommandManager commands, float dt, int stepCount, float maxEpisodeLengthS, float[] previousActions, float[] currentActions)

Properties

Agent

public RobotAgent Agent { get; }

Commands

public CommandManager Commands { get; }

CurrentActions

public float[] CurrentActions { get; }

Dt

public float Dt { get; }

MaxEpisodeLengthS

public float MaxEpisodeLengthS { get; }

MujocoScene

public MujocoSceneComponent MujocoScene { get; }

PreviousActions

public float[] PreviousActions { get; }

StepCount

public int StepCount { get; }

Source: Hazel/Learn/MdpComponent.cs