From 326deb9a172965300a8d8f81cfa0abb9401650f3 Mon Sep 17 00:00:00 2001 From: monkey-w1n5t0n Date: Sat, 25 Jul 2026 17:18:44 +0200 Subject: [PATCH] tune(manifold): strengthen default geometric push --- ALIGNMENT.md | 6 ++++-- docs/adr/rl-feedback-design.md | 7 +++++-- manifold/src/console/Drawers.tsx | 4 ++-- manifold/src/engine/engine-api.ts | 9 ++++++++- manifold/src/engine/index.ts | 1 + manifold/tests/e2e/geo-dislike.spec.ts | 8 +++++--- 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/ALIGNMENT.md b/ALIGNMENT.md index 22f131b..38344f8 100644 --- a/ALIGNMENT.md +++ b/ALIGNMENT.md @@ -117,8 +117,10 @@ Legacy a-immersive was mobile-first; Manifold is desktop-first. Defer until user ~1000x change end to end, and now within ~4x of the legacy Diffuse design instead of ~4100x (`ml_bench` A4). The follow-up now adopts upstream's repeated-all-negatives schedule and full-strength wall-clock lifetime through a deterministic elapsed-time - core seam. Manifold defaults to 0.001 LR, 200 Hz and 2500 ms, exposes all three in the - expanded Learning panel, and allows rate/lifetime zero as an explicit one-shot A/B. + core seam. After operator calibration, Manifold defaults to 0.003 LR, 200 Hz and + 2500 ms, exposes all three in the expanded Learning panel, and allows rate/lifetime + zero as an explicit one-shot A/B. The shared core fallback and the panel's explicit + "Upstream defaults" preset remain 0.001 LR, 200 Hz and 2500 ms. - 2026-07-25: **`InterfaceRL` is back in the tree (defect 6c).** Vendored verbatim from memllib `e291192` at `firmware/MEMLNaut-NISPS/lib/memllib/reference/` — outside `src/`, so PlatformIO never compiles it. Upstream drift in the feedback subsystem is a `diff` diff --git a/docs/adr/rl-feedback-design.md b/docs/adr/rl-feedback-design.md index babf3e1..8309f78 100644 --- a/docs/adr/rl-feedback-design.md +++ b/docs/adr/rl-feedback-design.md @@ -15,8 +15,11 @@ supersede the older `0a541cc` constants and synchronous-one-shot wording below: - a press stores the rejection and performs one immediate update, then `FeedbackControllerCore::advance_geometric(dt)` replays **all** live negatives at a configurable rate for a full-strength wall-clock lifetime; -- defaults match upstream: LR `0.001`, `200 Hz`, `2500 ms`; rate or lifetime zero is - explicit one-shot mode; +- the shared core fallback and Manifold's "Upstream defaults" experiment preset match + upstream: LR `0.001`, `200 Hz`, `2500 ms`; rate or lifetime zero is explicit one-shot + mode; +- after operator calibration on 2026-07-25, Manifold starts at LR `0.003`, `200 Hz`, + `2500 ms`; this product default does not change the firmware/core fallback; - the host supplies elapsed time, but target computation and every weight mutation stay in the allocation-free shared C++ core. Native↔WASM parity covers this seam. diff --git a/manifold/src/console/Drawers.tsx b/manifold/src/console/Drawers.tsx index 48e9d7e..12f73dd 100644 --- a/manifold/src/console/Drawers.tsx +++ b/manifold/src/console/Drawers.tsx @@ -34,7 +34,7 @@ import type { ExampleResizePolicy, NetworkResizePolicy } from '../engine/io-resh import { useEngine, useEngineVersion, - DEFAULT_GEOMETRIC_FEEDBACK_CONFIG, + UPSTREAM_GEOMETRIC_FEEDBACK_CONFIG, } from '../engine'; import { EditorPanel } from '../serial/EditorPanel'; import { TrainingHealth } from './TrainingHealth'; @@ -362,7 +362,7 @@ function LearningDrawer(ctx: ConsoleCtx, depth: DrawerDepth) { size="sm" variant="secondary" onClick={() => - ctx.setGeometricConfig({ ...DEFAULT_GEOMETRIC_FEEDBACK_CONFIG }) + ctx.setGeometricConfig({ ...UPSTREAM_GEOMETRIC_FEEDBACK_CONFIG }) } > Upstream defaults diff --git a/manifold/src/engine/engine-api.ts b/manifold/src/engine/engine-api.ts index 67ac291..c3c5124 100644 --- a/manifold/src/engine/engine-api.ts +++ b/manifold/src/engine/engine-api.ts @@ -30,12 +30,19 @@ export interface GeometricFeedbackConfig { lifetimeMs: number; } -export const DEFAULT_GEOMETRIC_FEEDBACK_CONFIG: Readonly = { +/** Verified upstream InterfaceRL replay settings, retained as an A/B preset. */ +export const UPSTREAM_GEOMETRIC_FEEDBACK_CONFIG: Readonly = { learningRate: 0.001, updatesPerSecond: 200, lifetimeMs: 2500, }; +/** Manifold's operator-calibrated product default. */ +export const DEFAULT_GEOMETRIC_FEEDBACK_CONFIG: Readonly = { + ...UPSTREAM_GEOMETRIC_FEEDBACK_CONFIG, + learningRate: 0.003, +}; + export interface EngineFeedbackApi { /** Positive feedback (thumbs-up). Returns the FeedbackAction int. */ thumbsUp(): number; diff --git a/manifold/src/engine/index.ts b/manifold/src/engine/index.ts index fec8d65..5d28067 100644 --- a/manifold/src/engine/index.ts +++ b/manifold/src/engine/index.ts @@ -9,6 +9,7 @@ export { EngineApi, createEngine, DEFAULT_GEOMETRIC_FEEDBACK_CONFIG, + UPSTREAM_GEOMETRIC_FEEDBACK_CONFIG, } from './engine-api'; export type { EngineApiOptions, diff --git a/manifold/tests/e2e/geo-dislike.spec.ts b/manifold/tests/e2e/geo-dislike.spec.ts index 3192887..90bafbc 100644 --- a/manifold/tests/e2e/geo-dislike.spec.ts +++ b/manifold/tests/e2e/geo-dislike.spec.ts @@ -89,17 +89,19 @@ test.describe('geometric dislike (Mode 1) — core-backed', () => { expect(result).toEqual({ first: 1, live: 1, second: 1, expired: 0 }); }); - test('expanded Learning panel exposes the upstream-default experiment controls', async ({ page }) => { + test('expanded Learning panel starts calibrated and can restore upstream defaults', async ({ page }) => { await page.getByTitle('Learning', { exact: true }).click(); await page.getByTitle('Expand', { exact: true }).click(); await expect(page.getByText('push · learning rate', { exact: true })).toBeVisible(); await expect(page.getByText('push · updates / second', { exact: true })).toBeVisible(); await expect(page.getByText('push · lifetime', { exact: true })).toBeVisible(); - await expect(page.getByText('0.0010', { exact: true })).toBeVisible(); + await expect(page.getByText('0.0030', { exact: true })).toBeVisible(); await expect(page.getByText('200 Hz', { exact: true })).toBeVisible(); await expect(page.getByText('2.5 s', { exact: true })).toBeVisible(); - await expect(page.getByRole('button', { name: 'Upstream defaults' })).toBeVisible(); await expect(page.getByText('≈ 500 replay updates + the press')).toBeVisible(); + + await page.getByRole('button', { name: 'Upstream defaults' }).click(); + await expect(page.getByText('0.0010', { exact: true })).toBeVisible(); }); });