TorchLean API

NN.Runtime.RL.Artifacts.GridWorld.Position

GridWorld Artifact Positions #

Shared JSON encoding for GridWorld coordinates used by policy/path visualization artifacts. Positions are stored as [row, col] pairs because that format is compact, human-readable, and easy for the widgets to consume.

Encode a GridWorld position (row, col) as JSON [row, col].

Instances For

    Decode a GridWorld position (row, col) from JSON [row, col].

    The field argument is only used for nicer error messages.

    Instances For

      Encode an array of GridWorld positions as a JSON array of [row, col] pairs.

      Instances For

        Decode an array of GridWorld positions from JSON, using field only for nicer errors.

        Instances For