Module Fehu_envs.Grid_world

5x5 grid navigation with obstacle.

The agent starts at (0, 0) and must reach the goal at (4, 4). An obstacle at (2, 2) blocks movement. Reward is +10.0 on reaching the goal, -1.0 otherwise. Truncates at 200 steps.

Observation: Fehu.Space.spec.Multi_discrete [5; 5] -- (row, col).

Actions: Fehu.Space.spec.Discrete 4 -- 0 = up, 1 = down, 2 = left, 3 = right.

Render modes: ansi, rgb_array.

type obs = (int32, Nx.int32_elt) Nx.t
type act = (int32, Nx.int32_elt) Nx.t
type render =
  1. | Text of string
  2. | Image of Fehu.Render.image
val make : ?render_mode:Fehu.Env.render_mode -> unit -> (obs, act, render) Fehu.Env.t

make () is a grid world environment.