What is Fehu?
mainFehu is a reinforcement learning environment toolkit for OCaml. It is designed to provide type-safe environments that follow the Gymnasium interface pattern, where environments expose reset and step methods with typed observation and action spaces.
Key capabilities include:
- Type-safe environments: Observation and action spaces are encoded in the OCaml type system.
- Composable wrappers: Transform observations, actions, or rewards (e.g.,
map_observation,map_action,map_reward,clip_action,clip_observation,time_limit). - Data handling: Trajectory collection (structure-of-arrays), replay buffers (fixed-capacity circular buffers), and GAE (generalized advantage estimation) computation.
- Execution utilities: Policy evaluation and vectorized environments for batched execution and auto-reset.