|
Algorithm 1 Algorithms switching framework |
|
Data: agent, source ▹ Location of agent and odor source
gridMap, obstacle ▹ Given environmental components
-
1:
procedureOSL
-
2:
false
-
3:
for all in do
-
4:
size() ▹ Initialize uniform distribution
-
5:
end for
-
6:
decompose() ▹
-
7:
while sourceFound = false do
-
8:
max()
-
9:
if in
then ▹ Switch to Infotaxis algorithm
-
10:
-
11:
move(agent, action)
-
12:
else ▹ Switch to Dijkstra algorithm
-
13:
-
14:
dijkstra(agent, jumpTarget)
-
15:
move(agent, path)
-
16:
end if
-
17:
sampling()
-
18:
update()
-
19:
if then
-
20:
true.
-
21:
end if
-
22:
end while
-
23:
end procedure
|