Random Puzzle Generation (Update 2.01.00)


Randomly generated puzzles are here! Now, you'll never run out of puzzles to solve again! Assuming you don't mind solving puzzles that don't form images, that is.


To generate a random puzzle to solve, just click the Play button on the title screen (renamed from "Puzzle select"), then select the "Generate a random puzzle" option. You can then pick the size of puzzle you want to generate, as well as the relative complexity* of the randomly generated puzzle**.

If you want to stop working on the puzzle and save it for later, just pause and select "Exit". You'll be prompted to save it to your user puzzles, where you'll be able to continue working on it at another time. You can also save the puzzle once it's completed if you liked it, or even share it using the clipboard sharing method.***

Additionally, new puzzle assistance options have been added to the game. You can now enable an assist that will point out rows and columns that can be worked on, to help you narrow down where to look. Also, enabled by default is a new, more advanced method of fading out hints**** that can more accurately determine which hints need to be greyed out. If you feel the new hint fading method is a bit too

 helpful for your taste, you can always disable it to return to the original method that the game launched with.

A full list of the changes made can be found below. I hope you enjoy the new additions!

  • Added random puzzle generation.
    • Random puzzles are generated by filling in a puzzle randomly. The total possible combinations in all rows and columns is then added up to determine its relative complexity. If the amount falls within the expected range, then a solver runs to make sure the puzzle is line solvable. If it is, then the player is presented with the puzzle. If not, then a new puzzle is generated, and the process repeats. As a result, the time it takes to randomly generate a puzzle varies based on the size and complexity the player has selected.

  • Added an option to use advanced hint fading.
    • Enabled by default.
    • This option uses a puzzle solver to comb through the hints and see which ones should be faded out. It catches completed hints that the original hint fading technique would miss. But it doesn't cheat; a hint can be faded out using the new fading method even if the puzzle is filled in incorrectly.
    • This option cannot be used if hint fading is disabled.

  • Added an option to only fade out hints that are Xed off, meaning the number group associated with it has either an X or a puzzle edge on either size of it.
    • Enabled by default.
    • If you disable this, then, with the new hint fading technique, hints will be greyed out even before you have put Xes on either side of them.
    • This option cannot be used if hint fading is disabled or if advanced hint fading is disabled.

  • Added an option to automatically X off hints once they're complete.
    • This option cannot be used if hint fading is disabled, if advanced hint fading is disabled, or if the option to only fade hints that are Xed off is enabled .

  • Added an option to point out rows and columns that can be worked on.
    • When this option is enabled, a square appears next to the hints of any rows or columns that have something that can be done with them.

  • Various minor optimizations, bug fixes, and improvements.

Note: Enabling advanced hint fading or the new assist that points out workable lines has a performance impact due to them requiring a puzzle solver/validator to work. Puzzles can potentially have tens, hundreds, or even millions of total possible combinations that the solver has to comb through, so for certain very large puzzles, this could have a negative impact on your experience if you're running on low-end hardware. Disabling both advanced hint fading (which is now on by default) and the option to point out workable lines will stop the solver from running and should return CPU usage to the same level as before this update.

This update was made possible by adding an efficient puzzle validator/solver to the game, which I was only able to do thanks to two excellent articles on the web. The overall algorithm and method of solving a nonogram was adapted from Hennie de Harder's article "Solving Nonograms with 120 Lines of Code" (https://towardsdatascience.com/solving-nonograms-with-120-lines-of-code-a7c6e0f627e4). (Thanks for pointing out the article, Rushin'!) After implementing my own method of generating all possible combinations that ended up being way too slow to be used for my intended purposes in Nonozle, I found a much more efficient way to generate them all described in James McCaffrey's article "Lightweight Mathematical Combinations Using C#" (https://visualstudiomagazine.com/articles/2022/07/20/math-combinations-using-csharp.aspx).


* Complexity is determined using total number of possible combinations for all rows and columns of a puzzle.
** Complexity can't be selected for 30x30 puzzles, as it already takes long enough to simply find a random puzzle that size that's actually solvable, much less one that falls within a specified range of total possible combinations.
*** Shutting down the game without first converting it into a user puzzle will result in the loss of the puzzle, so be careful.
**** Hints is the term I use for the numbers that line the sides of a nonogram.

Files

Nonozle (Windows version) 173 MB
Version 17 May 17, 2023

Get Nonozle

Buy Now$4.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.