Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Some perception contents support indexing. The perception contents which can be indexed are:

...

On each one of these perception contents, there usually is an attribute XXX ID, such as Bound ID or Road ID. The channel name can be modified to such as bound[2].in, road[0].x or zone[15].d. If the channel name have ID, it can only percept and interact with the perception contents with the same ID, for example, road[3].ox can only fetch results from the road which Road ID is 3.
For example, bound is one kind of them. Please notice there is a Bound ID attribute on each bound.


Image Modified
Bound ID attribute can be any positive value (including 0)


We can simplify use bound[0].in to test whether current agent in bound which Bound ID is 0. So modified from the previous bound example, the results will be:

  • Return 1 for agent A, because only A is inside of bound which ID is 0
  • Return 0 for agent B, C, D and E

 

Image Modified
Bound channel with indexing techniques