The port had the shape of the app and none of its systems. A catalogue of thirty-two hand-written levels stood in for an open-ended ladder; CSS class names stood in for eight screens at five rulings; a hash of two indices stood in for a seeded look; a fixed palette stood in for four themes with pools. The survey worker swept a state space and then threw the distance field away, answering one question with it. None of that is a smaller version of the mockup. It is a different app that resembles it in a screenshot. So the systems are now in Gleam, and the two the platform genuinely cannot express are in FFI behind a Gleam API rather than absent: - prng.gleam is mulberry32 and FNV-1a, checked against the reference to the bit. What is in FFI is the 32-bit multiply and the logical shift, because a Gleam Int here is a double. Streams are threaded, so determinism is structural rather than conventional. - render_ffi.mjs is the pixel pipeline: compose, diffuse or threshold with true area coverage, reverse the goal block's mark, reprint the tints and their second plate, paint the ground into the holes, blit. It is handed a threshold table and a cell size and has never heard of a theme, a family or a rung. Everything else came across as Gleam: the eight packings, the seven ground stencils, the eight screens and their rulings with fit_ruling's coarseness and register rules, the four themes and combo_for, the depth schedule, the XP curve and its exact inverse, trace_stats, the versioned save, the layout search over both arrangements at every upscale, and the seven painters as pure functions from state to scene operations. The ladder is open-ended again. The worker keeps a sample of states at every depth and measures candidates with an eps-greedy walker; which depth a rung asks for, how wide the window is and every seed it runs under are decided in Gleam and arrive in the message. TO GOAL is an exact distance after every legal move, and the record screen's ridge is measured rather than inferred. window.klotski.solve() walks the board through the game's own input path, which is how a screenshot of a real run gets taken, and how the flows above were checked in a browser.
- commit
- 9c4a2ddfcc250b3f6771b877b3b5773ac4166d92
- parent
- 77d6d0748cb520b2ee8c2c85dc3b5a3c3692eb01
- author
- Dami <dami.etoile@gmail.com>
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.
Not shown: this page already shows 6000 lines of diff.