And I know I should not be working out if one can write a solver for loops of zen entirely in javascript. No, that would not be real work, even if it is fun...
It would seem the 10x10 ones can often be totally solved with no trial and error - i.e. just deducing where tiles must be a particular way around. It is a bit iterative - you can fix the initial obvious tiles (blank, and 4 way) and then progress to adjacent tiles. Tiles at the edges have less options. Tiles adjacent to ones you are sure of can find their options limited to one choice and so you fix them too, and so on.
The first version looked at 1 way, and 2 way right angle, and 2 way straight, and 3 way tiles distinctly and considered the various options. It is a stupid way to consider it and I have been dumb. I should just "test" the tile all 4 ways around and see how many "fit" against adjacent know tiles. If only one way, fix the tile. It can be done in a loop. How silly of me!
(I'll try that now :-)
Doing the same on the larger ones leaves islands of tiles which have a choice about the way the puzzle is solved, but typically deciding one of them causes the rest to fall in to place.
So, a cheat function that works out what can be statically deduced without trial and error gives a sort of difficulty score for the game - how much can be fixed like this and how much needs trial and error. The trick then is to use this cheat mode to test different ways of making the random puzzle in the first place to determine if they make easier or harder puzzles...
Or, I could get one with the mountain of real work I have to do.
Subscribe to:
Post Comments (Atom)
Don't use UPS to ship to UK
I posted about shipping and importing and tax and duty - general info. But this is specific. DON'T USE UPS! I had assumed the UPS issue ...
-
Broadband services are a wonderful innovation of our time, using multiple frequency bands (hence the name) to carry signals over wires (us...
-
For many years I used a small stand-alone air-conditioning unit in my study (the box room in the house) and I even had a hole in the wall fo...
-
It seems there is something of a standard test string for anti virus ( wikipedia has more on this). The idea is that systems that look fo...
No comments:
Post a Comment
Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.