← Back to context

Comment by olooney

2 months ago

I tried setting `width` to 5 and found that your algorithm handles Yugiri correctly out-of-the-box. I tried commenting out various special case rules, such as lines 162-170, but it's the recursive algorithm itself that causes this. As you note on lines 204-214, your algorithm is not guaranteed to find the shortest solution; but the fact that it correctly handles Yugiri while mine does not suggests that it's closer to the intuitive, aesthetic judgement originally used to decide on the traditional layout.

That really surprised me (in a good way), because I had viewed Yugiri as an exception to an otherwise regular rule, while you showed it actually a natural consequence of a different rule! Of course, your algorithm also has special cases that need to be handled, so ultimately it may just be an aesthetic choice after all, but it proves that Yugiri may not be as irregular as I thought.

Great post, OWL! I love a good mathematical diversion with cultural context wrapped around it, it's like a beef wellington for the analytical mind.

Codepen is great for discourse like this but I want to put the conventional Genji-mon in a unit test and then go hog wild with rule construction, because I remember running out of steam exploring more robust rules that still satisfy `width` = 5.

I'm bearish on LLMs, for better or worse, but you seem to know your way around them. Do you suppose this problem could be attacked with some sort of trained rigmarole that writes rulesets?