Hacker News new | ask | show | jobs
by platz 4270 days ago
Just a wild guess, but I wonder if there could be a nice connection between probabilistic programming and logic languages like prolog, if only due to the fact that both Bayes graphs and unification both have this "run forwards and backwards" characteristic that is so unlike imperative programming
3 comments

>run forwards and backwards

Half-serious: http://hackage.haskell.org/package/tardis-0.3.0.0/docs/Contr...

>probabilistic programming

https://hackage.haskell.org/package/probability

There are a number of articles about writing your own probability monad in Haskell. It's not hard.

> There are a number of articles about writing your own probability monad in Haskell. It's not hard.

Could you provide some links? In a quick search I can only find one article, and that's just about using that package, writing one.

The Probability monad allows for computing exact probabilities, as stated, but that more-or-less misses the point of newer probabilistic programming approaches: avoid the exponential blow-up in complexity of inference due to marginalization by generalizing from evaluation to sampling rather than from evaluation to probability assignment.
There have been various attempts to build logic languages that deal with uncertain information (eg http://www.is.informatik.uni-duisburg.de/bib/pdf/ir/Fuhr_99a...).
Also Church [http://projects.csail.mit.edu/church/wiki/Church], a Scheme derivative with probabilistic semantics.
Yes, logic programming and probabilistic programming are closely related. See http://okmij.org/ftp/kakuritu/logic-programming.html