WebPPL is a feature-rich probabilistic programming language embedded in Javascript.

Check out some demos or try it yourself in the editor below.

- Runs on the command line with node.js or in the browser.
- Supports modular and re-usable code using packages built on top of the npm package system, and interoperates with existing Javascript packages in the npm ecosystem.
- Includes a large and expanding library of primitive distributions.
- Implements a variety of inference algorithms, including exact inference via enumeration, rejection sampling, Sequential Monte Carlo, Markov Chain Monte Carlo, Hamiltonian Monte Carlo, and inference-as-optimization (e.g. variational inference).
- Provides inference as a first-class operator in the language, allowing for nested inference (‘inference about inference’).
- Supports optimizable models with neural network components using adnn.

Browser-based applications powered by WebPPL.

- Procedural vines with shape constraints
- 3D procedural spaceships with shape constraints

(Note: the code in this demo is written in an older version of WebPPL)

Install WebPPL in two easy steps:

- Install node.js
- Run
`npm install -g webppl`

Now, the `webppl`

command is globally available.

To upgrade to the latest version, run `npm update -g webppl`

.

To learn more about how to set up and use WebPPL, take a look at our documentation and the examples.

To learn more about how WebPPL works under the hood, check out our web book, The Design and Implementation of Probabilistic Programming Languages.

For probabilistic modeling in general, our other web book, Probabilistic Models of Cognition, might be of interest.

The WebPPL code base is open source and freely available for commerical and non-commercial use under the MIT license.

We encourage you to contribute to WebPPL! Check out our guidelines for contributors and join the webppl-dev mailing list.

Say “web people”.

If you use WebPPL in academic projects and papers, please cite as:

N. D. Goodman and A. Stuhlmüller (electronic). The Design and Implementation of Probabilistic Programming Languages. Retrieved from

`http://dippl.org`

. [bibtex]

@misc{dippl, title = {{The Design and Implementation of Probabilistic Programming Languages}}, author = {Goodman, Noah D and Stuhlm\"{u}ller, Andreas}, year = {2014}, howpublished = {\url{http://dippl.org}}, note = {Accessed: } }

If you publish a paper using/extending WebPPL, let us know and we'll add it to this list:

D. Ritchie, P. Horsfall, and N. D. Goodman. Deep Amortized Inference for Probabilistic Programs. arXiv:1610.05735.

L. Ouyang, M. H. Tessler, D. Ly, and N. D. Goodman. Practical optimal experiment design with probabilistic programs. arXiv:1608.05046.

M. H. Tessler and N. D. Goodman. A Pragmatic Theory of Generic Language. arXiv:1608.02926.

D. Ritchie, A. Thomas, P. Hanrahan, and N. D. Goodman. Neurally-Guided Procedural Models: Amortized Inference for Procedural Graphics Programs using Neural Networks. NIPS 2016.

D. Ritchie, A. Stuhlmüller, and N. D. Goodman. C3: Lightweight Incrementalized MCMC for Probabilistic Programs using Continuations and Callsite Caching. AISTATS 2016.

M. H. Tessler and N. D. Goodman. Communicating generalizations about events. Proceedings of the Thirty-Eighth Annual Conference of the Cognitive Science Society, 2016.

E. J. Yoon, M. H. Tessler, N. D. Goodman, and M. C. Frank. Talking with tact: Polite language as a balance between kindness and informativity. Proceedings of the Thirty-Eighth Annual Conference of the Cognitive Science Society, 2016.

C. Graf, J. Degen, R. X. D. Hawkins, and N. D. Goodman. Animal, dog, or dalmatian? Level of abstraction in nominal referring expressions. Proceedings of the Thirty-Eighth Annual Conference of the Cognitive Science Society, 2016.

O. Evans, A. Stuhlmüller, and N. D. Goodman. Learning the Preferences of Ignorant, Inconsistent Agents. AAAI 2016.

A. Stuhlmüller, R. X. D. Hawkins, N. Siddharth, and N. D. Goodman. Coarse-to-Fine Sequential Monte Carlo for Probabilistic Programs. arXiv:1509.02962.

O. Evans, A. Stuhlmüller, and N. D. Goodman. Learning the Preferences of Bounded Agents. Workshop on Bounded Optimality, NIPS 2015.

R. X. D. Hawkins, A. Stuhlmüller, J. Degen, and N. D. Goodman. Why do you ask? Good questions provoke informative answers. Proceedings of the Thirty-Seventh Annual Conference of the Cognitive Science Society, 2015.

G. Scontras and M. H. Tessler (electronic). Composition in Probabilistic Language Understanding. Retrieved from

`http://gscontras.github.io/ESSLLI-2016`

.
O. Evans, A. Stuhlmüller, J. Salvatier, and D. Filan (electronic). Modeling Agents with Probabilistic Programs. Retrieved from

`http://agentmodels.org`

.
N. D. Goodman and J. B. Tenenbaum (electronic). Probabilistic Models of Cognition. Retrieved from

`http://probmods.org/v2`

.
N. D. Goodman and A. Stuhlmüller (electronic). The Design and Implementation of Probabilistic Programming Languages. Retrieved from

`http://dippl.org`

.
The WebPPL project is supported by grants from DARPA, under agreement number FA8750-14-2-0009, and the Office of Naval Research, grant number N00014-13-1-0788.