logoalt Hacker News

npinskertoday at 2:02 PM1 replyview on HN

Intuitively, I feel like the final board might also be able to be tackled in browser, if you use WASM and speed up the solver.

I wonder: maybe the state is overly compressed? Could it speed things up to store (boxes, [every position the keeper can reach without pushing]) rather than (boxes, representative keeper position), so we can reduce recomputation of the keeper walking around?

I wonder: maybe A* is counterproductive, as obvious heuristics have traps? Maybe BFS is better?

I wonder: the search doesn't actually "skip over" walking states, it just hides them in the processing of each element in the queue, so adding them to the queue might actually be faster?

I wonder: are there any other simple pruning techniques that you could incorporate? Any learnings from state-of-the-art Sokoban solvers, like this one? -- https://ieee-cog.org/2020/papers/paper_44.pdf

Many interesting questions... sadly, the webpage is written by AI, so there's zero discussion of these tradeoffs, future avenues, or rejected ideas, in favor of meaningless self-congratulatory copy about the "provable optimum" and silly claims like a bucket queue being allocation-free.


Replies

throwaway219450today at 3:43 PM

Showing the exploration would be nice. À la RedBlob tutorials, seeing the solver work is part of the fun. As is I have no intuition for where the algorithm would spend all its time and where it can easily rule out. 1GB of RAM for the final puzzle isn’t too bad for a browser demo if you warn the user and don’t run automatically (is the state space compressible?)