ellisk42 / ec

MIT License
435 stars 135 forks source link

How are probabilistic programs specified? #104

Open thelogicalgrammar opened 1 year ago

thelogicalgrammar commented 1 year ago

I was wondering if there's any description / hints anywhere on how to define probabilistic rather than deterministic programs. For instance, how would we go about adding a flip stochastic primitive to the incr example from the documentation? Any help appreciated & thank you in advance!

ManuelEberhardinger commented 1 year ago

I was also thinking about using DreamCoder with probabilistic programming. I haven't started with implementing something for this but you would need to implement your own domain specific language which includes those probabilistic primitives.

Another point to consider is how your input and output example will look like. I think you can't use the default mechanism in DreamCoder which checks which tasks were solved because of the probabilistic components of the program, which can lead to different answers when executing it.

Did you start working on this?