https://play.google.com/store/apps/details?id=com.bigduckgames.flow&hl=zh_TW&gl=US
work with python2
game = [1, 0, 0, 0, 2, \
0, 0, 0, 0, 0, \
0, 3, 4, 0, 0, \
0, 0, 1, 0, 0, \
4, 3, 2, 0, 0 ]
Note:
0 = space
AAAAB
DDDAB
DCDAB
DCAAB
DCBBB
A⇨⇨⇩B
⇩⇦⇦⇩⇩
⇩CD⇩⇩
⇩⇩A⇦⇩
DCB⇦⇦
A══╗B
╔═╗║║
║CD║║
║║A╝║
DCB═╝
The flowFree.py has a built-in SAT-Solver base on "DPLL-based SAT solvers by Will Klieber". There is a option to speed up program by replace built-in SAT-Solver with pycosat:
# option 1: fast (need to import pycosat)
# sol_lst = pycosat.solve(flowFree_CNFs)
# option 2: slow
solution = IsSatisfiable(flowFree_CNFs, [])
sol_lst = sorted(solution, key=abs)
第59屆全國中小學科展: 探究精神獎 https://www.ntsec.edu.tw/Science-Content.aspx?cat=15422&a=6821&fld=&key=&isd=1&icop=10&p=4&sid=15827
黃仲璿,林立宸
A SAT-based Sudoku Solver by Tjark Weber
DPLL-based SAT solvers by Will Klieber