News for hackers. Stuff that matters.
Re:The Power of Prolog by tom_mellior on Thursday April 06, 2017 @03:30AM (#14048633)
It is indeed backtracking as a language, but you don't get optimization entirely for free. The backtracking part only means that you can write down a problem that has multiple solutions and get Prolog to enumerate those solutions using its default order.

If the set of solutions is small enough, you can enumerate all of them and pick out the best one, or have it enumerate them until you get one that is good enough. But if you need a smarter exploration of the search space, you will (in general) have to write that yourself.

Many implementations include an integer constraints library that will give you functionality similar to an ILP solver, which may or may not fit your domain.

Re:The Power of Prolog by bloaf on Thursday April 06, 2017 @12:44PM (#14052205)
Would it work well for algorithms like A*, or other quazi-AI problems that crop up in games?
Re:The Power of Prolog by tom_mellior on Thursday April 06, 2017 @02:44PM (#14053338)
Yes, but you shouldn't expect it to have much more magic support for this kind of algorithms than other languages.