-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_parameters.m
54 lines (44 loc) · 1.38 KB
/
generate_parameters.m
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
close all;
clear all;
load('experimental_variables.mat')
actionCost = [-2, -5];
Practise = [3, 3, 3, 3, 3, 3];
planetRewards = [-20, -10, 0, 10, 20];
Rew_Planets = [1,2,3,4,5];
confs = readNPY('confsExp1.npy');
startsExp = readNPY('startsExp1.npy')+1;
[~, planetsExp] = max(confs, [], 3);
confs= readNPY('confsPractise1.npy');
startsPractise = readNPY('startsPractise1.npy')+1;
[~, planetsPractise] = max(confs, [], 3);
conditionsPractise = struct;
conditionsPractise.noise = cell(4, 5);
conditionsExp = struct;
conditionsExp.noise = cell(4, 25);
conditionsPractise.notrials = ones(1,20)*2;
conditionsPractise.notrials(11:end) = 3;
conditionsExp.notrials = ones(1,100)*2;
conditionsExp.notrials(51:end) = 3;
for i = 1:4
if i == 1 || i == 3
conditionsPractise.noise(i,:) = {'low'};
conditionsExp.noise(i,:) = {'low'};
else
conditionsPractise.noise(i,:) = {'high'};
conditionsExp.noise(i,:) = {'high'};
end
end
conditionsPractise.noise = reshape(conditionsPractise.noise', 1, []);
conditionsExp.noise = reshape(conditionsExp.noise', 1, []);
save('experimental_variables.mat', ...
'actionCost', ...
'planetRewards', ...
'Rew_Planets', ...
'Practise', ...
'conditionsExp', ...
'conditionsPractise', ...
'startsExp', ...
'startsPractise', ...
'planetsExp', ...
'planetsPractise', ...
'state_transition_matrix');