The unit on modelling human cognition introduced a framework based on the creation of generative models of the physical and social worlds that enable probabilistic inference about objects, agents, and events. The Church programming language was designed to facilitate the implementation and testing of such models. In this tutorial, you will first learn the syntax and some basic primitives of the Church language, and how to define functions that implement simple probabilistic models and inference methods. The concepts are then explored through examples such as hypothesis testing in the domain of coin-flipping, and reasoning about the goals and beliefs of an agent.
Josh Tenenbaum and colleagues propose that our intuitions about properties like the stability of a stack of blocks, may derive from “probabilistic programs” that can simulate, with some uncertainty, the physics that governs how objects behave in space and time. Such programs can be implemented and tested using probabilistic programming languages such as the Church language. (Image courtesy of Josh Tenenbaum, used with permission.)
Unit Activities
Useful Background
Introductions to probability and probabilistic approaches to modelling behaviour
Video lectures on computational models of cognition by Josh Tenenbaum
Description: Learn the Church programming language, which facilitates the implementation and testing of generative models of physical and social worlds that enable probabilistic inferences about objects, agents and events.
Description: Learn the Church programming language, which facilitates the implementation and testing of generative models of physical and social worlds that enable probabilistic inferences about objects, agents and events.
Church_examples (RTF) contains the code examples described in the two-part tutorial video. These examples can be executed by copying the code into one of the following Church programming environments. Code can also be written from scratch and modified in these environments:
First edition of the Probabilistic Models of Cognition electronic text, cited in the section below on Future Study , which includes a separate Play space where code can be copied, modified, and executed
webchurch engine that runs Church code in a web browser, which is available on GitHub for download onto your local computer
This interactive text introduces many probabilistic modeling techniques and contains an embedded Church programming environment with coding examples throughout the text that can be modified and executed in place. The text also includes a separate Play space and Church language reference.
This online text describes how probablistic programming languages (PPLs) can be embedded in other languages, and introduces the WebPPL language, a web-based PPL embedded in JavaScript.
forestdb.org: A repository of probabilistic models implemented in the Church language
The Church language is one of several probabilistic programming languages. Learn more about such languages at the Probabilistic-Programming wiki.