Hacker News new | ask | show | jobs
by clintonc 1385 days ago
> Note: In this implementation, jumping off the board is only possible if the stack can reach exactly 1 row or column beyond the perimeter. But it seems to always be the case that it is possible to jump off the board when a stack is big enough. Please let Michael know if you encounter a scenario where a piece is stuck. This should not be allowed according to the rules of the game.

True. Suppose you moved from A to B, and your stack just became 8 tall. Then you must have jumped from one edge of the board to the other; if you jump back the way you came, you'll land on the "margin" outside of the board. Also, there are no other legal moves besides jumping onto the margin; in particular, you can never become 9 tall.

Repeat for smaller heights: If you are height N, but no other moves land on the board, then moving back in the direction the piece last came from will put it on the margin.

1 comments

I was both wrong and confused when I wrote that. It is not always possible to jump off the board in this implementation when a stack is big enough to reach outside the board. A very simple counterexample is A2-A1. That puts a 2-stack in the corner. Such a stack has the range to jump off, but cannot be removed in the current Ludii implementation. That's a violation of the rules of the game.

But I confused this with a stack being completely stuck, i.e. not having any moves, which is a different question. That's the situation I vaguely saw was impossible.