Algorithm 4 Generate_Environments(T) |
-
Require:
Noise function T
-
Ensure:
set of environments
-
1:
-
2:
for all RNG seed i from 1 to N
do
-
3:
for all coordinates in the environment do
-
4:
-
5:
end for
-
6:
Threshold such that 66% of the workspace is collision free.
-
7:
Select the largest connected component and set it as free space. Make all other regions obstacles.
-
8:
if amount of free space is within tolerance then
-
9:
Remove obstacles below the minimum size threshold in pixels in .
-
10:
add to Q
-
11:
end if
-
12:
end for
-
13:
return
Q
|