... | ... | @@ -146,7 +146,7 @@ The `Policies` element has 0 or more **child elements** named `Policies`. |
|
|
|
|
|
**Warning:** If any of the specified `Policy` elements cannot be loaded, the simulation will show an error and it will not start.
|
|
|
|
|
|
A `Policy` element describes a single navigation policy that agents in the simulation can use.
|
|
|
### Overview
|
|
|
|
|
|
If you do not wish to write your own policies, you can use the pre-made example policy files in our repository. Each example policy replicates a specific collision-avoidance algorithm from literature.
|
|
|
|
... | ... | @@ -163,6 +163,8 @@ The remainder of this section assumes that you have read this paper. |
|
|
|
|
|
### 'Policy' element
|
|
|
|
|
|
A `Policy` element describes a single navigation policy that agents in the simulation can use.
|
|
|
|
|
|
In line with the I3D 2020 publication, a policy has two main ingredients:
|
|
|
- one or more *cost functions* that assign a cost to the possible velocities that an agent can use,
|
|
|
- an *optimization method* that describes how to use these cost functions in the simulation.
|
... | ... | @@ -174,4 +176,9 @@ A `Policy` element has the following attributes: |
|
|
| Attribute name | Mandatory? | Type, constraints | Description | Default value |
|
|
|
| ------ | ------ | ------ | ------ | ------ |
|
|
|
| `id` | Yes | integer, >= 0 | A unique ID for this policy. | *none* |
|
|
|
| `OptimizationMethod` | Yes | enum (`gradient`,`sampling`,`global`) | The optimization method that this policy should use. `gradient` means that the agent will follow the gradient of its cost functions. `sampling` means that the agent will sample several candidate velocities and choose the one with the lowest cost. `global` means that the agent will compute a velocity that has the lowest cost overall. (This last option defaults to sampling whenever the true global optimum is not specified.) | *none* | |
|
|
\ No newline at end of file |
|
|
| `OptimizationMethod` | Yes | enum (`gradient`,`sampling`,`global`) | The optimization method that this policy should use. `gradient` means that the agent will follow the gradient of its cost functions. `sampling` means that the agent will sample several candidate velocities and choose the one with the lowest cost. `global` means that the agent will compute a velocity that has the lowest cost overall. (This last option defaults to sampling whenever the true global optimum is not specified.) | *none* |
|
|
|
| `SamplingAngle` | No | float, > 0, <= 360 | ... Only used if `OptimizationMethod="sampling"`. | 180 |
|
|
|
| `SpeedSamples` | No | int, > 0 | ... Only used if `OptimizationMethod="sampling"` *and* `Type="regular"`. | 4 |
|
|
|
| `AngleSamples` | No | int, > 0 | ... Only used if `OptimizationMethod="sampling"` *and* `Type="regular"`. | 11 |
|
|
|
| `IncludeBaseAsSample` | No | Boolean | Whether or not to always include the base velocity as a sample. This also affects the distance between speed samples. Only used if `OptimizationMethod="sampling"` *and* `Type="regular"`. | `false` |
|
|
|
| `RandomSamples` | No | int, > 0 | The number of random sample velocities to test. Only used if `OptimizationMethod="sampling"` *and* `Type="random"`. | 100 | |