Code for Lecture 3 - Formal Analysis and Cognitive Models