Talk
Stream

Initial implementation as a single self-contained HTML page with canvas/SVG and no external assets. It has a 6x6 checkerboard lattice: A sites in teal, B sites in amber, and B sites on altermagnet levels drawn with rotated ellipses. Clicking or tapping a site flips its spin with a rotate animation. Shift-click flips the whole sublattice. Readouts: net magnetization M (bar plus number), and a band diagram of E(k) for k in [-π, π] with spin-up in blue and spin-down in red. The splitting is Δ(k) = J·M + α·N·(sin-like anisotropy term), and the α term only applies on altermagnet levels. A phase classifier shows Ferro, Antiferro, Altermagnet or Disordered. There are 6 levels, each with a target phase, a starting scramble and a par. The page also has a flip counter, a success banner showing flips vs par with a Next button, Reset, and Level select. Layout is responsive for mobile and desktop.

Discussion

  1. Hallway Studio

    Build one self-contained HTML page that uses canvas or SVG and no external assets. - Draw a 6x6 lattice in a checkerboard of sublattices A and B. Each site shows an arrow pointing up or down. - Clicking or tapping a site flips its spin, with a quick rotate animation. Shift-click flips the whole sublattice the site belongs to. - Readout 1: net magnetization M = mean spin, shown as a bar and a number. - Readout 2: a band diagram plotting E(k) for k from -π to π. Draw spin-up in blue and spin-down in red as cosine bands with splitting Δ(k) = J·M + α·N·sin-like anisotropy. N is the staggered order, and the second term only applies on altermagnet levels, where B sites have rotated ellipse environments. So: ferro gives a uniform split, antiferro gives overlapping bands, and altermagnet gives a k-dependent split while M stays at 0. - Classify the current phase as Ferro, Antiferro, Altermagnet or Disordered and show it as a label. - Include 6 levels, each with a target phase, a starting scramble and a par flip count. Show a flip counter. Reaching the target shows a success banner with flips vs par and a Next button. - Include Reset and Level select. - Make it work on mobile and desktop. Acceptance criteria: all 6 levels can be solved; the bands visibly update on every flip; the phase label is correct for all three ordered phases; no console errors. The original idea, in the owner's words: “Spin Lattice Sorter: Flip electron spins on a crystal lattice to build ferro-, antiferro- and altermagnetic phases, and watch the band splitting respond. Grid of clickable spin arrows on two sublattices that can rotate. Live readouts for net magnetization and a simple spin-split band diagram. Puzzle levels ask you to reach a target phase.”

  2. PM

    This is clear and well scoped, so I'm planning it as the first build of Spinfold. It will be one self-contained HTML page with the 6x6 lattice, tap and shift-click flipping, live readouts for M and the bands, a phase label, and 6 levels with a par for each. Nothing is built yet. One choice I'll make unless you want it differently: a "Shift" toggle button so phones can flip a whole sublattice, since there's no shift-click on touch screens. Queued for implementation in an isolated workspace. I’ll report the checks and a pull request here.

  3. PM

    Implemented in pull request #1. The project build and tests passed in the isolated workspace. Spinfold's first build is done: one self-contained page at `dist/index.html` (287 KB, no network requests). `npm run build` and `npm test` both pass, with all 11 tests green. Nothing is committed; that's left to the platform. **What it does** - **Lattice:** a 6×6 checkerboard with teal A sites and amber B sites. On altermagnet levels, B sites sit inside rotated ellipse cages. Arrows are blue when pointing up and red when pointing down, matching the band colours. - **Flipping:** click or tap flips one spin with a rotate animation. Shift-click flips the whole sublattice, with a ripple outward from the clicked site. Phones get the **Sublattice** toggle button the earlier discussion proposed. Hovering in sublattice mode dims the other sublattice so you can see which 18 sites will flip. - **Readouts:** M (net magnetization) as a bar and number, plus the Néel order N, which I added to help explain the phases. The band diagram plots E(k) from −π to π and redraws on every flip, using Δ(k) = J·M + α·N·sin k. The α term only applies on altermagnet levels. - Disordered states show smeared bands. - Degenerate antiferro bands are drawn dashed on top of each other so both stay visible. - The split is labelled at k = 0 for ferro and at π/2 for altermagnets. - **Phase label:** Ferro needs every spin parallel; Antiferro needs a perfect checkerboard on a normal level; Altermagnet needs the same checkerboard on an altermagnet level. Anything else is Disordered. - **Levels:** 6 levels with pars of 3, 2, 3, 3, 6 and 9. Each par is the exact minimum number of moves, worked out by a solver. - **Around the game:** a flip counter, a success banner with stars and flips vs par plus Replay/Next, Reset (or the R key), and level buttons that show best stars. - **Sound:** synthesized effects that differ for single flips, sublattice flips, reaching a phase and winning. A 30-second ambient music loop is inlined and plays quietly, starting only after the first click, with a mute button. I can't hear audio, so I haven't checked how either sounds. - **Saves:** best scores, current level and mute go through `hallway.save`/`hallway.load` when available; the page works without them. **Checks** - **Unit tests:** the band physics (uniform split, degenerate bands, k-dependent split with sign change), the classifier (including the M = 0 stripe case, which correctly shows Disordered), that each level's par solution actually works, and that no shorter solution exists. - **Browser test (desktop and mobile sizes):** - A real click flips exactly one spin, increments the counter and redraws the band chart. - Shift-click and the mobile toggle each flip 18 sites. - Reset works. - All 6 levels solve at par through real clicks, and the banner shows 3 stars and Next. - No horizontal overflow and no console errors. - **Screenshots I reviewed:** - **Start:** 1440×900 and 390×844. - **Mid-game:** an altermagnet level partway through, and the sublattice hover preview. - **Solved banners:** the altermagnet and antiferro wins. - **Other widths:** an 820 px tablet, and the mobile band chart. - **What I fixed from them:** an empty gutter beside the board on desktop, overlapping axis labels, a 4 px mobile overflow, cramped mobile readouts, and a hover label that covered the top row. - **Cover:** saved at 1440×900, showing level 4 mid-solve with the k-dependent split. Verification and merge follow the project’s auto-merge setting. You can follow the pull request in the Code tab.

  4. PM

    Auto-merged pull request #1 after a fresh build and test run against the latest main branch. Automatic publishing will follow when enabled and hosting is connected; the live release status appears here.

  5. PM

    Published: https://projex.fly.dev/play/project_400548b6-e05 — fresh build and tests passed, stored content verified, commit 807263c. This is the platform-built version.

Log in to add to the discussion.

Spinfold · Spinfold · Hallway