浏览代码

migration guide for actions and brainparams (#4776)

/release_11_branch
GitHub 4 年前
当前提交
a389b2eb
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16
      docs/Migrating.md

16
docs/Migrating.md


([example](https://github.com/Unity-Technologies/ml-agents/blob/b255661084cb8f701c716b040693069a3fb9a257/ml-agents-envs/mlagents/envs/environment.py#L45))
# Migrating
## Migrating to Release 11
### Agent virtual method deprecation
- `Agent.CollectDiscreteActionMasks()` was deprecated and should be replaced with `Agent.WriteDiscreteActionMask()`
- `Agent.Heuristic(float[])` was deprecated and should be replaced with `Agent.Heuristic(ActionBuffers)`.
- `Agent.OnActionReceived(float[])` was deprecated and should be replaced with `Agent.OnActionReceived(ActionBuffers)`.
- `Agent.GetAction()` was deprecated and should be replaced with `Agent.GetStoredActionBuffers()`.
The default implementation of these will continue to call the deprecated versions where appropriate. However, the
deprecated versions may not be compatible with continuous and discrete actions on the same Agent.
### BrainParameters field and method deprecation
- `BrainParameters.VectorActionSize` was deprecated; you can now set `BrainParameters.ActionSpec.NumContinuousActions`
or `BrainParameters.ActionSpec.BranchSizes` instead.
- `BrainParameters.VectorActionSpaceType` was deprecated, since both continuous and discrete actions can now be used.
- `BrainParameters.NumActions()` was deprecated. Use `BrainParameters.ActionSpec.NumContinuousActions` and
`BrainParameters.ActionSpec.NumDiscreteActions` instead.
## Migrating from Release 7 to latest

正在加载...
取消
保存