Hacker News new | ask | show | jobs
by rndmcnlly0 5363 days 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/

2 comments

Oh, and here's a sudoku solver in 15 source lines with ASP: 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

Thank you for the pointer. I wasn't aware of ASP and will definitely spend some time with it.