train-kit / site / index.html
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>train-kit.git — the learning half of an ardegazu.ro bot</title>
<style>
  :root {
    color-scheme: dark;
    --paper: #171520; --ink: #eae6f2; --ink-soft: #a49fb5;
    --line: #2b2838; --card: #1e1c2a; --code-bg: #272334; --sage-d: #93c1a5;
  }
  @media (prefers-color-scheme: light) {
    :root {
      color-scheme: light;
      --paper: #faf6ee; --ink: #35322c; --ink-soft: #6f6a5e;
      --line: #e5ddcd; --card: #fffdf8; --code-bg: #f1ead9; --sage-d: #6fa284;
    }
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    background: var(--paper); color: var(--ink);
    font: 16.5px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif;
    padding: 64px 22px 90px;
  }
  main { max-width: 660px; margin: 0 auto; }
  h1 { font-size: 40px; font-weight: 600; letter-spacing: -.4px; }
  .tag { margin: 14px 0 34px; font-size: 18px; color: var(--ink-soft); }
  h2 { font-size: 20px; font-weight: 600; margin: 36px 0 10px; }
  p { margin: 10px 0; }
  a { color: var(--sage-d); }
  pre {
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    padding: 13px 16px; overflow-x: auto; margin: 14px 0;
    font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  }
  code { font: 15px ui-monospace, SFMono-Regular, Menlo, monospace;
    background: var(--code-bg); border-radius: 5px; padding: 1px 6px; }
  pre code { background: none; padding: 0; }
  ul { padding-left: 22px; } li { margin: 6px 0; }
  footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line);
    font-size: 14px; color: var(--ink-soft); }
  footer a { color: inherit; }
</style>
</head>
<body>
<main>
  <h1>train-kit.git</h1>
  <p class="tag">the learning half of an <a href="https://ardegazu.ro">ardegazu.ro</a>
  bot — plain-JSON checkpoints a 40-line forward pass can replay, episode
  logs, DQN fit helpers, and the promotion gate that decides what ships.</p>

  <h2>Clone</h2>
  <pre><code>git clone https://git.ardegazu.ro/train-kit.git</code></pre>
  <p>or <a href="browse/index.html">browse the code</a> right here, in the
  browser.</p>

  <h2>Use as a dependency</h2>
  <pre><code>"ardegazu-train-kit": "git+https://git.ardegazu.ro/train-kit.git#v1.0.0"</code></pre>

  <h2>What's inside</h2>
  <ul>
    <li>MLP and tabular checkpoint shapes as plain JSON, with the tiny
      forward pass live bots run — no ML framework in the bot process</li>
    <li>append-only episode JSONL and the byte-offset reader that lets a
      trainer ingest every bot's transitions exactly once</li>
    <li>atomic checkpoint files with interval reloads — one trainer writes,
      every bot picks it up within a minute</li>
    <li>frozen-target DQN helpers and tabular Bellman updates; tfjs-node is
      an optional peer the trainer alone loads</li>
    <li>the promotion gate's file dance: a model ships only after it beats
      the stock baseline the bots were already playing</li>
    <li><code>docs/NEW-BRAIN-PROMPT.md</code> — the full recipe for teaching
      the bot fleet a new suite game</li>
  </ul>

  <h2>The loop</h2>
  <pre><code>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);</code></pre>

  <footer>
    part of the <a href="https://git.ardegazu.ro/">ardegazu.ro source ecosystem</a>
    · MIT · built quietly
  </footer>
</main>
</body>
</html>

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/train-kit.git