GitHub
5 年前
当前提交
88b917b3
共有 117 个文件被更改,包括 603 次插入 和 737 次删除
-
9UnitySDK/Assets/ML-Agents/Editor/AgentEditor.cs
-
10UnitySDK/Assets/ML-Agents/Editor/BrainEditor.cs
-
58UnitySDK/Assets/ML-Agents/Editor/BrainParametersDrawer.cs
-
10UnitySDK/Assets/ML-Agents/Editor/BroadcastHubDrawer.cs
-
2UnitySDK/Assets/ML-Agents/Editor/Builder.cs
-
4UnitySDK/Assets/ML-Agents/Editor/BuilderUtils.cs
-
6UnitySDK/Assets/ML-Agents/Editor/DemonstrationDrawer.cs
-
2UnitySDK/Assets/ML-Agents/Editor/DemonstrationImporter.cs
-
6UnitySDK/Assets/ML-Agents/Editor/HeuristicBrainEditor.cs
-
14UnitySDK/Assets/ML-Agents/Editor/LearningBrainEditor.cs
-
20UnitySDK/Assets/ML-Agents/Editor/PlayerBrainEditor.cs
-
10UnitySDK/Assets/ML-Agents/Editor/ResetParameterDrawer.cs
-
22UnitySDK/Assets/ML-Agents/Editor/Tests/DemonstrationTests.cs
-
5UnitySDK/Assets/ML-Agents/Editor/Tests/DiscreteActionOutputApplierTest.cs
-
29UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestActionMasker.cs
-
16UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestInternalBrainTensorApplier.cs
-
20UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestInternalBrainTensorGenerator.cs
-
65UnitySDK/Assets/ML-Agents/Editor/Tests/MLAgentsEditModeTest.cs
-
2UnitySDK/Assets/ML-Agents/Editor/Tests/MultinomialTest.cs
-
2UnitySDK/Assets/ML-Agents/Editor/Tests/RandomNormalTest.cs
-
4UnitySDK/Assets/ML-Agents/Editor/Tests/RayPerceptionTests.cs
-
2UnitySDK/Assets/ML-Agents/Editor/Tests/TensorUtilsTest.cs
-
16UnitySDK/Assets/ML-Agents/Editor/Tests/UtilitiesTests.cs
-
3UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs
-
5UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs
-
16UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs
-
7UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs
-
2UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs
-
12UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs
-
10UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs
-
29UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaLogic.cs
-
9UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs
-
30UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs
-
2UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs
-
13UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs
-
33UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs
-
20UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs
-
2UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs
-
16UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs
-
11UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs
-
16UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs
-
11UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs
-
9UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs
-
8UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/GoalDetect.cs
-
29UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs
-
20UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs
-
5UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAcademy.cs
-
7UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs
-
24UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidArea.cs
-
3UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidSwitch.cs
-
7UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAcademy.cs
-
5UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs
-
15UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherDecision.cs
-
18UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherGoal.cs
-
10UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/AdjustTrainingTimescale.cs
-
7UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/Area.cs
-
4UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs
-
11UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/FlyCamera.cs
-
2UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/GroundContact.cs
-
12UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs
-
6UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs
-
35UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception.cs
-
10UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception2D.cs
-
14UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception3D.cs
-
2UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetContact.cs
-
26UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs
-
6UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerAcademy.cs
-
5UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerBallController.cs
-
13UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs
-
11UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAcademy.cs
-
14UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAgent.cs
-
3UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateDecision.cs
-
24UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs
-
4UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAcademy.cs
-
15UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs
-
14UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs
-
2UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAcademy.cs
-
6UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
-
18UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAcademy.cs
-
76UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs
-
8UnitySDK/Assets/ML-Agents/Plugins/Barracuda.Core/Barracuda/Plugins/Editor/BarracudaEditor/NNModelImporter.cs
-
12UnitySDK/Assets/ML-Agents/Plugins/Barracuda.Core/Barracuda/Plugins/OSX/MacBLAS.cs
-
10UnitySDK/Assets/ML-Agents/Plugins/Barracuda.Core/Barracuda/Plugins/iOS/iOSBLAS.cs
-
34UnitySDK/Assets/ML-Agents/Scripts/Academy.cs
-
21UnitySDK/Assets/ML-Agents/Scripts/ActionMasker.cs
-
15UnitySDK/Assets/ML-Agents/Scripts/Agent.cs
-
10UnitySDK/Assets/ML-Agents/Scripts/BCTeacherHelper.cs
-
2UnitySDK/Assets/ML-Agents/Scripts/Batcher.cs
-
9UnitySDK/Assets/ML-Agents/Scripts/Brain.cs
-
18UnitySDK/Assets/ML-Agents/Scripts/BrainParameters.cs
-
10UnitySDK/Assets/ML-Agents/Scripts/BroadcastHub.cs
-
15UnitySDK/Assets/ML-Agents/Scripts/Communicator.cs
-
10UnitySDK/Assets/ML-Agents/Scripts/Decision.cs
-
8UnitySDK/Assets/ML-Agents/Scripts/Demonstration.cs
-
8UnitySDK/Assets/ML-Agents/Scripts/DemonstrationRecorder.cs
-
2UnitySDK/Assets/ML-Agents/Scripts/DemonstrationStore.cs
-
5UnitySDK/Assets/ML-Agents/Scripts/HeuristicBrain.cs
-
12UnitySDK/Assets/ML-Agents/Scripts/InferenceBrain/ApplierImpl.cs
-
44UnitySDK/Assets/ML-Agents/Scripts/InferenceBrain/BarracudaModelParamLoader.cs
-
6UnitySDK/Assets/ML-Agents/Scripts/InferenceBrain/GeneratorImpl.cs
|
|||
using System.Collections; |
|||
using System.Collections; |
|||
public class BananaLogic : MonoBehaviour { |
|||
|
|||
public class BananaLogic : MonoBehaviour |
|||
{ |
|||
void Start () { |
|||
|
|||
void Start() |
|||
{ |
|||
|
|||
|
|||
void Update () { |
|||
|
|||
void Update() |
|||
{ |
|||
public void OnEaten() { |
|||
if (respawn) |
|||
public void OnEaten() |
|||
{ |
|||
if (respawn) |
|||
transform.position = new Vector3(Random.Range(-myArea.range, myArea.range), |
|||
3f, |
|||
Random.Range(-myArea.range, myArea.range)) + myArea.transform.position; |
|||
transform.position = new Vector3(Random.Range(-myArea.range, myArea.range), |
|||
3f, |
|||
Random.Range(-myArea.range, myArea.range)) + myArea.transform.position; |
|||
else |
|||
else |
|||
{ |
|||
Destroy(gameObject); |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections; |
|||
public class BasicAcademy : Academy { |
|||
|
|||
public class BasicAcademy : Academy |
|||
{ |
|||
|
|||
|
|||
|
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections; |
|||
public class BouncerAcademy : Academy { |
|||
|
|||
public class BouncerAcademy : Academy |
|||
{ |
|||
Physics.gravity = new Vector3(0,-9.8f*gravityMultiplier,0); |
|||
Physics.gravity = new Vector3(0, -9.8f * gravityMultiplier, 0); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections; |
|||
public class ReacherDecision : Decision { |
|||
|
|||
public override float[] Decide (List<float> state, List<Texture2D> observation, float reward, bool done, List<float> memory) |
|||
public class ReacherDecision : Decision |
|||
{ |
|||
public override float[] Decide(List<float> state, List<Texture2D> observation, float reward, bool done, List<float> memory) |
|||
for (int i = 0; i < 4; i++) { |
|||
for (int i = 0; i < 4; i++) |
|||
{ |
|||
|
|||
public override List<float> MakeMemory (List<float> state, List<Texture2D> observation, float reward, bool done, List<float> memory) |
|||
public override List<float> MakeMemory(List<float> state, List<Texture2D> observation, float reward, bool done, List<float> memory) |
|||
|
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections; |
|||
public abstract class RayPerception : MonoBehaviour { |
|||
public abstract class RayPerception : MonoBehaviour |
|||
{ |
|||
protected List<float> perceptionBuffer = new List<float>(); |
|||
protected List<float> perceptionBuffer = new List<float>(); |
|||
public virtual List<float> Perceive(float rayDistance, |
|||
float[] rayAngles, string[] detectableObjects, |
|||
float startOffset, float endOffset) |
|||
{ |
|||
return perceptionBuffer; |
|||
} |
|||
public virtual List<float> Perceive(float rayDistance, |
|||
float[] rayAngles, string[] detectableObjects, |
|||
float startOffset, float endOffset) |
|||
{ |
|||
return perceptionBuffer; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Converts degrees to radians.
|
|||
/// </summary>
|
|||
public static float DegreeToRadian(float degree) |
|||
{ |
|||
return degree * Mathf.PI / 180f; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Converts degrees to radians.
|
|||
/// </summary>
|
|||
public static float DegreeToRadian(float degree) |
|||
{ |
|||
return degree * Mathf.PI / 180f; |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections; |
|||
public class TemplateAcademy : Academy { |
|||
|
|||
public class TemplateAcademy : Academy |
|||
{ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections; |
|||
public class TemplateAgent : Agent { |
|||
|
|||
|
|||
|
|||
public class TemplateAgent : Agent |
|||
{ |
|||
|
|||
{ |
|||
|
|||
{ |
|||
|
|||
|
|||
} |
|||
} |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue