Skip to content

Add KB entry 047: grid placement validity by local cut analysis - #33

Open
MrJoy wants to merge 2 commits into
CHSZLab:mainfrom
MrJoy:kb/047-grid-placement-local-cut
Open

MrJoy wants to merge 2 commits into
CHSZLab:mainfrom
MrJoy:kb/047-grid-placement-local-cut

Conversation

@MrJoy

@MrJoy MrJoy commented Nov 28, 2026

Copy link
Copy Markdown

New knowledge-base entry from an AAE session on a per-frame grid placement check: will blocking a k×k footprint cut any spawn or agent off from its goal?

  • 8-connected = 4-connected reachability under a no-corner-cutting rule, so floods need four neighbors and no corner checks (−94%).
  • Local cut analysis over per-change component labels replaces the reachability floods. Side-cell walks run in a growing box around the footprint. A walk that never meets the box edge is an exact component of the grid without the footprint, so seeds can be assigned to pieces and no seed flood is needed at all. Grid size stopped mattering.
  • Per-agent constant factors in an unoptimizing managed runtime.

Result: 15.5 ms to 0.022 ms per call (712x), with every verdict unchanged against a frozen copy of the original. The entry also records one neutral experiment, and a RED-proof plant that correctly went uncaught because corner rules cannot change reachability.

🤖 Generated with Claude Code

https://claude.ai/code/session_01USKFuKJrc8d1h97dAsanH4

MrJoy and others added 2 commits November 27, 2026 18:37
…alysis

Ten AAE experiments on a per-frame tower-placement check: reachability
floods replaced by 4-connected component labels plus side-cell walks in
a growing box around the footprint (closed walks are exact components of
the grid without the footprint). 15.5 ms to 0.022 ms per call (712x),
all verdicts unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USKFuKJrc8d1h97dAsanH4
…trol

Five more experiments on the caller of the placement check: native
property calls per agent dominated (0.279 -> 0.078 ms, allocation 10.9 KB
-> 0). Also records which allocation probes work in the Unity editor:
GC.GetAllocatedBytesForCurrentThread reads 0 even for 1 MiB,
GC.GetTotalMemory misses small allocations, ProfilerRecorder counters are
exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USKFuKJrc8d1h97dAsanH4

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant