-
Notifications
You must be signed in to change notification settings - Fork 0
/
comparison_test.m
67 lines (61 loc) · 1.54 KB
/
comparison_test.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
55
56
57
58
59
60
61
62
63
64
65
66
67
rng(100);
NTESTS = 10;
NX = 4;
NY = 3;
x0 = [150,950,-0.060]';
%% generate all those new levels
test1_envs = cell(16,1);
for i = 1:16
env = generate_environment(1920,1080,2,2);
test1_envs{i} = env;
end
test2_envs = cell(16,1);
for i = 1:16
env = generate_environment(1920,1080,2,0);
test2_envs{i} = env;
end
%% run old algorithm
figure(1);
for i = 1:NTESTS
subplot(NX,NY,i);
fprintf('[NAIVE/OBS] Plotting for level %d...\n',i);
evaluate(x0,test1_envs{i},bmm,models)
axis([0 2500 0 1500]);
end
figure(2);
for i = 1:NTESTS
subplot(NX,NY,i);
fprintf('[NAIVE/NONE] Plotting for level %d...\n',i);
evaluate(x0,test2_envs{i},bmm,models)
axis([0 2500 0 1500]);
end
%% run new algorithm, no goals
figure(3);
for i = 1:NTESTS
subplot(NX,NY,i);
fprintf('[BLIND/OBS] Plotting for level %d...\n',i);
prob_plan_for_environment(x0,test1_envs{i},bmm,models,false);
axis([0 2500 0 1500]);
end
figure(4);
for i = 1:NTESTS
subplot(NX,NY,i);
fprintf('[BLIND/NONE] Plotting for level %d...\n',i);
prob_plan_for_environment(x0,test2_envs{i},bmm,models,false);
axis([0 2500 0 1500]);
end
%% run new algorithm
figure(5);
for i = 1:NTESTS
subplot(NX,NY,i);
fprintf('[GOAL/OBS] Plotting for level %d...\n',i);
prob_plan_for_environment(x0,test1_envs{i},bmm,models,true);
axis([0 2500 0 1500]);
end
figure(6);
for i = 1:NTESTS
subplot(NX,NY,i);
fprintf('[GOAL/NONE] Plotting for level %d...\n',i);
prob_plan_for_environment(x0,test2_envs{i},bmm,models,true);
axis([0 2500 0 1500]);
end