浏览代码

addressing comments

/bullet-hell-barracuda-test-1.3.1
vincentpierre 3 年前
当前提交
e8a08fab
共有 3 个文件被更改,包括 12 次插入12 次删除
  1. 4
      com.unity.ml-agents/Runtime/Sensors/BufferSensor.cs
  2. 4
      com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs
  3. 16
      docs/Learning-Environment-Design-Agents.md

4
com.unity.ml-agents/Runtime/Sensors/BufferSensor.cs


private int m_ObsSize;
float[] m_ObservationBuffer;
int m_CurrentNumObservables;
static DimensionProperty[] m_DimensionProperties = new DimensionProperty[]{
static DimensionProperty[] s_DimensionProperties = new DimensionProperty[]{
DimensionProperty.VariableSize,
DimensionProperty.None
};

/// <inheritdoc/>
public DimensionProperty[] GetDimensionProperties()
{
return m_DimensionProperties;
return s_DimensionProperties;
}
/// <summary>

4
com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs


string m_Name;
int[] m_Shape;
SensorCompressionType m_CompressionType;
static DimensionProperty[] m_DimensionProperties = new DimensionProperty[] {
static DimensionProperty[] s_DimensionProperties = new DimensionProperty[] {
DimensionProperty.TranslationalEquivariance,
DimensionProperty.TranslationalEquivariance,
DimensionProperty.None };

/// <returns></returns>
public DimensionProperty[] GetDimensionProperties()
{
return m_DimensionProperties;
return s_DimensionProperties;
}
/// <summary>

16
docs/Learning-Environment-Design-Agents.md


the order of the entities, so there is no need to properly "order" the
entities before feeding them into the `BufferSensor`.
The `BufferSensor` constructor and Editor inspector have two arguments:
The the `BufferSensorComponent` Editor inspector have two arguments:
- `Observation Size` : This is how many floats each entities will be
represented with. This number is fixed and all entities must
have the same representation. For example, if the entities you want to

the `BufferSensor` will be able to collect.
To add an entity's observations to the `BufferSensor`, you need to call the
`BufferSensor.AppendObservation()` (or `BufferSensorComponent.AppendObservation()`)
To add an entity's observations to a `BufferSensorComponent`, you need
to call `BufferSensorComponent.AppendObservation()`
__Note__: Currently, the observations put into the `Buffer Sensor` are
__Note__: Currently, the observations put into the `BufferSensor` are
- Attach `BufferSensorComponent` to use
- Call `BufferSensor.AppendObservation()` to add the observations of an
entity to the `BufferSensor`
- Normalize the entities observations before feeding them into the `BufferSensor`
- Attach `BufferSensorComponent` to use.
- Call `BufferSensorComponent.AppendObservation()` to add the observations
of an entity to the `BufferSensor`.
- Normalize the entities observations before feeding them into the `BufferSensor`.
## Actions and Actuators

正在加载...
取消
保存