You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pass action masker as input to CollectObservations (#3389)
* Sentencing Action masking the same as observations
I am rather unsure about the doubling of the CollectObservation methods (and the copy pasta that comes along)
Need to edit the documentation and the migrating doc once we agree we want to do this
* Addressing the comments
* Improvements to the documentation
* Editing the documentation
Copy file name to clipboardExpand all lines: docs/Migrating.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,12 @@ The versions can be found in
13
13
* The `Agent.CollectObservations()` virtual method now takes as input a `VectorSensor` sensor as argument. The `Agent.AddVectorObs()` methods were removed.
14
14
* The `Monitor` class has been moved to the Examples Project. (It was prone to errors during testing)
15
15
* The `MLAgents.Sensor` namespace has been removed. All sensors now belong to the `MLAgents` namespace.
16
+
* The `SetActionMask` method must now be called on the optional `ActionMasker` argument of the `CollectObservations` method. (We now consider an action mask as a type of observation)
16
17
17
18
18
19
### Steps to Migrate
19
20
* Replace your Agent's implementation of `CollectObservations()` with `CollectObservations(VectorSensor sensor)`. In addition, replace all calls to `AddVectorObs()` with `sensor.AddObservation()` or `sensor.AddOneHotObservation()` on the `VectorSensor` passed as argument.
20
-
21
+
* Replace your calls to `SetActionMask` on your Agent to `ActionMasker.SetActionMask` in `CollectObservations`
0 commit comments