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/Cartpole/index.html

Module Fehu_envs.CartpoleSource

Classic cart-pole balancing (CartPole-v1).

A pole is attached to a cart on a frictionless track. The agent pushes the cart left or right to keep the pole upright. Reward is +1.0 per step while the pole stays up. The episode terminates when the pole exceeds +/-12 degrees or the cart leaves +/-2.4, and truncates at 500 steps.

Observation: Fehu.Space.spec.Box of shape [4] -- x, x_dot, theta, theta_dot.

Actions: Fehu.Space.spec.Discrete 2 -- 0 = push left, 1 = 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 cart-pole environment.