Challenge questions

Not for grades!

These are not essential for learning the material and can be skipped without affecting your grade. If you successfully solve one set of problem, a week of participation activity will be waived (it does not have to be the same week you submit the challenge question). Submit your answer at any time. I will not post solutions for the challenge questions.

Recall the decision tree visualization we introduced in the first week.

Create a variant of simPPLe which draws decision trees automatically.

Specifically, your code should include a function decision_tree which takes as input a simPPLe probabilistic program, and output a mermaid string which can be rendered in your browser as a diagram.

Demonstrate your code on two examples: one in class, and one not from the class.