Hacker News new | ask | show | jobs
by mckeed 1239 days ago
I mapped out the structure of the board as a graph of which squares you can get to from which other squares. It's surprisingly stringy without all the squares forbidden by the queen placement.

https://i.imgur.com/8OuQcu8.png

8 comments

Same but with the original board as part of the visualization, and with different parts of the structure highlighted:

https://ibb.co/JFY3jm4

It made a lot more sense after doing that, as I'm nowhere near proficient enough at chess to see the board and all its moves in my mind's eye.

Hah, you beat me to it! I drew this very same board by hand, after noticing that many positions were dead ends, and that the options for moving around the top-left were quite limited.

Based on the graph, I also found an optimal route through the whole board: https://gist.github.com/unflxw/b4d21c55c137a9a42fba75bd0cf98...

That was a very good visualization of the problem/solutions, thanks :)
Wow, this vizualization is amazing!
Really living up to your username!
Almost like they were born to do this.
Interestingly, you can hit all of the top 3 rows without going below the queen except for needing g4 to get to and from h6.
Thanks for generating this! I struggled quite a bit getting to a few squares, and the graph shows they were indeed far apart from each other and that I wasn't missing something obvious.
This is a good advertisement for the approach I came up with eventually: if you don't see a trivial way to the next square, find a sequence that will lead to it that starts in the lower right quadrant, then go to that quadrant and get to that square. (The lower right quadrant is the center ring in this diagram.)

I'm used to a version with pawns that involves less backtracking, so it took me a little while to stop trying to be "smarter" and just be okay with continually returning to home base.

Was hoping someone had done this already, thanks.
How did you do this? Or was this done manually?
I wrote a ruby script to map out the graph and fed it into graphviz to make the image.

https://graphviz.org

I'm not sure what I was expecting but 8t wasn't that. Very interesting!
This is the way.