From d2b0427ec6f9b32cc03fe9edc452cfa40ded1f4f Mon Sep 17 00:00:00 2001
From: monkey-w1n5t0n
Date: Mon, 29 Jun 2026 00:36:32 +0200
Subject: [PATCH] feat(manifold): default to geometric push + add Clear
examples button
Geometric-dislike ('Push away', Mode 1) is now the default feedback mode
instead of explore-and-place, which works poorly. Add a Clear button to
the Learning drawer that forgets all recorded examples and wipes the
on-map visuals (feedback markers + placed-anchor pins) via the existing
ctx.onClear, now also resetting pins.
---
manifold/ONBOARDING.md | 7 ++++---
manifold/src/console/ConsoleApp.tsx | 9 +++++++--
manifold/src/console/Drawers.tsx | 13 +++++++++++++
3 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/manifold/ONBOARDING.md b/manifold/ONBOARDING.md
index c698181..d432563 100644
--- a/manifold/ONBOARDING.md
+++ b/manifold/ONBOARDING.md
@@ -196,9 +196,10 @@ a setting → `--r-*` tokens.
### Feedback — `src/feedback/`
- `controller.ts` (**~490 lines**) — `FeedbackController`, framework-neutral, owned by ConsoleApp.
- Two modes: **explore-and-place** (default, Mode 2, positive-only — drives the C++ core's
- snapshot/scratchpad/undo lifecycle; caller accumulates anchors and trains on finalise with
- warm-start) and **geometric-dislike** (Mode 1, selectable). Solo/arm via per-output mask.
+ Two modes: **geometric-dislike** (default, Mode 1, "Push away" — down carves the current sound
+ away from what you like, directed repulsion) and **explore-and-place** (Mode 2, positive-only,
+ selectable — drives the C++ core's snapshot/scratchpad/undo lifecycle; caller accumulates anchors
+ and trains on finalise with warm-start). Solo/arm via per-output mask.
- `rng.ts` — `SeededRng` (deterministic xorshift32 + gaussian). **Stand-in** until the C++ nudge owns
the stream — not bit-identical to `nisps::Rng`.
- **`--- C++ GAP ---` markers** flag behaviour approximated in TS pending C++ port: true geometric
diff --git a/manifold/src/console/ConsoleApp.tsx b/manifold/src/console/ConsoleApp.tsx
index aca34b7..6aa41b0 100644
--- a/manifold/src/console/ConsoleApp.tsx
+++ b/manifold/src/console/ConsoleApp.tsx
@@ -112,8 +112,9 @@ export function ConsoleApp({ focus: initialFocus = 'composite' }: ConsoleAppProp
const [sandwich, setSandwich] = useState(false);
// Learning-behaviour store (dock-spec §1; rl-feedback-design). Default
- // feedback mode = "Explore and place"; default solo = "Mask gradients".
- const [feedbackMode, setFeedbackModeState] = useState('explore-and-place');
+ // feedback mode = "Push away" (geometric); default solo = "Mask gradients".
+ // (Explore-and-place is selectable but the geometric push is the better default.)
+ const [feedbackMode, setFeedbackModeState] = useState('geometric-dislike');
const [soloMode, setSoloMode] = useState('mask-gradients');
const [exploring, setExploring] = useState(false);
const [learningPaused, setLearningPaused] = useState(false);
@@ -654,10 +655,14 @@ export function ConsoleApp({ focus: initialFocus = 'composite' }: ConsoleAppProp
onAddExample: addExample,
onTrain: train,
onClear: () => {
+ // Drop the recorded training examples AND every on-map visual that
+ // represents them (feedback markers + placed-anchor pins). The cursor
+ // trail is ephemeral and self-decays, so it needs no explicit reset.
engine?.clearExamples();
setExamples(0);
setLoss([]);
setMarkers([]);
+ setPins([]);
},
snapshots,
onJump: (id) => {
diff --git a/manifold/src/console/Drawers.tsx b/manifold/src/console/Drawers.tsx
index d0993ae..9fcfcf1 100644
--- a/manifold/src/console/Drawers.tsx
+++ b/manifold/src/console/Drawers.tsx
@@ -168,6 +168,19 @@ function LearningDrawer(ctx: ConsoleCtx, depth: DrawerDepth) {
)}
+ Recorded examples
+
+
+ {ctx.datasetCount} example{ctx.datasetCount === 1 ? '' : 's'}
+
+
+
+ forget every example & wipe the on-map marks
+
+
+
{depth === 'expanded' && (
<>
Solo / arm scope