Files
donlucasandClaude Opus 5 d02530bb54 The cat becomes a companion, and three fixes measured worse than their bugs
Two days of his design round: I drew, he ruled from rendered options.

THE CAT. It asks with its ears ("Pricked ears"), finishes with its chin up,
and walks up its own ladder -- 12x7 -> 16x9 -> 24x14, the middle rung the
Faithful Scale-Up with its nose removed, the top rung "Ruffed sit", drawn.
Before this the ask and the finish were the WORKING body: measured over 1,200
frames a pose, bodies only, 97% of a still of either was also a still of the
cat simply working. Now 0%, asserted, with Worried as the positive control.

The crab finishes "settled on the sand" with one pincer shutting every 7 s.
crabDone was DEAD ART -- it raised a claw by a single source row and the row
OR ate it, so all six half-rows were crabWork's. The finish cue has been the
eye glyph alone since it was written.

Its near eye rotates through four faces, picked on the RISING EDGE of an ask
and held. Random carries no information, which is the only reason a second
mark on that channel is legal at all.

THE OR-TRAP, which he caught from both sides. CatBody row 11 is a muzzle gap
row 10 covers, so the cat has never had a mouth on screen. A 16x9 draft grew a
nose; doubling for the top rung grew a mouth. Two general fixes were measured
and rejected -- half-row doubling flattens nine tapered rows, and filling every
covered interior gap also eats the notch between the ears.

FIXED: the cat's mid-stride drew a 16-cell side view inside the 12-cell box and
put the eyes 6 and 10 cells off the head, 4,037 times across 31 sessions ·
hyFloor ignored the horizon and allowed water above it in 81 configurations ·
the unmirrored layout paced the companion toward the frame edge · emit accepted
any word as a kind and confirmed delivery of nothing · XSCAPES_COMPANION was
double-prefixed and had never worked · the cat's parent body had no cleared rim ·
the tail could not scale, so a doubled cat arrived bald · DrawnHeadCol ignored
the mirror, which the crab's symmetric eye cells had hidden.

NOT FIXED, and both put back after measuring worse than the bug: a fractional
tide depth churns 53.62% every frame against ~64% on crossings alone; making
the star separation strict took touching pairs from 10 to 12. Carded with the
numbers. An average that passes is not a ceiling that holds.

Studies, none of them shipping behaviour: -starfall (the star arriving, 1,805
swept arrivals), -catalts (the design round), -decisions (what is still open).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P7YSpTVSL4ws8rgG1X4mtt
2026-09-12 21:19:55 -07:00

91 lines
3.6 KiB
Go

package scape
import (
"math"
"testing"
)
// HIS RULING, 2026-09-12: "dont let em touch." ⚠ NOT YET HONOURED, and this
// test is the characterisation that says so rather than a fix pretending to be
// one. It FAILS THE BUILD only if the numbers get worse.
//
// What was tried and rejected, measured both ways:
//
// - The obvious read was that the bar has no headroom: two stars one row
// apart in the same column are EXACTLY starHardSep apart and the
// acceptance test is `<`, so the boundary case passes. Making it strict
// made it WORSE -- 10 touching pairs became 12 at 40x12 seed 7 -- because
// rejecting a dart pushes the placement into roomiestCell, which takes the
// best cell there IS and can be worse than the dart it replaced.
// - The next read was that the sky is too small. It is not: at 40x12 the
// band is 3 rows of 40 columns, room for dozens at the bar, and EIGHT
// stars still produce three touching pairs.
//
// So the cause is in the placement itself and is not yet found. The likely
// direction is the candidate cell set -- constellationCells keeps stars off
// the disc's columns, and at 40x12 the disc may be eating most of a three-row
// band -- but that is a hypothesis and it has not been measured.
//
// Two stars that render in adjacent cells read as ONE mark, and this channel's
// whole job is to be counted. The separation floor is 2.0 SCREEN units -- a
// terminal cell is about twice as tall as it is wide, so the distance between
// (dx,dy) cells is hypot(dx, 2*dy) -- and two stars one row apart in the same
// column measure EXACTLY 2.00. The acceptance test was `< floor`, so the
// boundary case passed: the bar had no headroom at all.
func TestNoTwoStarsTouch(t *testing.T) {
worst := 0
for _, g := range [][2]int{{40, 12}, {30, 8}, {60, 14}, {80, 24}, {125, 28}, {143, 27}, {200, 50}} {
w, h := g[0], g[1]
hy := int(float64(h) * 0.42)
for _, seed := range []int64{1, 7, 42} {
for _, total := range []int{8, 19, 26, 32} {
sh := NewShore(seed, false)
scale := math.Min(float64(w)/80.0, float64(h)/24.0)
scale = math.Max(0.45, math.Min(1.35, scale))
sy := h - 6
if sy <= hy+1 {
sy = hy + 2
}
top, bot := starBand(hy, foamCeiling(sy, hy, scale))
if bot < top {
continue
}
pts := sh.starPlaces(w, hy, top, bot, total)
touching := 0
for i := range pts {
for j := i + 1; j < len(pts); j++ {
dx := float64(pts[i][0] - pts[j][0])
dy := float64(pts[i][1]-pts[j][1]) * starCellAspect
if math.Hypot(dx, dy) < starHardSep+0.001 {
touching++
}
}
}
if touching > worst {
worst = touching
}
if touching > 0 {
t.Logf("%dx%d seed %d, %d stars: %d pairs touching", w, h, seed, total, touching)
}
}
}
}
// The characterisation. 12 is what the shipped placement produces today,
// at 40x12 seed 7. If a change makes it worse, that is a regression and
// this fails; if a change fixes it, this fails too and the number comes
// down with a note saying what did it.
// 54 is the sweep's true worst, and it is not the 12 an earlier run of this
// file reported: that number came from reading the first few lines of the
// output, which happened to be 40x12. Measure the whole population before
// quoting one of it.
const known = 54
if worst > known {
t.Errorf("touching pairs got WORSE: %d against the known %d", worst, known)
}
if worst < known {
t.Errorf("touching pairs improved to %d from %d -- good, now lower `known` and say "+
"in the comment what fixed it", worst, known)
}
t.Logf("worst case across the sweep: %d touching pairs (unchanged, still open)", worst)
}