Sampling of probablistic logic programs for SWI-Prolog, similar to Fabrizio Riguzzi's MCINTYRE (2013): http://mcs.unife.it/~friguzzi/Papers/Rig13-FI-IJ.pdf
For information regarding approximate inference via Gibbs sampling / Markov Chain Monte Carlo (MCMC) sampling, see An Analysis of Gibbs Sampling for Probabilistic Logic Programs or A Comparison of MCMC Sampling for Probabilistic Logic Programming (p. 19-29).
Further documentation: https://lukasrieger.github.io/plp-project/
- Start a SWI-Prolog session at the command line via
swipl
- Load the
montecarlo
module, e. g. via[montecarlo].
- Invoke
montecarlo('input.pl', Query, P).
, where the first parameter denotes the path to a PLP object program and the second denotes the query to be sampled. After successful sampling,P
will contain the sampled probability ofQuery
being true under the given input.
Refer to the PlDoc to customize sampling settings.