浏览代码

Update Making-a-new-Unity-Environment.md

/tag-0.2.0
GitHub 7 年前
当前提交
bfe8a6f7
共有 1 个文件被更改,包括 1 次插入13 次删除
  1. 14
      docs/Making-a-new-Unity-Environment.md

14
docs/Making-a-new-Unity-Environment.md


Note that the reward is reset to 0 at every step, you must add to the reward (`reward += rewardIncrement`). If you use `skipFrame` in the Academy and set your rewards instead of incrementing them, you might lose information since the reward is sent at every step, not at every frame.
## Agent Monitor
The monitoring of the environment has been changed. You can now track many different things and not only agents. Use the Log function anywhere in your code :
```csharp
Monitor.Log(key, value, displayType , target)
```
* *`key`* is the name of the information you want to display.
* *`value`* is the information you want to display.
* *`displayType`* is a MonitorType that can be either `text`, `slider`, `bar` or `hist`.
* `text` will convert `value` into a string and display it. It can be useful for displaying error messages!
* `slider` is used to display a single float between -1 and 1. Note that value must be a float if you want to use a slider. If the value is positive, the slider will be green, if the value is negative, the slider will be red.
* `hist` is used to display multiple floats. Note that value must be a list or array of floats. The Histogram will be a sequence of vertical sliders.
* `bar` is used to see the proportions. Note that value must be a list or array of positive floats. For each float in values, a rectangle of width of value divided by the sum of all values will be show.
* *`target`* is the transform to which you want to attach information. If the transform is `null` the information will be attached to the global monitor.
正在加载...
取消
保存