-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dopamine_Rew_Punish_nothr_2str_4mtr.css
66 lines (43 loc) · 1.72 KB
/
Dopamine_Rew_Punish_nothr_2str_4mtr.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
int snc_size = .layers.SNc.units.size;
float k = 1.0*.processes.Train_Prob.init_procs[0].s_args[0]/.layers.SNc.n_units;
// k is percentage of intact SNC units
UnitSpec* us = .specs.FixedBiasUnitSpec.LearnBiasUnitSpec.matrisom_unitspec;
int max_monval = .processes.Cycle_Prob.final_stats.size;
// number of monitor value statistics
int j;
for (j=0;j<max_monval;j++) .processes.Cycle_Prob.final_stats[j].mod.flag=0;
// don't monitor activities in plus phase (only care about activities during resp selection, in minus phase)
if ((k>0)&&(owner[0].se.val<0.5)) {
int i;
for (i=0;i<snc_size;i++) {
//DA on Rew
owner.owner.cur_event.patterns[2].value[i]=1.0;
.layers.SNc.units[i].ext=1.0; }
us.act.gain=k*10000; // bigger gain (for D1 contrast effect)
}
else {
int i;
for (i=0;i<snc_size;i++) {
owner.owner.cur_event.patterns[2].value[i]=0; //No DA = DA dip
.layers.SNc.units[i].ext=0;
}
us.act.gain=600-k*300; // smaller gain (contrast)
us.act.thr=0.25;
}
.processes.Settle_Prob.cycle.max=30; // burst/dip shouldn't last that long in plus phase!
float act0 = .layers."Motor Cortex".units[0].act_m;
float act1 = .layers."Motor Cortex".units[1].act_m;
// check to see which motor resp was most active in minus phase and clamp on in plus phase
if (act0 > act1) {
owner.owner.cur_event.patterns[3].value[0] = 1.0;
owner.owner.cur_event.patterns[3].value[1] = 0;
owner.owner.cur_event.patterns[3].value[2] = 1.0;
owner.owner.cur_event.patterns[3].value[3] = 0;
}
if (act1 > act0) {
owner.owner.cur_event.patterns[3].value[0] = 0;
owner.owner.cur_event.patterns[3].value[1] = 1.0;
owner.owner.cur_event.patterns[3].value[2] = 0;
owner.owner.cur_event.patterns[3].value[3] = 1.0;
}
GetMyTrialProc().SetCurLrate();