浏览代码

do raycasting during heuristic

/2D-exploration-raycast
Chris Elion 5 年前
当前提交
5aa420ae
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 4
      UnitySDK/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea2D.prefab
  2. 1
      UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJump2DAgent.cs

4
UnitySDK/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea2D.prefab


m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1014421213912728}
m_LocalRotation: {x: -0, y: 0.0523359, z: -0, w: 0.9986295}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -4.6418, y: 1.1930466, z: -2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []

- goal
raysPerDirection: 3
maxRayDegrees: 70
sphereCastRadius: 0.45
sphereCastRadius: 0.5
rayLength: 20
observationStacks: 1
rayHitColor: {r: 1, g: 0, b: 0, a: 1}

1
UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJump2DAgent.cs


public override float[] Heuristic()
{
GenerateSensorData();
bool pressed = false;
var action = new float[4];
if (Input.GetKey(KeyCode.D))

正在加载...
取消
保存