package fehu

  1. Overview
  2. Docs
Reinforcement learning for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

raven-1.0.0.alpha3.tbz
sha256=96d35ce03dfbebd2313657273e24c2e2d20f9e6c7825b8518b69bd1d6ed5870f
sha512=90c5053731d4108f37c19430e45456063e872b04b8a1bbad064c356e1b18e69222de8bfcf4ec14757e71f18164ec6e4630ba770dbcb1291665de5418827d1465

doc/fehu.envs/Fehu_envs/Mountain_car/index.html

Module Fehu_envs.Mountain_carSource

Mountain car with sparse reward (MountainCar-v0).

A car sits in a valley between two hills. The engine is too weak to climb the right hill directly; the agent must build momentum by rocking back and forth. Reward is -1.0 per step. The episode terminates when the car reaches position >= 0.5 with non-negative velocity, and truncates at 200 steps.

Observation: Fehu.Space.spec.Box of shape [2] -- position, velocity.

Actions: Fehu.Space.spec.Discrete 3 -- 0 = push left, 1 = coast, 2 = push right.

Render modes: ansi.

Sourcetype obs = (float, Nx.float32_elt) Nx.t
Sourcetype act = (int32, Nx.int32_elt) Nx.t
Sourcetype render = string
Sourceval make : ?render_mode:Fehu.Env.render_mode -> unit -> (obs, act, render) Fehu.Env.t

make () is a mountain car environment.