Create a new solver

A solver is a module in src/coadapt/solvers/ exposing two functions. Add it to the registry and it appears in scripts/run.py and scripts/compare.py automatically.

The interface

def default_hparams(env_name):
    "Return a dict of sensible per-env hyperparameters."
    return dict(lr=3e-3, gamma=0.98, ...)

def solve(env, net, key, *, n_seeds=16, horizon=None, n_iters=200, **hp):
    "Train and return {'return_curve': [...], 'final_return': float, ...}."
    ...

What you get to reuse

Register it

# src/coadapt/solvers/__init__.py
from . import mymethod
SOLVERS = { ..., "mymethod": mymethod }

The constraint

Solvers may add machinery inside solvers/ (even recurrence — see recurrent.py, which owns its own GRU without touching agent.py). The environments, network, and agent contract stay fixed, so every solver is compared on the same problem.