File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ public class RayPerception2D : RayPerception
15
15
16
16
/// <summary>
17
17
/// Creates perception vector to be used as part of an observation of an agent.
18
+ /// Each ray in the rayAngles array adds a sublist of data to the observation.
19
+ /// The sublist contains the observation data for a single ray. The list is composed of the following:
20
+ /// 1. A one-hot encoding for detectable objects. For example, if detectableObjects.Length = n, the
21
+ /// first n elements of the sublist will be a one-hot encoding of the detectableObject that was hit, or
22
+ /// all zeroes otherwise.
23
+ /// 2. The 'length' element of the sublist will be 1 if the ray missed everything, or 0 if it hit
24
+ /// something (detectable or not).
25
+ /// 3. The 'length+1' element of the sublist will contain the normalised distance to the object hit.
26
+ /// NOTE: Only objects with tags in the detectableObjects array will have a distance set.
18
27
/// </summary>
19
28
/// <returns>The partial vector observation corresponding to the set of rays</returns>
20
29
/// <param name="rayDistance">Radius of rays</param>
Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ public class RayPerception3D : RayPerception
15
15
16
16
/// <summary>
17
17
/// Creates perception vector to be used as part of an observation of an agent.
18
+ /// Each ray in the rayAngles array adds a sublist of data to the observation.
19
+ /// The sublist contains the observation data for a single ray. The list is composed of the following:
20
+ /// 1. A one-hot encoding for detectable objects. For example, if detectableObjects.Length = n, the
21
+ /// first n elements of the sublist will be a one-hot encoding of the detectableObject that was hit, or
22
+ /// all zeroes otherwise.
23
+ /// 2. The 'length' element of the sublist will be 1 if the ray missed everything, or 0 if it hit
24
+ /// something (detectable or not).
25
+ /// 3. The 'length+1' element of the sublist will contain the normalised distance to the object hit.
26
+ /// NOTE: Only objects with tags in the detectableObjects array will have a distance set.
18
27
/// </summary>
19
28
/// <returns>The partial vector observation corresponding to the set of rays</returns>
20
29
/// <param name="rayDistance">Radius of rays</param>
You can’t perform that action at this time.
0 commit comments