jonadsimon / wonder-words-generator

Generates WonderWords puzzles
Apache License 2.0
2 stars 0 forks source link

Ensure that every word has at least one letter which does not overlap with any other #1

Closed jonadsimon closed 2 years ago

jonadsimon commented 2 years ago

This might significantly slow things down, not sure if there's a good way to phrase this constraint within the current channel-based logic framework.

Maybe add it as a separate Python check at the end?

jonadsimon commented 2 years ago

Fixed within parameterized_board_generator_fixed_overlaps.mzn, however it's very slow. Took ~6min to generate a conformant puzzle that previously took ~2sec.

jonadsimon commented 2 years ago

Quadratic time + #constraint increase is not worth it. Implement this logic in Python after-the-fact

Option 1: If full-word overlap exists, send it back to the script for another run Option 2: If full-word overlap exists, remove it from the words list <-- most straightforward option assuming only 1-2

jonadsimon commented 2 years ago

Fixed in https://github.com/jonadsimon/wonder-words-generator/commit/c9118dc4da3e32eb6e15522f94ee4a33ef83b7c0

jonadsimon commented 2 years ago

Solution in https://github.com/jonadsimon/wonder-words-generator/commit/c9118dc4da3e32eb6e15522f94ee4a33ef83b7c0 was overly simplistic.

Even after being removed from the list sometimes the word "jumps out" at you. See the very obvious "RADAR" below.

image

Better solution is to start with it already crossed out from the list, or otherwise indicate that it is fully covered within the puzzle via an e.g. asterisk

jonadsimon commented 2 years ago

Updated in https://github.com/jonadsimon/wonder-words-generator/commit/e20a25ec2a180f2f35865bd7e1169911243e33c8

Covered-up-words are now wrapped in ˣ's