[Community Puzzle] Killer Sudoku Extreme Challenge

Coding Games and Programming Challenges to Code Better

Created by @Timinator,validated by @regismeysso22,@Yudzhin and @5DN1L.
If you have any issues, feel free to ping them.

LOL, some search space pruning is still due on my part:
ide test #6 took 498 sec locally in php, with 467M total iterations in backtrackingâ€¦
That would be still over 10sec if I rewrote the same in c++.
Time for another DLX???

My solution is in Python, so Iâ€™m hoping language choice isnâ€™t a roadblock too often.

It seems as if nothing in life is ever truly free. Iâ€™m constantly trying to teach my daughter what my brother taught his kids so effectively: â€śDonâ€™t buy what you donâ€™t need.â€ť

I am finally out of ideas for my Python solution. For anybody interested, my slowest time on any test is less than 2400 ms (inside the CG IDE). Iâ€™d love to hear what you are able to accomplish with other languages. Good luck!

1 Like

I think Iâ€™ve spend too much time on that one, really needed a lot of optimization compared to the original puzzle.
I am using PHP, my slowest time is for the test â€ś40 Puzzlesâ€ť which is logic (being the one with the more grid to find), inside the CG IDE I get something in the range 700-750 ms
If anyone is interested, for that test my code has to make 50.317 guesses when placing digits.
To reply to @TBali I am not using DLX

2 Likes

After sleeping on it and making a few changes I am now at ~ 300ms for the 40 Puzzles in CG IDE.
The numbers of guesses that have to be made have dropped to 17,038

Making just 17k guesses instead of my 467M seems like a clever approach

But there is room for improvement even for you: it can be solved in 1 guess - if this guess is the right oneâ€¦

2 Likes

Even if it was picking the right digit each times it has to make a guess it would still be making a lot more than 1 guess to solve the 40 puzzles

1 Like

This might be sharing too much, but I make zero guesses in my super slow Python solution. I had hoped to make a puzzle where guessing would never be sufficient, but alas, todayâ€™s programming languages are just too fast!

1 Like