5 ms·
You might enjoy answer set programming (ASP). It's a different take on logic programming based on the idea of automatically transforming your problem into a SAT
by rndmcnlly0 15y ago
You might enjoy answer set programming (ASP). It's a different take on logic programming based on the idea of automatically transforming your problem into a SAT-like representation and then running fancy conflict-driven constraint learning solvers on it. In many solvers, you give up Turing completeness in exchange for being really productive with solving NP-complete problems (similar to regex engines turning you into a bad-ass string matching programmer).
Here's a tutorial application of ASP to map generation:
http://eis-blog.ucsc.edu/2011/10/map-generation-speedrun/ http://eis-blog.ucsc.edu/2011/10/map-generation-speedrun/
- Argorak 15y agoThank you for the pointer. I wasn't aware of ASP and will definitely spend some time with it.
- rndmcnlly0 15y agoOh, and here's a sudoku solver in 15 source lines with ASP: http://asparagus.cs.uni-potsdam.de/encoding/show/id/3540 http://asparagus.cs.uni-potsdam.de/encoding/show/id/3540 Also, a sudoku puzzle generator directly incorporating the unique solution constraint: http://asparagus.cs.uni-potsdam.de/encoding/show/id/12739 http://asparagus.cs.uni-potsdam.de/encoding/show/id/12739