Algorithm for solving Sudoku

后端 未结 10 584
忘了有多久
忘了有多久 2020-12-02 08:13

I want to write a code in python to solve a sudoku puzzle. Do you guys have any idea about a good algorithm for this purpose. I read somewhere in net about a algorithm which

10条回答
  •  星月不相逢
    2020-12-02 08:40

    Hi I've blogged about writing a sudoku solver from scratch in Python and currently writing a whole series about writing a constraint programming solver in Julia (another high level but faster language) You can read the sudoku problem from a file which seems to be easier more handy than a gui or cli way. The general idea it uses is constraint programming. I use the all different / unique constraint but I coded it myself instead of using a constraint programming solver.

    If someone is interested:

    • The old Python version: https://opensourc.es/blog/sudoku
    • The new Julia series: https://opensourc.es/blog/constraint-solver-1

提交回复
热议问题