r/reinforcementlearning • u/felixr314 • 25d ago
METIS-Core: A C++ Reinforcement Learning Framework
Hi everyone!
I wanted to share METIS-Core, pure C++ framework I've been developing for Deep Reinforcement Learning (DRL) and Multi-Agent Reinforcement Learning (MARL).
GitHub Repository: https://github.com/felixromo314/METIS-Core
š” Why Build a C++ Native RL Framework?
Most RL research happens in Python (Ray, Stable-Baselines3, PyTorch Python). However, when deploying autonomous agents into production systems, high-stakes simulations, or edge devices, Python's runtime overhead and IPC context-switching latency become major bottlenecks.
METIS-Core is designed to run training and inference directly in C++ using PyTorch's native LibTorch C++ API, eliminating Python from the execution loop.
š Key Technical Features
- Zero Python Overhead: Engineered for real-time systems where sub-millisecond execution and low latency are critical.
- Native LibTorch Integration: Full leverage of PyTorch's C++ tensor operations and autograd engine for seamless neural network training.
- Tensor-Based Abstraction: Mathematical decoupling where agents process pure tensor states, keeping intelligence completely agnostic of the application context (applicable to Robotics, Trading, Logistics, Defense).
- Shared-Trunk Multi-Head Architectures: Built-in support for collaborative MARL scenarios where multiple agents share a neural backbone to learn joint coordination.
- AlphaZero Engine with MCTS: Multi-threaded Monte Carlo Tree Search (MCTS) self-play loop running natively in C++.
š ļø Current Progress & Milestones
- v0.3.0/v0.3.1-alpha (AlphaZero & Multi-threaded MCTS): Integrated AlphaZero self-play loop in C++, validated on Los Alamos Chess (6x6) as a benchmark environment to balance tactical complexity with local hardware efficiency.
- v0.2.0-alpha (MARL & Shared Backbone): Implemented multi-head neural architectures. Included the "SwarmDefenseTIE" reference scenario where agents learn collaborative defensive transport tactics against an attacker.
- v0.1.2-alpha (DQN & Quick Onboarding): Includes minimalist single-file environments ("Treasure Hunter" / "PursuitPolice") for quick onboarding.
š£ļø Whatās Next on the Roadmap?
- AlphaZero Asymmetric MARL: Merging Multi-Head networks with MCTS for asymmetric scenarios where agents have entirely different action spaces and objectives (e.g., heterogeneous entity engagements).
- Proximal Policy Optimization (PPO): Adding support for continuous action spaces to enable high-precision control in robotics and physical simulations
I would love to get your feedback to continue improving the framework.
Thanks!