I Found Out Why Hard Puzzles Are NOT Hard :D
A 6x6 sudoku grid is small, so adding techniques like pointing pairs, naked pairs, etc. is stupid and a waste of time tbh
The gird is so small, so the difficulty mainly depends on guesses, when they start, and backtracks. No need for many techniques, they are useless
So I removed some techniques and now I’m cleaning the code after removing 300+ lines of code
+ trying to make it faster 
Check this puzzle 
Log in to leave a comment
I’m going mad bcz whatever I do the HARD puzzles remain medium-easy. I reduced the clues, added more techniques, and added lots of stuff but it doesnt work 
I will reread the code, and try to figure it out 
look at this puzzle, its supposed to be hard 
Log in to leave a comment
I remove remove function, replaced it with undo and clearAll bcz remove is very very expensive.
I also finished the applyNakedPairs, applyNakedSingles, applyHiddenSingles functions. But the HARD puzzles still not hard enough 
Log in to leave a comment
To make the sudoku hard for humans
, I’m adding things like naked singles, hidden singles, naked pairs, pointing pairs, and box-line reduction.
Instead of determining the difficulty by the number of clues in the puzzle
, or how hard it was for the generator to make
, I chose to determine the difficulty by what techniques you need to solve it 
Right now, I’m working on the applyNakedPairs function 
Soooo, I know it have been a while since the last devlog (27 days ago) 
I was busy with my mid-year exams so I didnt code much sollyyy 
Log in to leave a comment
The generator now is less fast ; - ;
Now the solver stores candidates per cell and updates them incrementally every time I place or remove a number. No more recomputing everything, the board actually remembers things now yaya
Another big change: instead of generating a puzzle then checking the difficulty, the generator now filters the clues while removing them. But this part is still under work :D
Difficulty will probably be based on these:
Now there is HARD 6x6 sudoku generation too! (alongside MEDIUM and EASY).
i doubt it’s hard, but it’s 6x6 sudoku so what can i expect lol?
i had tooo many errors, especially with loops. Next im going to make this generator faster, next im going to visualize it yaya :D
here is a hard 6x6 sudoku puzzle :0
Log in to leave a comment
I replaced naive backtracking with constraint-based solving >w<
Before, the generator would place a number into a cell (like at (r, c)), check if it’s valid, and if not, backtrack and brute-try every number from 1 to 6.
Now it first figures out which numbers actually make sense for that cell and only tries those. No more pointless checks. It’s faster, cleaner, and way smarter :3
Here’s a 6x6 sudoku, try it, it’s fun :D
Log in to leave a comment
Fixed the bug (turns out I was using the same rng every time), so I kept getting identical puzzles. Now that’s sorted, and I’ve upgraded the whole thing. I’m using bitmasks now, which makes the generator faster than before (wayyy faster), plus I tossed in a few extra improvements :D
Testing it was actually pretty fun — the puzzles I’m getting all have unique solutions. This is a 6×6 Sudoku generator (grid is either 2×3 or 3×2), so naturally I had to try giving it some cursed dimensions like 3×3, 4×8, etc… just to see what happens hehehe
This is the answer I got: (this was funniest part lol)
It crashes and outputs nth js in one case: 3x3 ⬇️
Log in to leave a comment
I think I broke smth when I tided the code a lil, idk Im rlly sleepy so Good Night People UwU
Gotta fix the code (tmr)
Here’s a 6x6 (3, 2) sudoku enjoy solving it Ov<*
I think the 6x6 sudoku generator is ready, all I have to do is to:
Then I can commit it OwO
Here (down ⬇️) is an easy 6x6 sudoku (3, 2) with solution
Log in to leave a comment
So, uhem uhem, I’ve wasted an hour trying to figure out why I get these red lines in my code even tho everything is right, no syntax errors, but VS Code keeps showing up these red lines. The code compiles and works perfectly, whyyyy the red linessss. And because I have OCD, I couldn’t work. It seems like the problem is from VS Code, so I installed Dev cpp, but tbh it sucks, like all cpp editors. Now I gave up (temporarily), gonna js work on my proj till I figure it out.
I coded the 4x4 sudoku generator like 2 months ago, now I’m working on the 6x6 sudoku generator :D
Log in to leave a comment