Skip to content

30+ solvers for logical puzzles, including Sudoku-like puzzles, Slitherlink, Pentomino, Hitori, Mosaic, Tent, Creek, Atari, Suguru, Five Cells etc. Mainly solved via Mathematical-Programming Solvers like ortools and Gurobi.

Notifications You must be signed in to change notification settings

SmilingWayne/PuzzleSolver

Repository files navigation

Puzzles Solvers & OR tutorials

This repo provides useful solvers of some interesting puzzles. Some basic demos of classic OR problems are also included. The main solver I used in the repo is Google Operations Research software ORtools, especially its CS-SAT solver. Commercial solver Gurobi (Licence required, of course) is also used for specific puzzle(Like Slitherlink).

Since most present solver of those problems are based on logical methods, this repo provides solvers based on mathematical Programming (Integer Programming, Constraint Programming etc..)

Take it slowly, it'll go fast.

✅ Python Environment: Python 3.10.12,

✅ Gurobi Optimizer Version: 10.0.3.

✅ ortools Optimizer Version: 9.7.2996

Catalog


  1. Ortools for diversified Sudoku-like Puzzles: 🥰 The very beginning of my repo. In this note, most of the sudokus (and variants) are well-designed so you can easily add or delete or integrate these constraints and solve comprehensive Sudoku grid, such as "Killer sudoku with Thermo Constraints" or "Anti-Knight Diagnoal Sudoku". A very good example is This.

  2. Solvers for Logic Puzzles using CS-SAT or MILP. More INTERESTING and brain-burned logic puzzles. Including path-finding, digit-filling and flag-placing puzzles. The puzzles that have been solved:

ID English Name of Puzzles Chinese Translation Finished? Note
1 A Standard Sudoku 标准数独
2 An Alphadoku 25 by 25 字母独
3 A Killer Sudoku 杀手数独
4 A petite Killer Sudoku 小杀手数独
5 A Consecutive Sudoku 连续数独
6 A Sandwich Sudoku 三明治数独
7 Akari (aka: light UP!) 照明 Rules
8 Cryptarithmetic Puzzle 破译密码
9 Norinori 海苔 Rules
10 A thermometer Sudoku 温度计数独
11 Number Link 数链
12 A Minesweeper 静态扫雷
13 Simple Loop (AKA: Loopy~) 简单回路 🚀 Gurobi used for MILP
14 Siltherlink 🚀 Gurobi used for MILP
15 Jigsaw Sudoku 锯齿数独
16 Anti-Knight Sudoku 无马数独
17 Anti-King Sudoku 无缘数独
18 Black-White Sudoku 黑白点数独
19 Arrow Sudoku 箭头数独
20 Mosaic 马赛克 Rules
21 Greater Than Sudoku 不等式数独
22 Tent 帐篷 Rules
23 Nonogram 数织 No use of ortools
24 Aquaium 水箱
25 Kakurasu 方阵和
26 Starbattle 星战
27 Vudoku V宫数独 Rules
28 3D-Sudoku 三维数独 🚀
29 LITS LITS
30 Pentomino 五联骨牌 Rules
31 Suguru 🤔️ Rules
32 Shikaku 直角 🐌 Rules
33 Kakuro 交叉和
34 Binario 二进制
35 Five Cells(aka: Faibuseruzu) 五空格
36 Fobidoshi (aka: Forbidden Four) 禁止四连 Rules
37 Hitori 请勿打扰 🚀 Gurobi used for MILP
38 Monotone 单调性 🚀 Gurobi used for MILP
39 Creek 小溪 🚀 Gurobi used for MILP
40 Patchwork (aka: Tatami) 榻榻米 Rules

Some materials for self-learning:

  1. Ortools for Linear Programming : Tutorials.

  2. Ortools for Mixed Integer Programming: Tutorials.

  3. Ortools for Constraint Programming: Tutorials.

  4. Ortools for Knapsack Problem: Tutorials.

  5. Ortools for VRP: Variants and ortools codes( of official website for self-learning).

  6. Ortools & Gurobi for TSP: Two main methods for TSP.

For text explanation and mathematical Modeling, visit My Website for more info.

  1. Column Generation Method: Large-Scale Linear Programming and Cutting Stock Problems: Team Meeting report.

  2. Branch & Price for Parallel Machine Scheduling: 🐌...


  1. Some basic / classic Operations Research Modeling :

Ref:

About

30+ solvers for logical puzzles, including Sudoku-like puzzles, Slitherlink, Pentomino, Hitori, Mosaic, Tent, Creek, Atari, Suguru, Five Cells etc. Mainly solved via Mathematical-Programming Solvers like ortools and Gurobi.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published