github ↗
docs menu

Module Fehu_envs.Random_walk

One-dimensional random walk.

The agent moves left or right on a line bounded by [-10; 10]. Reward is - |position|. Episodes terminate when the agent reaches a boundary or after 200 steps.

Observation: Fehu.Space.Box of shape [1] in [-10.0; 10.0].

Actions: Fehu.Space.Discrete 2 -- 0 = left, 1 = right.

Render modes: ansi.

#type act = Nx.host Nx.int32_t
#type render = string
#val make : ?render_mode:Fehu.Env.render_mode -> unit -> (obs, act, render) Fehu.Env.t

make () is a random walk environment.