GitHub
7 年前
当前提交
bf858cd6
共有 517 个文件被更改,包括 5858 次插入 和 6137 次删除
-
2.gitattributes
-
2.gitignore
-
3Dockerfile
-
15README.md
-
16docs/Feature-Monitor.md
-
117docs/Getting-Started-with-Balance-Ball.md
-
71docs/Installation-Windows.md
-
14docs/Installation.md
-
4docs/Learning-Environment-Best-Practices.md
-
25docs/Learning-Environment-Create-New.md
-
6docs/Learning-Environment-Design-Agents.md
-
1docs/Learning-Environment-Design-Heuristic-Brains.md
-
120docs/Learning-Environment-Examples.md
-
7docs/ML-Agents-Overview.md
-
22docs/Python-API.md
-
16docs/Readme.md
-
11docs/Training-Curriculum-Learning.md
-
15docs/Training-Imitation-Learning.md
-
20docs/Training-ML-Agents.md
-
22docs/Training-PPO.md
-
196docs/Training-on-Amazon-Web-Service.md
-
14docs/Using-Docker.md
-
12docs/Using-TensorFlow-Sharp-in-Unity.md
-
11docs/Using-Tensorboard.md
-
2docs/dox-ml-agents.conf
-
999docs/images/crawler.png
-
577docs/images/cuDNN_membership_required.png
-
181docs/images/cuda_toolkit_directory.PNG
-
178docs/images/cudnn_zip_files.PNG
-
649docs/images/mlagents-TensorBoard.png
-
218docs/images/new_system_variable.PNG
-
127docs/images/path_variables.PNG
-
47docs/images/system_variable_name_value.PNG
-
2docs/localized/zh-CN/README.md
-
6docs/localized/zh-CN/docs/Getting-Started-with-Balance-Ball.md
-
2docs/localized/zh-CN/docs/Installation.md
-
10docs/localized/zh-CN/docs/ML-Agents-Overview.md
-
6docs/localized/zh-CN/docs/Readme.md
-
9python/curricula/wall.json
-
26python/learn.py
-
4python/requirements.txt
-
164python/tests/test_bc.py
-
344python/tests/test_ppo.py
-
218python/tests/test_unityagents.py
-
113python/tests/test_unitytrainers.py
-
76python/trainer_config.yaml
-
549python/unityagents/environment.py
-
14python/unitytrainers/bc/models.py
-
60python/unitytrainers/bc/trainer.py
-
14python/unitytrainers/buffer.py
-
236python/unitytrainers/models.py
-
138python/unitytrainers/ppo/models.py
-
373python/unitytrainers/ppo/trainer.py
-
39python/unitytrainers/trainer.py
-
45python/unitytrainers/trainer_controller.py
-
130unity-environment/Assets/ML-Agents/Editor/AgentEditor.cs
-
159unity-environment/Assets/ML-Agents/Editor/BrainEditor.cs
-
2unity-environment/Assets/ML-Agents/Editor/MLAgentsEditModeTest.cs
-
199unity-environment/Assets/ML-Agents/Editor/ResetParameterDrawer.cs
-
3unity-environment/Assets/ML-Agents/Examples.meta
-
1unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs
-
42unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs
-
1unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs
-
42unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs
-
955unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes
-
2unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes.meta
-
959unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes
-
2unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes.meta
-
10unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab
-
63unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab
-
1unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs
-
65unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs
-
1unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs
-
986unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes
-
1unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs
-
18unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs
-
1unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs
-
1unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs
-
42unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs
-
14unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs
-
340unity-environment/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes
-
2unity-environment/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes.meta
-
5unity-environment/Assets/ML-Agents/Examples/Crawler.meta
-
2unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs.meta
-
881unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab
-
5unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab.meta
-
2unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts.meta
-
9unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs
-
5unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs.meta
-
5unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels.meta
-
1unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs
-
11unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs
-
1unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/HallwayArea.prefab
-
33unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity
-
1unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs
-
16unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs
-
427unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab
-
361unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity
-
19unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs
-
1unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs
|
|||
# Training on Amazon Web Service |
|||
|
|||
This page contains instructions for setting up an EC2 instance on Amazon Web Service for training ML-Agents environments. You can run "headless" training if none of the agents in the environment use visual observations. |
|||
This page contains instructions for setting up an EC2 instance on Amazon Web Service for training ML-Agents environments. |
|||
## Pre-Configured AMI |
|||
A public pre-configured AMI is available with the ID: `ami-30ec184a` in the `us-east-1` region. It was created as a modification of the Amazon Deep Learning [AMI](https://aws.amazon.com/marketplace/pp/B01M0AXXQB). |
|||
## Preconfigured AMI |
|||
## Configuring your own Instance |
|||
We've prepared an preconfigured AMI for you with the ID: `ami-6880c317` in the `us-east-1` region. It was created as a modification of [Deep Learning AMI (Ubuntu)](https://aws.amazon.com/marketplace/pp/B077GCH38C). If you want to do training without the headless mode, you need to enable X Server on it. After launching your EC2 instance using the ami and ssh into it, run the following commands to enable it: |
|||
1. To begin with, you will need an EC2 instance which contains the latest Nvidia drivers, CUDA8, and cuDNN. There are a number of external tutorials which describe this, such as: |
|||
* [Getting CUDA 8 to Work With openAI Gym on AWS and Compiling TensorFlow for CUDA 8 Compatibility](https://davidsanwald.github.io/2016/11/13/building-tensorflow-with-gpu-support.html) |
|||
* [Installing TensorFlow on an AWS EC2 P2 GPU Instance](http://expressionflow.com/2016/10/09/installing-tensorflow-on-an-aws-ec2-p2-gpu-instance/) |
|||
* [Updating Nvidia CUDA to 8.0.x in Ubuntu 16.04 – EC2 Gx instance](https://aichamp.wordpress.com/2016/11/09/updating-nvidia-cuda-to-8-0-x-in-ubuntu-16-04-ec2-gx-instance/) |
|||
``` |
|||
//Start the X Server, press Enter to come to the command line |
|||
sudo /usr/bin/X :0 & |
|||
## Installing ML-Agents |
|||
//Check if Xorg process is running |
|||
//You will have a list of processes running on the GPU, Xorg should be in the list, as shown below |
|||
nvidia-smi |
|||
/* |
|||
* Thu Jun 14 20:27:26 2018 |
|||
* +-----------------------------------------------------------------------------+ |
|||
* | NVIDIA-SMI 390.67 Driver Version: 390.67 | |
|||
* |-------------------------------+----------------------+----------------------+ |
|||
* | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | |
|||
* | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |
|||
* |===============================+======================+======================| |
|||
* | 0 Tesla K80 On | 00000000:00:1E.0 Off | 0 | |
|||
* | N/A 35C P8 31W / 149W | 9MiB / 11441MiB | 0% Default | |
|||
* +-------------------------------+----------------------+----------------------+ |
|||
* |
|||
* +-----------------------------------------------------------------------------+ |
|||
* | Processes: GPU Memory | |
|||
* | GPU PID Type Process name Usage | |
|||
* |=============================================================================| |
|||
* | 0 2331 G /usr/lib/xorg/Xorg 8MiB | |
|||
* +-----------------------------------------------------------------------------+ |
|||
*/ |
|||
2. Move `python` sub-folder of this ml-agents repo to the remote ECS instance, and set it as the working directory. |
|||
2. Install the required packages with `pip3 install .`. |
|||
//Make the ubuntu use X Server for display |
|||
export DISPLAY=:0 |
|||
``` |
|||
## Testing |
|||
## Configuring your own Instance |
|||
To verify that all steps worked correctly: |
|||
You could also choose to configure your own instance. To begin with, you will need an EC2 instance which contains the latest Nvidia drivers, CUDA9, and cuDNN. In this tutorial we used the [Deep Learning AMI (Ubuntu)](https://aws.amazon.com/marketplace/pp/B077GCH38C) listed under AWS Marketplace with a p2.xlarge instance. |
|||
1. In the Unity Editor, load a project containing an ML-Agents environment (you can use one of the example environments if you have not created your own). |
|||
2. Open the Build Settings window (menu: File > Build Settings). |
|||
3. Select Linux as the Target Platform, and x86_64 as the target architecture. |
|||
4. Check Headless Mode (unless you have enabled a virtual screen following the instructions below). |
|||
5. Click Build to build the Unity environment executable. |
|||
6. Upload the executable to your EC2 instance. |
|||
7. Test the instance setup from Python using: |
|||
### Installing ML-Agents on the instance |
|||
|
|||
After launching your EC2 instance using the ami and ssh into it: |
|||
|
|||
1. Activate the python3 environment |
|||
|
|||
``` |
|||
source activate python3 |
|||
``` |
|||
```python |
|||
from unityagents import UnityEnvironment |
|||
2. Clone the ML-Agents repo and install the required python packages |
|||
env = UnityEnvironment(<your_env>) |
|||
``` |
|||
Where `<your_env>` corresponds to the path to your environment executable. |
|||
|
|||
You should receive a message confirming that the environment was loaded successfully. |
|||
``` |
|||
git clone https://github.com/Unity-Technologies/ml-agents.git |
|||
cd ml-agents/python |
|||
pip3 install . |
|||
``` |
|||
## (Optional) Enabling a virtual screen |
|||
### Setting up X Server (optional) |
|||
_Instructions here are adapted from this [Medium post](https://medium.com/towards-data-science/how-to-run-unity-on-amazon-cloud-or-without-monitor-3c10ce022639) on running general Unity applications in the cloud._ |
|||
X Server setup is only necessary if you want to do training that requires visual observation input. _Instructions here are adapted from this [Medium post](https://medium.com/towards-data-science/how-to-run-unity-on-amazon-cloud-or-without-monitor-3c10ce022639) on running general Unity applications in the cloud._ |
|||
1. Run the following commands to install Xorg: |
|||
1. Install and setup Xorg: |
|||
//Install Xorg |
|||
|
|||
//Get the BusID information |
|||
nvidia-xconfig --query-gpu-info |
|||
|
|||
//Add the BusID information to your /etc/X11/xorg.conf file |
|||
sudo sed -i 's/ BoardName "Tesla K80"/ BoardName "Tesla K80"\n BusID "0:30:0"/g' /etc/X11/xorg.conf |
|||
|
|||
//Remove the Section "Files" from the /etc/X11/xorg.conf file |
|||
sudo vim /etc/X11/xorg.conf //And remove two lines that contain Section "Files" and EndSection |
|||
2. Restart the EC2 instance. |
|||
2. Update and setup Nvidia driver: |
|||
3. Make sure there are no Xorg processes running. To kill the Xorg processes, run `sudo killall Xorg`. |
|||
Note that you might have to run this command multiple times depending on how Xorg is configured. |
|||
If you run `nvidia-smi`, you will have a list of processes running on the GPU, Xorg should not be in the list. |
|||
``` |
|||
//Download and install the latest Nvidia driver for ubuntu |
|||
wget http://download.nvidia.com/XFree86/Linux-x86_64/390.67/NVIDIA-Linux-x86_64-390.67.run |
|||
sudo /bin/bash ./NVIDIA-Linux-x86_64-390.67.run --accept-license --no-questions --ui=none |
|||
4. Run: |
|||
//Disable Nouveau as it will clash with the Nvidia driver |
|||
sudo echo 'blacklist nouveau' | sudo tee -a /etc/modprobe.d/blacklist.conf |
|||
sudo echo 'options nouveau modeset=0' | sudo tee -a /etc/modprobe.d/blacklist.conf |
|||
sudo echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf |
|||
sudo update-initramfs -u |
|||
``` |
|||
|
|||
2. Restart the EC2 instance: |
|||
|
|||
``` |
|||
sudo reboot now |
|||
``` |
|||
|
|||
3. Make sure there are no Xorg processes running: |
|||
|
|||
``` |
|||
//Kill any possible running Xorg processes |
|||
//Note that you might have to run this command multiple times depending on how Xorg is configured. |
|||
sudo killall Xorg |
|||
|
|||
//Check if there is any Xorg process left |
|||
//You will have a list of processes running on the GPU, Xorg should not be in the list, as shown below. |
|||
nvidia-smi |
|||
/* |
|||
* Thu Jun 14 20:21:11 2018 |
|||
* +-----------------------------------------------------------------------------+ |
|||
* | NVIDIA-SMI 390.67 Driver Version: 390.67 | |
|||
* |-------------------------------+----------------------+----------------------+ |
|||
* | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | |
|||
* | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |
|||
* |===============================+======================+======================| |
|||
* | 0 Tesla K80 On | 00000000:00:1E.0 Off | 0 | |
|||
* | N/A 37C P8 31W / 149W | 0MiB / 11441MiB | 0% Default | |
|||
* +-------------------------------+----------------------+----------------------+ |
|||
* |
|||
* +-----------------------------------------------------------------------------+ |
|||
* | Processes: GPU Memory | |
|||
* | GPU PID Type Process name Usage | |
|||
* |=============================================================================| |
|||
* | No running processes found | |
|||
* +-----------------------------------------------------------------------------+ |
|||
*/ |
|||
``` |
|||
|
|||
4. Start X Server and make the ubuntu use X Server for display: |
|||
//Start the X Server, press Enter to come to the command line |
|||
|
|||
//Check if Xorg process is running |
|||
//You will have a list of processes running on the GPU, Xorg should be in the list. |
|||
nvidia-smi |
|||
|
|||
//Make the ubuntu use X Server for display |
|||
|
|||
5. To ensure the installation was successful, run `glxgears`. If there are no errors, then Xorg is correctly configured. |
|||
|
|||
5. Ensure the Xorg is correctly configured: |
|||
|
|||
``` |
|||
//For more information on glxgears, see ftp://www.x.org/pub/X11R6.8.1/doc/glxgears.1.html. |
|||
glxgears |
|||
//If Xorg is configured correctly, you should see the following message |
|||
/* |
|||
* Running synchronized to the vertical refresh. The framerate should be |
|||
* approximately the same as the monitor refresh rate. |
|||
* 137296 frames in 5.0 seconds = 27459.053 FPS |
|||
* 141674 frames in 5.0 seconds = 28334.779 FPS |
|||
* 141490 frames in 5.0 seconds = 28297.875 FPS |
|||
*/ |
|||
``` |
|||
|
|||
## Training on EC2 instance |
|||
|
|||
1. In the Unity Editor, load a project containing an ML-Agents environment (you can use one of the example environments if you have not created your own). |
|||
2. Open the Build Settings window (menu: File > Build Settings). |
|||
3. Select Linux as the Target Platform, and x86_64 as the target architecture. |
|||
4. Check Headless Mode (If you haven't setup the X Server). |
|||
5. Click Build to build the Unity environment executable. |
|||
6. Upload the executable to your EC2 instance within `ml-agents/python` folder. |
|||
7. Test the instance setup from Python using: |
|||
|
|||
```python |
|||
from unityagents import UnityEnvironment |
|||
|
|||
env = UnityEnvironment(<your_env>) |
|||
``` |
|||
Where `<your_env>` corresponds to the path to your environment executable. |
|||
|
|||
You should receive a message confirming that the environment was loaded successfully. |
|||
8. Train the executable |
|||
|
|||
``` |
|||
//cd into your ml-agents/python folder |
|||
chmod +x <your_env>.x86_64 |
|||
python learn.py <your_env> --train |
|||
``` |
999
docs/images/crawler.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
218
docs/images/new_system_variable.PNG
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
{ |
|||
"measure" : "reward", |
|||
"thresholds" : [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], |
|||
"measure" : "progress", |
|||
"thresholds" : [0.1, 0.3, 0.5], |
|||
"min_wall_height" : [0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5], |
|||
"max_wall_height" : [1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0] |
|||
"big_wall_min_height" : [0.0, 4.0, 6.0, 8.0], |
|||
"big_wall_max_height" : [4.0, 7.0, 8.0, 8.0], |
|||
"small_wall_height" : [1.5, 2.0, 2.5, 4.0] |
|||
} |
|||
} |
|
|||
using UnityEngine; |
|||
using UnityEditor; |
|||
|
|||
namespace MLAgents |
|||
{ |
|||
[CustomEditor(typeof(Agent), true)] |
|||
[CanEditMultipleObjects] |
|||
public class AgentEditor : Editor |
|||
{ |
|||
|
|||
public override void OnInspectorGUI() |
|||
[CustomEditor(typeof(Agent), true)] |
|||
[CanEditMultipleObjects] |
|||
public class AgentEditor : Editor |
|||
SerializedObject serializedAgent = serializedObject; |
|||
serializedAgent.Update(); |
|||
SerializedProperty brain = serializedAgent.FindProperty("brain"); |
|||
SerializedProperty actionsPerDecision = serializedAgent.FindProperty( |
|||
"agentParameters.numberOfActionsBetweenDecisions"); |
|||
SerializedProperty maxSteps = serializedAgent.FindProperty( |
|||
"agentParameters.maxStep"); |
|||
SerializedProperty isResetOnDone = serializedAgent.FindProperty( |
|||
"agentParameters.resetOnDone"); |
|||
SerializedProperty isODD = serializedAgent.FindProperty( |
|||
"agentParameters.onDemandDecision"); |
|||
SerializedProperty cameras = serializedAgent.FindProperty( |
|||
"agentParameters.agentCameras"); |
|||
public override void OnInspectorGUI() |
|||
{ |
|||
SerializedObject serializedAgent = serializedObject; |
|||
serializedAgent.Update(); |
|||
EditorGUILayout.PropertyField(brain); |
|||
SerializedProperty brain = serializedAgent.FindProperty("brain"); |
|||
SerializedProperty actionsPerDecision = serializedAgent.FindProperty( |
|||
"agentParameters.numberOfActionsBetweenDecisions"); |
|||
SerializedProperty maxSteps = serializedAgent.FindProperty( |
|||
"agentParameters.maxStep"); |
|||
SerializedProperty isResetOnDone = serializedAgent.FindProperty( |
|||
"agentParameters.resetOnDone"); |
|||
SerializedProperty isODD = serializedAgent.FindProperty( |
|||
"agentParameters.onDemandDecision"); |
|||
SerializedProperty cameras = serializedAgent.FindProperty( |
|||
"agentParameters.agentCameras"); |
|||
EditorGUILayout.LabelField("Agent Cameras"); |
|||
for (int i = 0; i < cameras.arraySize; i++) |
|||
{ |
|||
EditorGUILayout.PropertyField( |
|||
cameras.GetArrayElementAtIndex(i), |
|||
new GUIContent("Camera " + (i + 1).ToString() + ": ")); |
|||
} |
|||
EditorGUILayout.BeginHorizontal(); |
|||
if (GUILayout.Button("Add Camera", EditorStyles.miniButton)) |
|||
{ |
|||
cameras.arraySize++; |
|||
} |
|||
if (GUILayout.Button("Remove Camera", EditorStyles.miniButton)) |
|||
{ |
|||
cameras.arraySize--; |
|||
} |
|||
EditorGUILayout.EndHorizontal(); |
|||
EditorGUILayout.PropertyField(brain); |
|||
EditorGUILayout.PropertyField( |
|||
maxSteps, |
|||
new GUIContent( |
|||
"Max Step", "The per-agent maximum number of steps.")); |
|||
EditorGUILayout.PropertyField( |
|||
isResetOnDone, |
|||
new GUIContent( |
|||
"Reset On Done", |
|||
"If checked, the agent will reset on done. Else, AgentOnDone() will be called.")); |
|||
EditorGUILayout.PropertyField( |
|||
isODD, |
|||
new GUIContent( |
|||
"On Demand Decisions", |
|||
"If checked, you must manually request decisions.")); |
|||
if (!isODD.boolValue) |
|||
{ |
|||
EditorGUILayout.LabelField("Agent Cameras"); |
|||
for (int i = 0; i < cameras.arraySize; i++) |
|||
{ |
|||
EditorGUILayout.PropertyField( |
|||
cameras.GetArrayElementAtIndex(i), |
|||
new GUIContent("Camera " + (i + 1).ToString() + ": ")); |
|||
} |
|||
|
|||
EditorGUILayout.BeginHorizontal(); |
|||
if (GUILayout.Button("Add Camera", EditorStyles.miniButton)) |
|||
{ |
|||
cameras.arraySize++; |
|||
} |
|||
|
|||
if (GUILayout.Button("Remove Camera", EditorStyles.miniButton)) |
|||
{ |
|||
cameras.arraySize--; |
|||
} |
|||
|
|||
EditorGUILayout.EndHorizontal(); |
|||
|
|||
EditorGUILayout.PropertyField( |
|||
maxSteps, |
|||
new GUIContent( |
|||
"Max Step", "The per-agent maximum number of steps.")); |
|||
EditorGUILayout.PropertyField( |
|||
isResetOnDone, |
|||
new GUIContent( |
|||
"Reset On Done", |
|||
"If checked, the agent will reset on done. Else, AgentOnDone() will be called.")); |
|||
actionsPerDecision, |
|||
isODD, |
|||
"Decision Frequency", |
|||
"The agent will automatically request a decision every X" + |
|||
" steps and perform an action at every step.")); |
|||
actionsPerDecision.intValue = Mathf.Max(1, actionsPerDecision.intValue); |
|||
} |
|||
"On Demand Decisions", |
|||
"If checked, you must manually request decisions.")); |
|||
if (!isODD.boolValue) |
|||
{ |
|||
EditorGUILayout.PropertyField( |
|||
actionsPerDecision, |
|||
new GUIContent( |
|||
"Decision Frequency", |
|||
"The agent will automatically request a decision every X" + |
|||
" steps and perform an action at every step.")); |
|||
actionsPerDecision.intValue = Mathf.Max(1, actionsPerDecision.intValue); |
|||
} |
|||
serializedAgent.ApplyModifiedProperties(); |
|||
serializedAgent.ApplyModifiedProperties(); |
|||
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); |
|||
base.OnInspectorGUI(); |
|||
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); |
|||
base.OnInspectorGUI(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 6584f096f53dc43eeb32803b91f36c5c |
|||
folderAsset: yes |
|||
timeCreated: 1504127503 |
|||
licenseType: Pro |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
955
unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: e91b53b17600f4c23a270f97bad1e60d |
|||
guid: 93f91f35982184949a09d9ce97965cd5 |
|||
TextScriptImporter: |
|||
externalObjects: {} |
|||
userData: |
959
unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 0e03e86d2b6f24436a00cad74dcd5d5f |
|||
guid: 477e2fb07d79544e48897e8ba162a74f |
|||
TextScriptImporter: |
|||
externalObjects: {} |
|||
userData: |
986
unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件