Discrim task
To run new simulations using default parameters, type
python Discrim2stateProbT_twoQtwoS.py
see C. Parameters in README for description of parameters
For sensitivity to parameters, change gamma, beta, beta_min (lines 136-139), alpha, state_thresh (lines 144-145)
Or run parameter sweeps using multisim_Discrim.py
To generate Figure 2A,B and Fig 3A-C:
task= 'discrim' in TD2Q_manuscript_graphs.py
test='numQ' in discrimFiles.py
then run TD2Q_manuscript_graphs.py in python3
To generate Figure 3D-F:
task= 'discrim' in TD2Q_Qhx_graphs.py
comment out states=['Pport,6kHz 1'] on line 591
then run TD2Q_Qhx_graphs.py in python3
To generate Figure 2C-D:
task= 'discrim' in TD2Q_Qhx_graphs.py
uncomment states=['Pport,6kHz 1'] on line 591
then run TD2Q_Qhx_graphs.py in python3
To generate Figure 4
task = 'AIP' in TD2Q_manuscript_graphs.py and
test='AIP' in discrimFiles.py
then run TD2Q_Qhx_graphs.py (panels D-F) and TD2Q_manuscript_graphs.py (panels A-C)
To generate Figure 5A.
test='discrim' in discrimFiles.py
run TD2Q_manuscript_graphs.py,
data for contextB is printed after the TTest results for extinc_Pport_6kHz_left_Beg
data for contextA is printed after the TTest results for renew_Pport_6kHz_left_Beg
For Fig 5C,
results for beta1 min=0.1 are in Discrim2023-01-10numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_beta_min0.1_gamma0.82_splitTruebetarange.npy
results for beta1 min=0.5 are in Discrim2023-01-10numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_beta_min0.5_gamma0.82_splitTruebetarange.npy
results for const beta1 are in Discrim2023-01-10numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_gamma0.82_splitTruebetarange_bconst_.npy
data in columns: rwd_mean,rwd_std in rows labeled TOTAL
For Fig 5B,
results are in Discrim2023-01-10numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_beta_min0.5_beta1.5_splitTruegammarange.npy
data in columns: half_rwd_block and half_block_std in rows labeled extinc
Probabilistic serial reversal (bandit) task
To run new simulations using default parameters, type
python BanditTask.py
see C. Parameters in README for description of parameters
For sensitivity to parameters, change gamma, beta, beta_min (lines 136-139), alpha, state_thresh (lines 144-145)
Or run parameter sweeps using multisim_bandit.py
For Fig 5&6:
set task='Bandit' in TD2Q_Qhx_graphs.py
set test='numQ' in banditFiles.py
then run TD2Q_Qhx_graphs.py in python3 (Fig 5)
then run TD2Q_manuscript_graphs.py in python3 (Fig 6)
Fig 6A is bottom panel of 1st figure, data for Fig 6B are in tables labeled means and sterr
For Fig 8A:
results for two softmax are in Bandit2023-01-10numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_beta_min0.5_beta1.5_splitTruegammarange.npy
results for one softmax are in Bandit2023-01-18numQ2_Q2other0.0_beta_GPi10_decision_ruledelta_beta_min0.5_beta1.5_splitTruegammarange.npy
data in columns: rwd_P(L)_mean,rwd_P(L)_std in rows labeled TOTAL
For Fig 8B:
results are in Bandit2023-01-10numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_beta_min0.5_beta1.5_splitTrue_1stepgammarange.npy
data in columns: rwd_P(L)_mean,rwd_P(L)_std in rows labeled TOTAL
For Fig 8C:
results for beta1 min=0.1 are in
results for beta1 min=0.5 are in Bandit2023-01-10numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_beta_min0.5_gamma0.82_splitTruebetarange.npy
results for const beta1 are in Bandit2023-01-10numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_gamma0.82_splitTrue_bconst_betarange.npy
results for beta1 min=0.5 and one softmax are in Bandit2023-01-10numQ2_Q2other0.0_beta_GPi10_decision_ruledelta_beta_min0.5_gamma0.75_splitTruebetarange.npy
data in columns: rwd_P(L)_mean,rwd_P(L)_std in the rows labeled TOTAL
for Fig 8D:
results for beta1 min=0.5 are in Bandit2023-01-30numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_gamma0.82_splitTrue_bconst_betarange.npy
results for const beta1 are in Bandit2023-01-30numQ2_Q2other0.0_beta_GPi10_decision_ruleNone_beta_min0.5_gamma0.82_splitTruebetarange.npy
sum the two columns noL_RMSm and noR_RMSs in the rows labeled "50:50"
Sequence task
To run new simulations using default parameters, type
python SequenceTask.py
see C. Parameters in README for description of parameters
For sensitivity to parameters, change gamma, beta, beta_min (lines 267-269), alpha, state_thresh (lines 275-277)
Or run parameter sweeps using multisim_Sequence.py
To generate Figure 9A-D,
task= 'sequence' in TD2Q_manuscript_graphs.py
test='numQ' and testsplit=False and traject_fig=True in sequenceFiles.py
then run TD2Q_manuscript_graphs.py in python3
To generate Figure 10,
task='sequence' in TD2Q_Qhx_graphs.py
then run TD2Q_Qhx_graphs.py in python3
To generate figure 11B, set
task= 'sequence' in TD2Q_manuscript_graphs.py
test='numQ' and testsplit=True in sequenceFiles.py
then run TD2Q_manuscript_graphs.py in python3. The first summary table has the data for the graph
To generate figure 11A,
set test='gamma' and testsplit=False in sequenceFiles.py
for one Q data points,
pattern=subdir0+'Sequence2023-01-10numQ1_Q2other0.0_decision_ruledelta_beta3_beta_min0.5_gamma*_beta_GPi10_rwd15_splitTrue*'
then run TD2Q_manuscript_graphs.py in python3. The first summary table has the data for the graph
for two Q, one soft max,
pattern=subdir0+'Sequence2023-01-10numQ2_Q2other0.0_decision_ruledelta_beta3_beta_min0.5_gamma*_beta_GPi10_rwd15_splitTrue*'
on line 82 of sequenceFiles.py
for two Q data points,
results are in Sequence2023-01-10numQ2_Q2other0.0_decision_ruleNone_beta3_beta_min0.5_beta_GPi10_rwd15_splitTruegammarange.npy
To generate figure 11C,
for two Q data points,
results are in Sequence2023-01-11numQ2_Q2other0.0_decision_ruleNone_beta_min0.5_gamma0.95_beta_GPi10_rwd15_splitTruebetarange.npy
for const beta1,
results are in Sequence2023-01-11numQ2_Q2other0.0_decision_ruleNone_gamma0.95_beta_GPi10_rwd15_splitTrue_bconst_betarange.npy
for one softmax,
results are in Sequence2023-01-11numQ2_Q2other0.0_decision_ruledelta_beta_min0.5_gamma0.95_beta_GPi10_rwd15_splitTruebetarange.npy
for one Q data points,
set test='beta' and testsplit=False in sequenceFiles.py
run TD2Q_manuscript_graphs.py in python3. The first summary table has the data for the graph