Skip to content

Commit b7cfb94

Browse files
MarcoMeterawjuliani
authored andcommitted
Added information about input normalization to the best practices doc (#220)
1 parent edc4d3b commit b7cfb94

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/best-practices.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ complexity over time. This can either be done manually, or via Curriculum Learni
1515
## States
1616
* States should include all variables relevant to allowing the agent to take the optimally informed decision.
1717
* Categorical state variables such as type of object (Sword, Shield, Bow) should be encoded in one-hot fashion (ie `3` -> `0, 0, 1`).
18-
* Rotation information on GameObjects should be recorded as `state.Add(transform.rotation.eulerAngles.y/180.0f-1.0f);` rather than `state.Add(transform.rotation.y);`.
18+
* Besides encoding non-numeric values, all inputs should be normalized to be in the range 0 to +1 (or -1 to 1). For example rotation information on GameObjects should be recorded as `state.Add(transform.rotation.eulerAngles.y/180.0f-1.0f);` rather than `state.Add(transform.rotation.y);`. See the equation below for one approach of normaliztaion.
1919
* Positional information of relevant GameObjects should be encoded in relative coordinates wherever possible. This is often relative to the agent position.
2020

21+
![normalization](../images/normalization.png)
22+
2123
## Actions
2224
* When using continuous control, action values should be clipped to an appropriate range.
2325
* Be sure to set the action-space-size to the number of used actions, and not greater, as doing the latter can interfere with the efficency of the training process.

images/normalization.png

14.5 KB
Loading

0 commit comments

Comments
 (0)