Gyozas

An open-source RL framework for MILP. Ecole-style API with SCIP 8+ support and a Gymnasium-compatible interface.

Years
2025 – present
Role
Creator & Lead Developer
Team
1–2 people
Impact
Open-source RL framework for MILP research
Stack
Python · PySCIPOpt · Gymnasium · SCIP

Gyozas is an open-source reinforcement learning framework designed for combinatorial optimization research. It provides a clean, Gymnasium-compatible interface to train RL agents that make decisions inside SCIP’s branch-and-bound solver — specifically variable selection (branching) and node selection.

v1.0 was released in April 2026, after a year of private development. The library is intentionally lightweight, pip-installable in one line:

pip install gyozas

My role

Creator and Lead Developer, with minor contributions from Paul Strang. The need came from internal EDF work at the intersection of GenAI and optimization, where Ecole was a blocker — difficult to install in a corporate environment and no longer compatible with recent SCIP releases. I wanted to keep Ecole’s user-facing surface (observations, rewards, instance generators), so I reimplemented an Ecole-equivalent in pure Python on top of PySCIPOpt.


Motivation

Leading open-source MILP solvers like SCIP rely on hand-crafted heuristics for branching and node selection. Recent research — including PlanB&B (Strang et al., 2026) and BBMDP (Strang et al., 2025) — has shown that learned policies can outperform these defaults.

Until 2023, Ecole was the de facto environment for this line of work. Its last release predates SCIP 8, and running BBMDP and PlanB&B made the consequences concrete: incompatibility with current SCIP releases, and friction whenever a new observation or reward had to be prototyped through Ecole’s C++ layer.

Gyozas is the response to that experience. It provides an Ecole-style API — existing Ecole scripts port over with minor refactoring — while keeping the user-facing layer in Python, so observation functions, rewards, and instance generators can be customized without touching C++. SCIP 8+ is supported out of the box, and the library exposes both the Ecole-style interface and a standard Gymnasium interface from the same environment.


Key features

  • Dual API — Ecole-style interface for porting existing codebases and a standard Gymnasium reset()/step() interface for new work
  • SCIP 8+ support — tracks current SCIP / PySCIPOpt releases, where Ecole stopped at SCIP 7
  • Variable selection or node selection — one decision type per environment (combined mode on the roadmap)
  • Bipartite graph observations — LP-feature-based observations following Gasse et al. (2019)
  • Pluggable components — swap reward functions, observation generators, and instance generators in pure Python, no recompilation
  • Built-in problem generators — Set Cover, Independent Set, Combinatorial Auction, Facility Location (Ecole-style signatures)
  • B&B tree visualization — inspect solver behavior during and after training

Future work

  • Performance comparison with Ecole
  • Maintain performance parity with Ecole; apply cffi or numba where measurements warrant
  • Port BBMDP and PlanB&B onto Gyozas as reference use cases
  • Provide simultaneous Branching and Node selection environment
  • Adding more realistic instance generators

Quick start

Ecole-style API — port existing Ecole pipelines with minor refactoring:

import gyozas

instances = gyozas.SetCoverGenerator(n_rows=100, n_cols=200)
env = gyozas.Environment(
    instance_generator=instances,
    observation_function=gyozas.NodeBipartite(),
    reward_function=gyozas.NNodes(),
)

obs, action_set, reward, done, info = env.reset()
while not done:
    action = action_set[0]
    obs, action_set, reward, done, info = env.step(action)

A standard Gymnasium interface is also exposed by the same environment — see the documentation for the gymnasium.make(...) entry points.


Technical stack

Dynamics
Configuration, PrimalSearch, Branching selection, Node Selection
Reward functions
Node count · Solving time · LP iterations · Bound integrals (primal, dual, primal/dual)
Problem generators
Set Cover · Independent Set · Combinatorial Auction · Facility Location

References

2026

  1. Proceedings
    Planning in Branch-and-Bound: Model-Based Reinforcement Learning for Exact Combinatorial Optimization
    Paul Strang, Zacharie Alès, Côme Bissuel, Olivier Juan, Safia Kedad-Sidhoum, and Emmanuel Rachelson
    In Association for the Advancement of Artificial Intelligence (AAAI), 2026

2025

  1. Proceedings
    A Markov Decision Process for Variable Selection in Branch & Bound
    Paul Strang, Zacharie Ales, Côme Bissuel, Olivier Juan, Safia Kedad-Sidhoum, and Emmanuel Rachelson
    In Neural Information Processing Systems (NeurIPS), 2025