wrote a solver for sudoku that works on the principle of brute force, by itself such a solver can think forever if it is impossible to solve a sudoku, are there any algorithms for testing the possibility of solving a sudoku?
- oneJust decide :) It's not just easy, but very simple, if you think a little, not brute force. It is a little harder to check if the solution to sudoku is unique. If the prime minister of Singapore managed to ... - Harry
- My task is to write a solver and not to solve it myself. By the way, the solver works fine. - ishidex2
- Well, what am I talking about? That solver is written in half an hour ... Write a normal solver, and do not check if there is a solution. If your solver works fine , then why do you need a solution existence checker? Solver does not give a solution - it means it is not. - Harry
- In the sense of? I have a function that solves sudoku from a given field, and if there is no solution, then it thinks too long before notifying it. - ishidex2
- 2Damn, well, write a normal program that will solve in real time - my unoptimized reshalka, for example, somewhere for 0.2s works out. Is it too long? This is a very simple task. It is clear that through a search, any task can be made too complex, but why? - Harry
|