Author: Tom Lieber <tom@alltom.com>
This notebook catalogues the creation of a visual probabilistic programming language (PPL) that, at the time of this writing, has not yet been named!
A PPL allows you to write programs with holes whose values can be inferred using probabilistic inference. In my favorite PPL, WebPPL, that works like this:
In the end, you get a chart of which values worked best.
I'm making a visual probabilistic programming language to do this because that gives me the most flexibility to add all the always-on visualizations that I want. Individual random values traveling through programs create distributions of values at every step of the computation, and as a programmer I often want to see almost all of them, so I want a format that can be packed with visuals. I also suspect that rich, immediate feedback would also make it easier for me to share my enthusiasm for PPLs with others.
I didn't think to start this notebook until I'd already taken a few steps into the project. I had pages of sketches of WebPPL programs converted to an imaginary node-and-wire langauge, with all the visualizations I'd like to see. I'd created a Three.js demo that implemented rejection sampling versions of a few WebPPL programs in plain TypeScript, connected to some plots that updated in real-time as the sampler worked. Enough to gain confidence that there's something there, and that I could work comfortably on this problem with modern OSS tech.
I'm working on this in my spare time, so I plan to cut every possible corner. My focus is primarily on trying out different ways of visualizing PPL execution that I think might generalize, and conveying those ideas presentably.