-
Notifications
You must be signed in to change notification settings - Fork 0
/
runner.py
42 lines (41 loc) · 1.05 KB
/
runner.py
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
import momdp
momdp.setVerbose(True)
grid = [
" 2 2 2 ",
" 2 ",
"1 ",
" 1 1 ",
" 1 ",
" S ",
]
path = [
(5, 0, (), -1),
(5, 1, (), -1),
(5, 2, (), -1),
(5, 3, (), -1),
(5, 4, (), -1),
(5, 5, (), -1),
(6, 5, (), -1),
(6, 5, ((6, 5), ), -1),
(7, 5, ((6, 5), ), -1),
(8, 5, ((6, 5), ), -1),
(9, 5, ((6, 5), ), -1),
(9, 5, ((6, 5), (9, 5), ), -1),
(9, 4, ((6, 5), (9, 5), ), -1),
(8, 4, ((6, 5), (9, 5), ), -1),
(8, 4, ((6, 5), (9, 5), (8, 4), ), -1),
(8, 3, ((6, 5), (9, 5), (8, 4), ), -1),
(8, 2, ((6, 5), (9, 5), (8, 4), ), -1),
(8, 1, ((6, 5), (9, 5), (8, 4), ), -1),
(8, 0, ((6, 5), (9, 5), (8, 4), ), -1),
(7, 0, ((6, 5), (9, 5), (8, 4), ), -1),
(6, 0, ((6, 5), (9, 5), (8, 4), ), -1),
(5, 0, ((6, 5), (9, 5), (8, 4), ), -1),
]
nPick = 3
discount = 0.999
beta = 100
moveCost = 0.03
mymomdp = momdp.GridMOMDP(grid, nPick, discount, beta, moveCost)
out = mymomdp.testGrid(path, 101, range(101))
momdp.simplexPlot(out)