RemiFabre commited on
Commit
17f0d47
·
1 Parent(s): aed7f83

Deploy browser player — run4/ckpt-037888 elo 2361.0

Browse files
js/app.js CHANGED
@@ -154,6 +154,56 @@ const shareButtons = [true, false].map((value) => {
154
  return b;
155
  });
156
  settings.panel.append(shareGroup);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  function syncShare() {
158
  shareButtons.forEach((b, i) => {
159
  b.setAttribute("aria-pressed", String((i === 0) === sharingOn()));
@@ -294,25 +344,34 @@ async function bootEngine() {
294
  } catch (err) {
295
  /* private mode */
296
  }
297
- // a returning player keeps their chosen opponent; everyone else faces the
298
- // strongest net available, whatever it is called by then
299
- bot = bots.find((b) => b.id === storedId) || strongestBot();
300
- if (bots.length > 1) {
301
- ui.botField.hidden = false;
302
- ui.bot.innerHTML = "";
303
- for (const b of bots) {
304
- const option = document.createElement("option");
305
- option.value = b.id;
306
- const elo = b.meta && typeof b.meta.elo === "number" ? ` · ${Math.round(b.meta.elo)} Elo` : "";
307
- option.textContent = b.name + elo;
308
- ui.bot.appendChild(option);
309
- }
310
- ui.bot.value = bot.id;
311
- syncBotChip();
312
- }
313
  await loadBot(bot);
314
  }
315
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  /** Download one bot's net into the worker and, once ready, deal. */
317
  async function loadBot(b) {
318
  bot = b;
@@ -422,7 +481,8 @@ function describeModel() {
422
  /* ---------------------------------------------------------------- the boards */
423
  /** The strongest entry in the roster: the one that gives advice. */
424
  function strongestBot() {
425
- return bots.reduce((a, b) =>
 
426
  ((b.meta && b.meta.elo) || 0) > ((a.meta && a.meta.elo) || 0) ? b : a
427
  );
428
  }
 
154
  return b;
155
  });
156
  settings.panel.append(shareGroup);
157
+
158
+ /* Experimental opponents: nets that beat the current strongest at matched
159
+ * think time but by less than the +150 the ladder demands (docs/
160
+ * BOT_DEPLOYMENT.md). Hidden by default; never the default opponent, never
161
+ * the adviser. Stored like every other preference (no cookies). */
162
+ function experimentalOn() {
163
+ try {
164
+ return localStorage.getItem("faience.experimental") === "on";
165
+ } catch (err) {
166
+ return false;
167
+ }
168
+ }
169
+ function setExperimental(on) {
170
+ try {
171
+ localStorage.setItem("faience.experimental", on ? "on" : "off");
172
+ } catch (err) {
173
+ /* private mode: the switch lasts for this tab */
174
+ }
175
+ }
176
+ settings.panel.append(
177
+ node("i", "settings-gap"),
178
+ node("span", "settings-label", "Experimental opponents")
179
+ );
180
+ const experimentalGroup = node("div", "speeds");
181
+ experimentalGroup.setAttribute("role", "group");
182
+ experimentalGroup.setAttribute("aria-label", "Experimental opponents");
183
+ const experimentalButtons = [true, false].map((value) => {
184
+ const b = node("button", "flag", value ? "On" : "Off");
185
+ b.type = "button";
186
+ b.dataset.experimental = String(value);
187
+ b.title = value
188
+ ? "Also list nets that beat the strongest opponent, but not by enough to take its place yet."
189
+ : "Only the regular ladder.";
190
+ b.addEventListener("click", () => {
191
+ setExperimental(value);
192
+ syncExperimental();
193
+ fillBotMenu();
194
+ if (!value && bot && bot.experimental) loadBot(strongestBot());
195
+ say(value ? "experimental opponents listed" : "experimental opponents hidden");
196
+ });
197
+ experimentalGroup.appendChild(b);
198
+ return b;
199
+ });
200
+ settings.panel.append(experimentalGroup);
201
+ function syncExperimental() {
202
+ experimentalButtons.forEach((b, i) => {
203
+ b.setAttribute("aria-pressed", String((i === 0) === experimentalOn()));
204
+ });
205
+ }
206
+ syncExperimental();
207
  function syncShare() {
208
  shareButtons.forEach((b, i) => {
209
  b.setAttribute("aria-pressed", String((i === 0) === sharingOn()));
 
344
  } catch (err) {
345
  /* private mode */
346
  }
347
+ // a returning player keeps their chosen opponent (if it is still listed);
348
+ // everyone else faces the strongest net available, whatever it is called
349
+ bot = visibleBots().find((b) => b.id === storedId) || strongestBot();
350
+ fillBotMenu();
 
 
 
 
 
 
 
 
 
 
 
 
351
  await loadBot(bot);
352
  }
353
 
354
+ /** The roster as the player sees it: experimental entries only when asked for. */
355
+ function visibleBots() {
356
+ return bots.filter((b) => !b.experimental || experimentalOn());
357
+ }
358
+
359
+ /** (Re)build the opponent menu from the visible roster. */
360
+ function fillBotMenu() {
361
+ const visible = visibleBots();
362
+ ui.botField.hidden = visible.length <= 1;
363
+ ui.bot.innerHTML = "";
364
+ for (const b of visible) {
365
+ const option = document.createElement("option");
366
+ option.value = b.id;
367
+ const elo = b.meta && typeof b.meta.elo === "number" ? ` · ${Math.round(b.meta.elo)} Elo` : "";
368
+ option.textContent = b.name + elo;
369
+ ui.bot.appendChild(option);
370
+ }
371
+ if (bot) ui.bot.value = bot.id;
372
+ syncBotChip();
373
+ }
374
+
375
  /** Download one bot's net into the worker and, once ready, deal. */
376
  async function loadBot(b) {
377
  bot = b;
 
481
  /* ---------------------------------------------------------------- the boards */
482
  /** The strongest entry in the roster: the one that gives advice. */
483
  function strongestBot() {
484
+ const regular = bots.filter((b) => !b.experimental);
485
+ return (regular.length ? regular : bots).reduce((a, b) =>
486
  ((b.meta && b.meta.elo) || 0) > ((a.meta && a.meta.elo) || 0) ? b : a
487
  );
488
  }
model/bots.json CHANGED
@@ -1,14 +1,12 @@
1
  {
2
  "comment": "The opponents the page offers, weakest first: the ceramics ladder, from raw ground to precious glaze. Each dir holds a model.onnx + model_meta.json (the meta carries the Elo and parameter count the menu shows; run/checkpoint stay internal). Five of the swatch colours are the game's own tile glazes; Sand and Clay are the two raw earths beneath them. scripts/deploy_player.sh ships this whole tree.",
3
  "reserved_for_future_nets": {
4
- "comment": "The next rungs of the ladder, in order, for agents stronger than Cobalt. THE FULL SHIPPING PROCEDURE AND THE BAR (at least +150 wall-clock-honest Elo over the current strongest, gated over >=300 games at matched think time) IS IN docs/BOT_DEPLOYMENT.md — follow it; it is self-contained. Do not rename existing bots; the page defaults to the strongest by the elo in model_meta.json automatically.",
5
  "names": [
6
- "Lapis Lazuli",
7
  "Ultramarine"
8
  ],
9
  "suggested_swatches": {
10
- "Ultramarine": "#1a1f6e",
11
- "Lapis Lazuli": "#2b3a8f"
12
  }
13
  },
14
  "bots": [
@@ -59,6 +57,13 @@
59
  "name": "Porcelain",
60
  "dir": "model/porcelain",
61
  "swatch": "#f4efe4"
 
 
 
 
 
 
 
62
  }
63
  ]
64
  }
 
1
  {
2
  "comment": "The opponents the page offers, weakest first: the ceramics ladder, from raw ground to precious glaze. Each dir holds a model.onnx + model_meta.json (the meta carries the Elo and parameter count the menu shows; run/checkpoint stay internal). Five of the swatch colours are the game's own tile glazes; Sand and Clay are the two raw earths beneath them. scripts/deploy_player.sh ships this whole tree.",
3
  "reserved_for_future_nets": {
4
+ "comment": "The next rungs of the ladder, in order, for agents stronger than Cobalt. THE FULL SHIPPING PROCEDURE AND THE BAR (at least +150 wall-clock-honest Elo over the current strongest, gated over >=300 games at matched think time) IS IN docs/BOT_DEPLOYMENT.md — follow it; it is self-contained. Do not rename existing bots; the page defaults to the strongest by the elo in model_meta.json automatically. An entry with \"experimental\": true is hidden unless the player turns on 'Experimental opponents' in Settings, never becomes the default or the adviser, and needs no gate: it is how a net that is stronger but below the +150 bar can be offered (Lapis Lazuli, 2026-09-06, +109 over Porcelain over 300 games).",
5
  "names": [
 
6
  "Ultramarine"
7
  ],
8
  "suggested_swatches": {
9
+ "Ultramarine": "#1a1f6e"
 
10
  }
11
  },
12
  "bots": [
 
57
  "name": "Porcelain",
58
  "dir": "model/porcelain",
59
  "swatch": "#f4efe4"
60
+ },
61
+ {
62
+ "id": "lapis_lazuli",
63
+ "name": "Lapis Lazuli",
64
+ "dir": "model/lapis_lazuli",
65
+ "swatch": "#2b3a8f",
66
+ "experimental": true
67
  }
68
  ]
69
  }
model/lapis_lazuli/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6712a2a60e71166a29465ce7d39201fff2109074d23909f98185f5f6157567d0
3
+ size 15793356
model/lapis_lazuli/model_meta.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "porc_w-p0905-2038",
3
+ "checkpoint": "ckpt-096768",
4
+ "elo": 2673.0,
5
+ "games": 96768,
6
+ "exported_at": "2026-09-06T09:26:46Z",
7
+ "input_size": 182,
8
+ "action_space": 180,
9
+ "net_config": {
10
+ "arch": "structured",
11
+ "input_size": 182,
12
+ "action_space": 180,
13
+ "embed": 160,
14
+ "layers": 1,
15
+ "heads": 5,
16
+ "ffn_mult": 2,
17
+ "body": 1536,
18
+ "body_blocks": 1,
19
+ "value_hidden": 160,
20
+ "policy_rank": 40,
21
+ "policy_global": true,
22
+ "margin_head": true,
23
+ "aux_heads": false,
24
+ "version": 2
25
+ },
26
+ "num_params": 3915019,
27
+ "outputs": [
28
+ "policy",
29
+ "value",
30
+ "margin"
31
+ ],
32
+ "has_margin": true,
33
+ "has_aux": false,
34
+ "opset": 17,
35
+ "onnx_bytes": 15793356,
36
+ "onnx_sha256": "6712a2a60e71166a29465ce7d39201fff2109074d23909f98185f5f6157567d0",
37
+ "parity": {
38
+ "checked": true,
39
+ "n": 100,
40
+ "policy_max_abs_diff": 1.3589859008789062e-05,
41
+ "value_max_abs_diff": 3.3080577850341797e-06,
42
+ "tol": 0.0001,
43
+ "margin_max_abs_diff": 1.5497207641601562e-06
44
+ },
45
+ "source_checkpoint": "runs/porc_w-p0905-2038/checkpoints/ckpt-096768.pt",
46
+ "torch_reference": "/Users/remi/ludometer/web/player/test/fixtures/torch_reference.json.gz"
47
+ }
model/model_meta.json CHANGED
@@ -3,7 +3,7 @@
3
  "checkpoint": "ckpt-037888",
4
  "elo": 2361.0,
5
  "games": 37888,
6
- "exported_at": "2026-09-05T19:39:34Z",
7
  "input_size": 182,
8
  "action_space": 180,
9
  "net_config": {
 
3
  "checkpoint": "ckpt-037888",
4
  "elo": 2361.0,
5
  "games": 37888,
6
+ "exported_at": "2026-09-06T09:26:47Z",
7
  "input_size": 182,
8
  "action_space": 180,
9
  "net_config": {