Skip to content

Commit 7a80d49

Browse files
committed
Generated a good policy for n = 5
1 parent 978615c commit 7a80d49

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

Policies.mat

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
# Created by Octave 4.2.1, Tue Oct 10 19:41:20 2017 PDT <manny@dixy>
1+
# Created by Octave 4.2.1, Tue Oct 10 20:23:58 2017 PDT <manny@dixy>
22
# name: Policies
33
# type: cell
44
# rows: 1
5-
# columns: 6
6-
# name: <cell-element>
7-
# type: matrix
8-
# rows: 0
9-
# columns: 0
10-
11-
12-
5+
# columns: 5
136
# name: <cell-element>
147
# type: matrix
158
# rows: 0
@@ -41,10 +34,10 @@
4134
# name: <cell-element>
4235
# type: matrix
4336
# rows: 3
44-
# columns: 36
45-
-0.7853981633974483 -0.7853981633974483 -0.7853981633974483 -0.7853981633974483 -0.7853981633974483 -0.7853981633974483 -0.471238898038469 -0.471238898038469 -0.471238898038469 -0.471238898038469 -0.471238898038469 -0.471238898038469 -0.1570796326794897 -0.1570796326794897 -0.1570796326794897 -0.1570796326794897 -0.1570796326794897 -0.1570796326794897 0.1570796326794897 0.1570796326794897 0.1570796326794897 0.1570796326794897 0.1570796326794897 0.1570796326794897 0.471238898038469 0.471238898038469 0.471238898038469 0.471238898038469 0.471238898038469 0.471238898038469 0.7853981633974483 0.7853981633974483 0.7853981633974483 0.7853981633974483 0.7853981633974483 0.7853981633974483
46-
-5 -3 -1 1 3 5 -5 -3 -1 1 3 5 -5 -3 -1 1 3 5 -5 -3 -1 1 3 5 -5 -3 -1 1 3 5 -5 -3 -1 1 3 5
47-
100 100 100 100 100 84 100 100 100 83 38 -7 100 89 48 8 -32 -73 62 22 -19 -59 -99 -100 -5 -50 -94 -100 -100 -100 -99 -100 -100 -100 -100 -100
37+
# columns: 25
38+
-0.7853981633974483 -0.7853981633974483 -0.7853981633974483 -0.7853981633974483 -0.7853981633974483 -0.3926990816987241 -0.3926990816987241 -0.3926990816987241 -0.3926990816987241 -0.3926990816987241 0 0 0 0 0 0.3926990816987241 0.3926990816987241 0.3926990816987241 0.3926990816987241 0.3926990816987241 0.7853981633974483 0.7853981633974483 0.7853981633974483 0.7853981633974483 0.7853981633974483
39+
-5 -2.5 0 2.5 5 -5 -2.5 0 2.5 5 -5 -2.5 0 2.5 5 -5 -2.5 0 2.5 5 -5 -2.5 0 2.5 5
40+
100 100 100 10 -10 100 100 10 -10 -100 100 10 -10 -100 -100 10 -5 -100 -100 -100 1 -100 -100 -100 -100
4841

4942

5043

main.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
% Time step size
1313
dt = 0.1; % Seconds
14-
maxIterations = 500;
14+
maxIterations = 1000;
1515

1616
% Number of dimensions state vector is in
1717
dimensions = 2;
@@ -27,7 +27,7 @@
2727
% depth of recursion tree
2828
state.depthLimit = 2;
2929
state.stateBounds = [state.setPoint-pi/4, state.setPoint+pi/4; -5, 5];
30-
state.numStates = 6;
30+
state.numStates = 5;
3131

3232

3333
% Calculates the step size between each upper and lower bound
@@ -39,7 +39,7 @@
3939
end
4040

4141
% Set of actions
42-
A = [-100:100];
42+
A = [-100, -10, -5, -1, 0, 1, 5, 10, 100];
4343

4444
% Set of states
4545
S = [linspace(state.stateBounds(1,1), state.stateBounds(1,2), state.numStates);...

0 commit comments

Comments
 (0)