train-kit.git

the learning half of an ardegazu.ro bot — plain-JSON checkpoints a 40-line forward pass can replay, episode logs, DQN fit helpers, and the promotion gate that decides what ships.

Clone

git clone https://git.ardegazu.ro/train-kit.git

or browse the code right here, in the browser.

Use as a dependency

"ardegazu-train-kit": "git+https://git.ardegazu.ro/train-kit.git#v1.0.0"

What's inside

The loop

import { resolveModel, dqnTargets, fitNet, gatePromotion } from "ardegazu-train-kit";

const model = resolveModel(dir, game) ?? fresh();
// collect from an ardegazu-peer-kit gym vs the stock baseline …
const { xs, ys } = dqnTargets(model.net, replay, gamma);
model.net = await fitNet(model.net, xs, ys, { lr: 0.001, epochs: 2 });
// your eval decides `promoted` — the gate decides what the fleet plays
gatePromotion(dir, game, model, promoted);