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

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

#### Features

• 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.

#### Local install

Install WebPPL in two easy steps:

1. Install node.js
2. Run npm install -g webppl

Now, the webppl command is globally available.

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

#### Documentation

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.

#### Contributions

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

#### Pronunciation

Say “web people”.

#### Citing

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: }
}


#### Publications

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.
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.

#### Acknowledgments

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.