浏览代码

Fix to max step of large agent, heal laser

/develop/cubewars/splashdamage
Ervin Teng 4 年前
当前提交
03a2b4eb
共有 4 个文件被更改,包括 165 次插入8 次删除
  1. 46
      Project/Assets/ML-Agents/Examples/CubeWars/Prefabs/CubeWarArea.prefab
  2. 22
      Project/Assets/ML-Agents/Examples/CubeWars/Scripts/CubeWarArea.cs
  3. 97
      Project/Assets/ML-Agents/Examples/CubeWars/Materials/heal_laser.mat
  4. 8
      Project/Assets/ML-Agents/Examples/CubeWars/Materials/heal_laser.mat.meta

46
Project/Assets/ML-Agents/Examples/CubeWars/Prefabs/CubeWarArea.prefab


largeAgents:
- {fileID: 0}
range: 1
MaxEnvironmentSteps: 10000
MaxEnvironmentSteps: 5000
--- !u!1 &3952752091333818756
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5707177387575911509}
serializedVersion: 2
m_Mass: 10
m_Mass: 50
m_Drag: 0.5
m_AngularDrag: 0.05
m_UseGravity: 1

VectorActionDescriptions: []
VectorActionSpaceType: 0
hasUpgradedBrainParametersWithActionSpec: 1
m_Model: {fileID: 11400000, guid: fa881d0c4f6b44ea9880a781d0771fc9, type: 3}
m_Model: {fileID: 11400000, guid: 94b4c8f1d024049fe9cb0b180fe00229, type: 3}
m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: LargeCubeSoldier

agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
MaxStep: 3000
MaxStep: 0
area: {fileID: 1819751139121548}
turnSpeed: 150
moveSpeed: 1

propertyPath: m_Name
value: SmallAgent (2)
objectReference: {fileID: 0}
- target: {fileID: 8195483629779642977, guid: 4dd35c7381e7445c99133a34a83e21db,
type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 11400000, guid: 8267498eac5574215b37d92bf7e3f621,
type: 3}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4dd35c7381e7445c99133a34a83e21db, type: 3}
--- !u!4 &6276286609035264789 stripped

propertyPath: m_Name
value: SmallAgent (1)
objectReference: {fileID: 0}
- target: {fileID: 8195483629779642977, guid: 4dd35c7381e7445c99133a34a83e21db,
type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 11400000, guid: 8267498eac5574215b37d92bf7e3f621,
type: 3}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4dd35c7381e7445c99133a34a83e21db, type: 3}
--- !u!4 &5634558950757305706 stripped

propertyPath: m_Name
value: SmallAgent
objectReference: {fileID: 0}
- target: {fileID: 8195483629779642977, guid: 4dd35c7381e7445c99133a34a83e21db,
type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 11400000, guid: 8267498eac5574215b37d92bf7e3f621,
type: 3}
- target: {fileID: 8705827100738960883, guid: 4dd35c7381e7445c99133a34a83e21db,
type: 3}
propertyPath: m_Parameters.colorGradient.key0.r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8705827100738960883, guid: 4dd35c7381e7445c99133a34a83e21db,
type: 3}
propertyPath: m_Parameters.colorGradient.key0.g
value: 0.0039215684
objectReference: {fileID: 0}
- target: {fileID: 8705827100738960883, guid: 4dd35c7381e7445c99133a34a83e21db,
type: 3}
propertyPath: m_Parameters.colorGradient.key0.b
value: 0.9774704
objectReference: {fileID: 0}
- target: {fileID: 8705827100738960883, guid: 4dd35c7381e7445c99133a34a83e21db,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 07bc6a1dce9694cc49527eb9bc3f0345, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4dd35c7381e7445c99133a34a83e21db, type: 3}
--- !u!4 &4419274671784554 stripped

22
Project/Assets/ML-Agents/Examples/CubeWars/Scripts/CubeWarArea.cs


m_ResetTimer += 1;
if (m_ResetTimer > MaxEnvironmentSteps)
{
ResetAllAgents();
ResetAllAgents(true);
public void ResetAllAgents()
public void ResetAllAgents(bool terminated = false)
smallAgent.EndEpisode();
if (terminated)
{
smallAgent.EpisodeInterrupted();
}
else
{
smallAgent.EndEpisode();
}
largeAgent.EndEpisode();
if (terminated)
{
largeAgent.EpisodeInterrupted();
}
else
{
largeAgent.EndEpisode();
}
}
}
public void AgentDied()

97
Project/Assets/ML-Agents/Examples/CubeWars/Materials/heal_laser.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: heal_laser
m_Shader: {fileID: 211, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: EFFECT_BUMP _ALPHABLEND_ON _EMISSION
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: e452f4aeface5494994b159409f31869, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BlendOp: 0
- _BumpScale: 1
- _CameraFadingEnabled: 0
- _CameraFarFadeDistance: 2
- _CameraNearFadeDistance: 1
- _ColorMode: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DistortionBlend: 0.066
- _DistortionEnabled: 1
- _DistortionStrength: 0.2
- _DistortionStrengthScaled: 0.020000001
- _DstBlend: 1
- _EmissionEnabled: 1
- _FlipbookMode: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _LightingEnabled: 0
- _Metallic: 0
- _Mode: 4
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SoftParticlesEnabled: 0
- _SoftParticlesFarFadeDistance: 1
- _SoftParticlesNearFadeDistance: 0
- _SpecularHighlights: 1
- _SrcBlend: 5
- _UVSec: 0
- _ZWrite: 0
m_Colors:
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
- _Color: {r: 0.3578205, g: 1, b: 0, a: 0.6784314}
- _ColorAddSubDiff: {r: -1, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0.35640025, g: 1, b: 0, a: 1}
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}

8
Project/Assets/ML-Agents/Examples/CubeWars/Materials/heal_laser.mat.meta


fileFormatVersion: 2
guid: 07bc6a1dce9694cc49527eb9bc3f0345
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存