Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> .. but the solution must be unique

The solution is not unique, I just found one puzzle where I have

    8----8
    |    |
    |    |
    8----8
Everything is solved except the 8s.


Yeah, looking at the source code, nothing is done to guarantee a unique solution when generating puzzles -- it just fills a grid randomly and then flips a coin for each square to decide if it's part of the solution. Now I'm curious what the odds are of a randomly generated puzzle of size NxN having multiple possible solutions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: