clone

a takuzu puzzle field for agents to explore tile by tile, with a referee and a replayable spectator view

daily: band 24 and a 256 MiB GOMEMLIMIT per engine process (gen-v6 nightly config)

dami committed 09eb5c4
commit
09eb5c46458f9ad9f98d5773ffcda99b63e179dd
parent
a58d774ae0f50b8aaca90c52342558a05714cf0d
author
dami <gazey55@gmail.com>
5 files changed, +16 -2
Mfly.toml2++
Msite/lib/daily.ts3+++
Msite/lib/engine.ts10++++++++--
Msite/scripts/push-day.ts2++
Msite/tests/daily_test.ts1+
M fly.toml +2 -0
M site/lib/daily.ts +3 -0
M site/lib/engine.ts +8 -2
@@ -87,6 +87,9 @@ async function run(
8787 stdin: stdin === undefined ? "null" : "piped",8888 stdout: "piped",8989 stderr: "piped",90+ // a soft heap limit per engine process (each chunk is its own process91+ // and inherits it): the box has 2 GB for everything92+ env: { GOMEMLIMIT: Deno.env.get("MOSAIC_GOMEMLIMIT") ?? "256MiB" },9093 });9194 const child = cmd.spawn();9295 if (stdin !== undefined) {
@@ -159,8 +162,10 @@ export type GenParams = {
159162 /** field only: pre-generate this many growth rings ("all" = until the160163 * field is full); the engine emits {base, rings: [delta, ...]} */161164 rings?: number | "all";162- /** field only: chunk processes at once (1 on the hosted box) */165+ /** field only: chunk processes at once (2 on the hosted box) */163166 jobs?: number;167+ /** field only: overlap band between chunk regions (24 is cheapest) */168+ band?: number;164169 /** field only: the engine's own overall budget, seconds */165170 timeout_s?: number;166171 };
@@ -182,6 +187,7 @@ export function genArgs(p: GenParams): string[] {
182187 ...(p.field_g ? ["--G", String(p.field_g)] : []),183188 ...(p.rings !== undefined ? ["--rings", String(p.rings)] : []),184189 ...(p.jobs ? ["--jobs", String(p.jobs)] : []),190+ ...(p.band ? ["--band", String(p.band)] : []),185191 ...(p.timeout_s ? ["--timeout", `${p.timeout_s}s`] : []),186192 ];187193 }
@@ -207,7 +213,7 @@ export async function cacheFile(p: GenParams): Promise<string> {
207213 const key = await sha256(208214 `${await version()}|${p.seed}|${p.G}|${p.kind}|${p.n ?? ""}|${209215 p.chunks ?? ""210- }|${p.chunk_g ?? ""}|${p.field_g ?? ""}|${p.rings ?? ""}`,216+ }|${p.chunk_g ?? ""}|${p.field_g ?? ""}|${p.rings ?? ""}|${p.band ?? ""}`,211217 );212218 return `${cacheDir()}${key}.json`;213219 }
M site/scripts/push-day.ts +2 -0
M site/tests/daily_test.ts +1 -0