Skip to content

Commit cdf57d0

Browse files
committed
Make IActuator implement IHeuristicProvider. (#5110)
1 parent 2f1bab1 commit cdf57d0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/Migrating.md

+20
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,26 @@ public override void WriteDiscreteActionMask(IDiscreteActionMask actionMask)
4444
- The `IActuator` interface now implements `IHeuristicProvider`. Please add the corresponding `Heuristic(in ActionBuffers)`
4545
method to your custom Actuator classes.
4646

47+
- The `ISensor.GetObservationShape()` method was removed, and `GetObservationSpec()` was added. You can use
48+
`ObservationSpec.Vector()` or `ObservationSpec.Visual()` to generate `ObservationSpec`s that are equivalent to
49+
the previous shape. For example, if your old ISensor looked like:
50+
51+
```csharp
52+
public override int[] GetObservationShape()
53+
{
54+
return new[] { m_Height, m_Width, m_NumChannels };
55+
}
56+
```
57+
58+
the equivalent code would now be
59+
60+
```csharp
61+
public override ObservationSpec GetObservationSpec()
62+
{
63+
return ObservationSpec.Visual(m_Height, m_Width, m_NumChannels);
64+
}
65+
```
66+
4767
## Migrating to Release 13
4868
### Implementing IHeuristic in your IActuator implementations
4969
- If you have any custom actuators, you can now implement the `IHeuristicProvider` interface to have your actuator

0 commit comments

Comments
 (0)