I need to minimize a predicate in Prolog. Currently I am using GNU Prolog Java. I have got this fact
army( Territory,X ).
It says that the given Territory has got X army. Now I want to find the minimum number of armies owned by a given player. So I am writing:
place_army( Player, Territory ):-
fd_maximize( army(Territory, X), X ),
owner( Player, Territory ).
The interpreter says:
java.lang.IllegalArgumentException: The goal is not currently active
after a bit I have found the problem: http://www.gprolog.org/manual/gprolog.html#htoc313 I assume that the problem is that the Java implementation of the interpreter has got no FD solver. Any hint/workaround?