SecUSo / privacy-friendly-sudoku

Privacy Friendly App to play Sudoku on Android.
https://secuso.org/pfa-sudoku
GNU General Public License v3.0
139 stars 54 forks source link

Generates invalid sudokus with multiple solutions #89

Closed avrohr closed 2 years ago

avrohr commented 2 years ago

On the highest difficulty level the app generates (almost?) always invalid puzzles with multiple solutions.

Kamuno commented 2 years ago

Can you give an example? The generated levels should only have one solution and as far as I can tell they do. That's how the generator works. 🤔

Kamuno commented 2 years ago

I just tested this multiple times and every Sudoku I tested had a unique solution...

avrohr commented 2 years ago

image

This is yesterdays daily Sudoku. It has 26 solutions. I used this website: https://www.sudokuwiki.org/sudoku.htm The Sudoku in question is encoded as: ........2.2..5.8.1......3..7.4.9........8541.....37...18....9....7..9...2...4..58

But I have tested a few of the generated ones as well and they come up with multiple solutions as well.

Kamuno commented 2 years ago

Your String is missing a 5 The correct encoding is: ........2.2..5.8.1......3..7.4.9........8541...5.37...18....9....7..9...2...4..58 or 000000002020050801000000300704090000000085410005037000180000900007009000200040058.

You can easily extract the code via the "Share Sudoku"-Feature. I get only one Solution for this Sudoku. image

avrohr commented 2 years ago

Well, sorry. I assume I also messed up the other puzzles I tested. Sorry for that. And thanks for the app!

Kamuno commented 2 years ago

No worries. You just had me shocked for a second 😅