Declarative programming is very interesting. Some people are mentioning Prolog being slow. Well, I took an undergrad class on Prolog, and my perception is that Prolog can be very performant doing complete searches, but:
1) You need to know how to encode the constraints so they can be evaluated efficiently, not just write them.
2) A common way to achieve 1) is to encode a problem as a SAT problem and use a modern SAT solver. They are pretty sick. You can write great SAT solvers in Prolog, but there are already many good ones in many languages, so it's quite poinless unless you do it for fun or learning.
3) Compared to most statistical methods / heuristics, searches in Prolog will be slow. And in most cases statistical methods will do fine anyway, because there will be at least decent solutions to be easily found.
My conclusion is that we often confuse the problems of "proving that a plan is optimal" with "finding a good plan", which are indeed related, but use very different techniques to reach solutions.
I think the statistical methods would be better compared to a sat solver like Z3. Prolog gives you more flexibility, but it isn't going to be able to use the advanced search techniques that Z3 can take advantage of. Optimizers like Optaplanner are in sort of the same family as Z3, but they often trade being better at optimization for the ability to quickly find solutions, particularly if the number of solutions is small.
In my experience, seeing OptaPlanner pitted against the other best-of-the-best enterpise-grade solvers, OptaPlanner wins when scaling out - very clearly. Not when scaling down. This is the nature of the Local Search algorithms.
1) You need to know how to encode the constraints so they can be evaluated efficiently, not just write them.
2) A common way to achieve 1) is to encode a problem as a SAT problem and use a modern SAT solver. They are pretty sick. You can write great SAT solvers in Prolog, but there are already many good ones in many languages, so it's quite poinless unless you do it for fun or learning.
3) Compared to most statistical methods / heuristics, searches in Prolog will be slow. And in most cases statistical methods will do fine anyway, because there will be at least decent solutions to be easily found.
My conclusion is that we often confuse the problems of "proving that a plan is optimal" with "finding a good plan", which are indeed related, but use very different techniques to reach solutions.