-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Develop scriptable brains documentation #1249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop scriptable brains documentation #1249
Conversation
docs/Basic-Guide.md
Outdated
Since we are going to build this environment to conduct training, we need to set | ||
the Brain used by the Agents to **External**. This allows the Agents to | ||
Since we are going to build this environment to conduct training, we need to add | ||
the Brain to the training session. This allows the Agents to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe specify that we mean the agents linked to that brain?
docs/Basic-Guide.md
Outdated
object. | ||
2. Select its child object **Ball3DBrain**. | ||
3. In the Inspector window, set **Brain Type** to **External**. | ||
1. Give to the agents you want to train the **Ball3DBrain**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is worded a little strangely. Perhaps "Assign the Ball3DBrain to the agents you would like to train.
and **Internal** types work together — use **External** when training your | ||
Agents; use **Internal** when using the trained model. The **Heuristic** Brain | ||
allows you to hand-code the Agent's logic by extending the Decision class. | ||
There are 3 types of brains, you can create new ones by selecting `Assets -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be two sentences.
Create -> ML-Agents -> Brain`. | ||
The **Learning Brain** is a brain that uses a Neural Network to take decisions. | ||
When the Brain is checked as `Train` in the Academy **Training Hub**, the | ||
Neural Network will be trained by the external process. You can also use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is somewhat misleading, since there isn't a NN in Unity being trained, but the NN lives outside Unity.
component later in the tutorial. | ||
|
||
### Add Empty GameObjects to Hold the Academy and Brain | ||
### Add Empty GameObjects to Hold the Academy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an Empty GameObject to hold the Academy
?
@@ -0,0 +1,75 @@ | |||
# Learning Brains | |||
|
|||
The **Learning Brain** work in different phases of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works differently in different phases?
Academy's `Training Hub` and check the checkbox `Train`. When using a pretrained | ||
model, just drag the Model file into the `Model` property of the **Learning Brain**. | ||
|
||
## Training Mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we are calling this training, but maybe we should use somewhat more agnostic language here, in case people think it is only for training?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since technically it is for external control.
|
||
## Migrating from ML-Agents toolkit v0.5 to v0.6 | ||
### Important | ||
* Brains are now Scriptable Objects instead of Monobehaviors. This will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe give some recommendation about the best way to move a project that is using a lot of the old brains to use the new brains. Especially since the old functionality is removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awjuliani I added a paragraph.
Comments mainly about wording of different things. Going through this raises in my mind the question of whether we want to rename the "Training Hub" to something more appropriate/descriptive. |
When using Discrete Actions, it is possible to specify that some actions are | ||
impossible for the next decision. Then the Agent is controlled by an External or | ||
Internal Brain, the Agent will be unable to perform the specified action. Note | ||
Learning Brain, the Agent will be unable to perform the specified action. Note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be External that gets corrected to Learning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no external brain anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I know, but you still say 'Then the Agent is controlled by an External or Learning Brain, the Agent will be unable to perform the specified action. Note', which mentions External.
Overall looks good to me. |
* Initial Commit Ported most functionalities, still need to : - Documentation - Add Comments - Custom drawer for BrainParameters - Fix the UnitTests - Review Functionalities * Added Custom Drawer for the Brain Parameters * Improvements to the HubDrawer * Modified the Brain Editors * Minor bug fixes and UI changes * Modified the Help Boxes of the Drawers * Modified Brain class, renamed Initialize and made DecideAction virtual * Fix the UnityTests * Simpler Brain creation menu * Renamed Internal Brain to Learning Brain * modified the parameters to remove reference to External or Internal in the Protobuf objects * Updated the protobuf generated files * Fix the Pytests * Removed the graph scope from the Learning Brain * cleaner logic than try catch * Removed the isExternal field of the brain and put the isTraining logic into LearningBrain and Training Hub * Modified how the Brain finds the Academy * Removed refences to CoreBrain * Fix import bug * Addressed some comments * Remove useless imports * Added nice icons for the brains * Added a feature to deepcopy brain parameters between brains * Resolve drawer bug * Develop scriptable brains ball scene (#1233) * Created the Brains for the Ballance Ball Environment * Modified the Balance Ball Scene * Renamed Training Hub to Broadcast Hub * Added a comment * renamed SetToControlled to SetControlledExternally in the Learning Brain * Resolved errors in case ENABLE_TENSORFLOW is not activated * Update the BalanceBall Scene * Refactored the BrainParameters drawer * Addressed offline comments * Comments on the ResetParametersDrawer * refactired the BroadcastHubDrawer * Adding comments * Add comment on the horizontal bar * Added new comments * Refactor of the Editors * minor changes * Added documentation, Fixed a bug in the tenporary internal brain when TF# is disabled * Develop scriptable brains documentation (#1249) * Modified first docs * modified the markdown, not the images * Missing doc * Replaced Internal with Learned Brain * updated the images * Addressed some comments * Renamed Training Hub to Broadcast Hub * Forgot one file * Added new images * addressing comment * Fixed some typos * address comments on the code * addressed comments on documents * Resolving conflicts on the Learning Brain * Minor tweaks * Addressed Comments * Created a Clone method in the BrainParameters, created a new BrainParameters file, made a CumSum method * Added Unit Test
This PR is towards
develop-scriptable-brains
(and not develop). It contains the changes to the documentation that the feature "Brains as Scriptable Objects" require.Internal Brains
andExternal Brains
are nowLearning Brains
The process of creating brains now goes through
Assets -> Create -> Ml-Agents
Brains are now scriptable objects
There is no longer
BrainType
different types of brains now correspond to different classes of instances of BrainsStill need to update pictures