Code for the model in the paper, "Accurate decisions in an uncertain world: collective cognition increases true positives while decreasing false positives."