About this project
Reinfors is a reinforcement-learning framework that executes game simulation, tree search, episode orchestration, and batch assembly in a parallel Rust backend. The boundary between the Rust engine and the user is an inference callback: it receives pooled NumPy observations and returns model outputs, leaving the network architecture, training framework, optimizer, replay buffer, hardware placement, and distributed topology entirely under the caller's control.
The library includes a broad catalogue of games covering single- and multi-agent, zero-sum, cooperative, and general-sum tasks, with support for turn-taking or simultaneous decisions, explicit chance events, and both perfect and imperfect information. Algorithms span policy-driven value learning, search-guided learning, and standalone game-theoretic solving methods.
Installation is via pip with `pip install reinfors`, with optional extras for Gymnasium/PettingZoo adapters (`reinfors[gym]`) and PyTorch training examples (`reinfors[train]`). A simple example creates a Connect4 engine and collects training batches by providing an inference function.
Benchmarking shows significant performance gains over pure Python RL libraries like Gymnasium, with reported speedups of roughly 14-20x on single-threaded environment stepping. Reinfors also targets a practical balance between native simulation performance and modularity for broad experimentation across games, algorithms, networks, and deployment configurations.
The project is pre-1.0, meaning APIs, behaviors, and serialized formats may change between 0.x releases without deprecation warnings. Users are advised to pin exact versions and consult release notes when upgrading. It is dual-licensed under MIT and Apache-2.0.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.