
Figure 1
i. The left panel shows Experiment 1, which is a simulation where the agent is exposed to negative and positive valence and high and low arousal events. This simulates how the optimism bias is lost or maintained during development. The right panel shows a graphical depiction of the hierarchical active inference model. Level 1, observation level, sets the valence and arousal observations (o1) for the valence and arousal states (s1) that provide the observations for level 2. Level 2, state level, establishes the optimism bias, where the optimism bias is a state factor (d2) that is learnt over time. A2 is the likelihood mapping of optimism states to valence and arousal observations. a2 is the likelihood mapping the agent learns over time. ii. The left panel shows Experiment 2 which is the belief updating task where the agent updates their belief to good or bad news. The right side of the figure displays a simplified graphical depiction of the active inference model of the belief updating task. The centre panel shows the generative model likelihood matrix (A). The right panel shows the optimism state factor (D) and the state factor corresponding to the prior belief of a good or bad outcome (d). See main text for full explanation of the model iii. The left panel shows Experiment 3 which is a modified version of the two-armed bandit task where the agent can opt out of selecting an arm and stay safe. The right side shows a graphical depiction of the active inference of the two armed bandit task. The figure displays the likelihood matrices for the generative model that are conditioned on the optimism and pessimism state factor (D), as well as the likelihood matrix of the generative process (Â). See the main text for a full explanation of the model. See the MATLAB code for a view of all matrices and vectors in the model https://github.com/bethfisher-hub/optimism_simulations/.

Figure 2
i. Resulting optimism state factor level versus the proportion of negatively valenced events the agent was exposed to. ii. Two examples of resulting likelihood matrices from the simulation for an agent with learned optimism level 0.07 and an agent with learned optimism level 0.86 at the end of the simulation.

Figure 3
i. Mean percentage of updating beliefs to good versus bad news for each agent. The x axis plots the agent by its level of optimism. ii. Belief updating task results from Garrett et al. 2014 in cohort of healthy controls (n = 14) and patients diagnosed with major depressive disorder (MDD) (n = 15). Results are taken from Figure 2 in Garrett et al. 2014. Good news is plotted in blue and bad news is plotted in orange.

Figure 4
i. Total winnings on the two armed bandit task for each agent. The x-axis plots each agent as their level of optimism. ii. Action probabilities and chosen actions for three agents in the two-armed bandit task. The blue dots indicate the actions the agent took and the grey indicates the action probability of the agent. The outcome line plots the large win, large loss, small win, small loss and null outcomes of the action. Agents with level optimism 0.1, 0.7 and 0.5 are plotted.

Figure A.1
Total winnings from large wins on the two armed bandit task for each agent. The x-axis plots each agent as their level of optimism.

Figure A.2
Total winnings from small wins on the two armed bandit task for each agent. The x-axis plots each agent as their level of optimism.

Figure A.3
Total losses from large losses on the two armed bandit task for each agent. The x-axis plots each agent as their level of optimism.

Figure A.4
Total losses from small losses on the two armed bandit task for each agent. The x-axis plots each agent as their level of optimism.
