Constraint-programming in PHP
-
27-09-2019 - |
Question
Are there any constraint-programming libraries for PHP? Something that would be capable of handling a situation like this.
Solution
Constraint programming libraries tend to be written in C/C++ for speed reasons, you can very easily create problems that are very costly to solve. Your best bets are:
- Find a C/C++ library that has an existing PHP wrapper (a quick Google doesn't turn up anything)
- Create your own wrapper around any of the libraries mentioned here
- Use a "black box" external program such as Minion which you interact with via the command line and text files
Alternatively take the Python code from the above example and call it from PHP.
OTHER TIPS
First-order predicate logic library can be found here: http://www.phpclasses.org/package/1344-PHP-Manipulate-analyze-and-prove-logic-propositions.html
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow