forked from arianaira/vacuum-cleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
177 lines (146 loc) · 7.01 KB
/
main.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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
from environment import State, Result, env
from Agent import Simple_Ref_Agent
state1 = State()
agent1 = Simple_Ref_Agent(sensors=["loc", "is_dirty"])
state1.add_agent(agent1, initial_loc = (0,0))
env1 = env(state1, loc_observability=True, dirt_observability=True, move_determinism=True, suck_determinism=True, static=True)
for i in range(100):
res = env1.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state1.tiles)
state2 = State()
agent2 = Simple_Ref_Agent(sensors=["loc", "is_dirty"])
state2.add_agent(agent2, initial_loc = (0,0))
env2 = env(state2, loc_observability=True, dirt_observability=True, move_determinism=True, suck_determinism=True, static=False)
for i in range(100):
res = env2.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state2.tiles)
state3 = State()
agent3 = Simple_Ref_Agent(sensors=["loc", "is_dirty"])
state3.add_agent(agent3, initial_loc = (0,0))
env3 = env(state3, loc_observability=True, dirt_observability=True, move_determinism=True, suck_determinism=False, static=True)
for i in range(100):
res = env3.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state3.tiles)
state4 = State()
agent4 = Simple_Ref_Agent(sensors=["loc", "is_dirty"])
state4.add_agent(agent4, initial_loc = (0,0))
env4 = env(state4, loc_observability=True, dirt_observability=True, move_determinism=True, suck_determinism=False, static=False)
for i in range(100):
res = env4.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state4.tiles)
state5 = State()
agent5 = Simple_Ref_Agent(sensors=["loc", "is_dirty"])
state5.add_agent(agent5, initial_loc = (0,0))
env5 = env(state5, loc_observability=True, dirt_observability=True, move_determinism=False, suck_determinism=True, static=True)
for i in range(100):
res = env5.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state5.tiles)
state6 = State()
agent6 = Simple_Ref_Agent(sensors=["loc", "is_dirty"])
state6.add_agent(agent6, initial_loc = (0,0))
env6 = env(state6, loc_observability=True, dirt_observability=True, move_determinism=False, suck_determinism=True, static=False)
for i in range(100):
res = env6.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state6.tiles)
state7 = State()
agent7 = Simple_Ref_Agent(sensors=["is_dirty"])
state7.add_agent(agent7, initial_loc = (0,0))
env7 = env(state7, loc_observability=False, dirt_observability=True, move_determinism=True, suck_determinism=True, static=True)
for i in range(100):
res = env7.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state7.tiles)
state8 = State()
agent8 = Simple_Ref_Agent(sensors=["is_dirty"])
state8.add_agent(agent8, initial_loc = (0,0))
env8 = env(state8, loc_observability=False, dirt_observability=True, move_determinism=True, suck_determinism=True, static=False)
for i in range(100):
res = env8.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state8.tiles)
state9 = State()
agent9 = Simple_Ref_Agent(sensors=["is_dirty"])
state9.add_agent(agent9, initial_loc = (0,0))
env9 = env(state9, loc_observability=False, dirt_observability=True, move_determinism=False, suck_determinism=True, static=True)
for i in range(100):
res = env9.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state9.tiles)
state10 = State()
agent10 = Simple_Ref_Agent(sensors=["is_dirty"])
state10.add_agent(agent10, initial_loc = (0,0))
env10 = env(state10, loc_observability=False, dirt_observability=True, move_determinism=False, suck_determinism=True, static=False)
for i in range(100):
res = env10.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state10.tiles)
state11 = State()
agent11 = Simple_Ref_Agent(sensors=["is_dirty"])
state11.add_agent(agent11, initial_loc = (0,0))
env11 = env(state11, loc_observability=False, dirt_observability=True, move_determinism=True, suck_determinism=False, static=True)
for i in range(100):
res = env11.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state11.tiles)
state12 = State()
agent12 = Simple_Ref_Agent(sensors=["is_dirty"])
state12.add_agent(agent12, initial_loc = (0,0))
env12 = env(state12, loc_observability=False, dirt_observability=True, move_determinism=True, suck_determinism=False, static=False)
for i in range(100):
res = env12.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state12.tiles)
state13 = State()
agent13 = Simple_Ref_Agent(sensors=["loc"])
state13.add_agent(agent13, initial_loc = (0,0))
env13 = env(state13, loc_observability=True, dirt_observability=False, move_determinism=True, suck_determinism=True, static=True)
for i in range(100):
res = env13.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state13.tiles)
state14 = State()
agent14 = Simple_Ref_Agent(sensors=["loc"])
state14.add_agent(agent14, initial_loc = (0,0))
env14 = env(state14, loc_observability=True, dirt_observability=False, move_determinism=True, suck_determinism=True, static=False)
for i in range(100):
res = env14.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state14.tiles)
state15 = State()
agent15 = Simple_Ref_Agent(sensors=["loc"])
state15.add_agent(agent15, initial_loc = (0,0))
env15 = env(state15, loc_observability=True, dirt_observability=False, move_determinism=False, suck_determinism=True, static=True)
for i in range(100):
res = env15.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state15.tiles)
state16 = State()
agent16 = Simple_Ref_Agent(sensors=["loc"])
state16.add_agent(agent16, initial_loc = (0,0))
env16 = env(state16, loc_observability=True, dirt_observability=False, move_determinism=False, suck_determinism=True, static=False)
for i in range(100):
res = env16.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state16.tiles)
state17 = State()
agent17 = Simple_Ref_Agent(sensors=["loc"])
state17.add_agent(agent17, initial_loc = (0,0))
env17 = env(state17, loc_observability=True, dirt_observability=False, move_determinism=True, suck_determinism=False, static=True)
for i in range(100):
res = env17.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state17.tiles)
state18 = State()
agent18 = Simple_Ref_Agent(sensors=["loc"])
state18.add_agent(agent18, initial_loc = (0,0))
env18 = env(state18, loc_observability=True, dirt_observability=False, move_determinism=True, suck_determinism=False, static=False)
for i in range(100):
res = env18.run()
print('f1',res.f1,'f2', res.f2, 'f3',res.f3,'f4' ,res.f4,'f5 ', res.f5)
print(state18.tiles)