Skip to content

Commit afdeba1

Browse files
author
Chris Elion
authored
migration guide for actions and brainparams (#4776)
1 parent 151cd9a commit afdeba1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/Migrating.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ double-check that the versions are in the same. The versions can be found in
1313
([example](https://github.com/Unity-Technologies/ml-agents/blob/b255661084cb8f701c716b040693069a3fb9a257/ml-agents-envs/mlagents/envs/environment.py#L45))
1414

1515
# Migrating
16+
## Migrating to Release 11
17+
### Agent virtual method deprecation
18+
- `Agent.CollectDiscreteActionMasks()` was deprecated and should be replaced with `Agent.WriteDiscreteActionMask()`
19+
- `Agent.Heuristic(float[])` was deprecated and should be replaced with `Agent.Heuristic(ActionBuffers)`.
20+
- `Agent.OnActionReceived(float[])` was deprecated and should be replaced with `Agent.OnActionReceived(ActionBuffers)`.
21+
- `Agent.GetAction()` was deprecated and should be replaced with `Agent.GetStoredActionBuffers()`.
22+
23+
The default implementation of these will continue to call the deprecated versions where appropriate. However, the
24+
deprecated versions may not be compatible with continuous and discrete actions on the same Agent.
25+
26+
### BrainParameters field and method deprecation
27+
- `BrainParameters.VectorActionSize` was deprecated; you can now set `BrainParameters.ActionSpec.NumContinuousActions`
28+
or `BrainParameters.ActionSpec.BranchSizes` instead.
29+
- `BrainParameters.VectorActionSpaceType` was deprecated, since both continuous and discrete actions can now be used.
30+
- `BrainParameters.NumActions()` was deprecated. Use `BrainParameters.ActionSpec.NumContinuousActions` and
31+
`BrainParameters.ActionSpec.NumDiscreteActions` instead.
1632

1733
## Migrating from Release 7 to latest
1834

0 commit comments

Comments
 (0)