V3.1.4 应用Parameter数值到Script
应用Parameter数值到Script
This commit is contained in:
@@ -20,7 +20,7 @@ public class AgentController : MonoBehaviour
|
||||
public float vX = 0f;
|
||||
public float vZ = 0f;
|
||||
public Vector3 thisMovement;
|
||||
public float acceleration = 0.1f; // 加速度
|
||||
public float acceleration = 0.9f; // 加速度
|
||||
public float mouseXSensitivity = 100;
|
||||
public float mouseYSensitivity = 200;
|
||||
public float yRotation = 0.1f;//定义一个浮点类型的量,记录‘围绕’X轴旋转的角度
|
||||
|
||||
@@ -19,90 +19,90 @@ public class ParameterContainer : MonoBehaviour
|
||||
public int timeLimit = 30;
|
||||
public bool lockCameraX = false;
|
||||
public bool lockCameraY = true;
|
||||
public bool spawnAgentInAllMap = false;
|
||||
public int spinRecordMax = 20;
|
||||
public float spinPenaltyThreshold = 50;
|
||||
public bool spawnAgentInAllMap = true;
|
||||
public int spinRecordMax = 40;
|
||||
public float spinPenaltyThreshold = 10;
|
||||
public float facingInviewEnemyDisCOEF = 0.5f;
|
||||
|
||||
[Header("Dynamic Defaut Rewards")]
|
||||
//[Tooltip("Hit Enemy reward")]
|
||||
//public float hitRewardDefault = 60.0f;
|
||||
[Tooltip("Free mode Hit Enemy reward")]
|
||||
public float hitTargetRewardDefault = 60.0f;
|
||||
public float hitTargetRewardDefault = 25f;
|
||||
|
||||
//[Tooltip("Enemy down reward")]
|
||||
//public float killRewardDefault = 60.0f;
|
||||
[Tooltip("Enemy down in area Reward")]
|
||||
public float killTargetEnemyRewardDefault = 100.0f;
|
||||
public float killTargetEnemyRewardDefault = 25f;
|
||||
|
||||
[Tooltip("stay in firebasesArea reward")]
|
||||
public float inAreaRewardDefault = 10.0f;
|
||||
public float inAreaRewardDefault = 12f;
|
||||
|
||||
[Tooltip("free left time bonus reward. ALLR + leftTime * r")]
|
||||
public float freeTimeBonusPerSec = 1.0f;
|
||||
|
||||
[Tooltip("target left time bonus reward. ALLR + leftTime * r")]
|
||||
public float targetTimeBonusPerSec = 3.0f;
|
||||
public float targetTimeBonusPerSec = 0.5f;
|
||||
|
||||
[Tooltip("in area left time bonus reward. ALLR + leftTime * r")]
|
||||
public float areaTimeBonusPerSec = 1.0f;
|
||||
public float areaTimeBonusPerSec = 0.2f;
|
||||
|
||||
[Tooltip("distance reward reward = r*(1-(nowDis/startDis))")]
|
||||
public float distanceReward = 20.0f;
|
||||
public float distanceReward = 50.0f;
|
||||
|
||||
[Tooltip("facing to Target distance reward reward = r*(1-(nowDis/startDis))")]
|
||||
public float facingTargetReward = 20.0f;
|
||||
public float facingTargetReward = 10.0f;
|
||||
|
||||
[Space(10)]
|
||||
[Tooltip("Goto Win reward")]
|
||||
public float goWinRewardDefault = 100.0f;
|
||||
public float goWinRewardDefault = 999f;
|
||||
|
||||
[Tooltip("Attack Win reward")]
|
||||
public float attackWinRewardDefault = 100.0f;
|
||||
public float attackWinRewardDefault = 999f;
|
||||
|
||||
[Tooltip("Defence Win reward")]
|
||||
public float defenceWinRewardDefault = 100.0f;
|
||||
public float defenceWinRewardDefault = 999f;
|
||||
|
||||
[Tooltip("free Win reward")]
|
||||
public float freeWinRewardDefault = 100.0f;
|
||||
public float freeWinRewardDefault = 999f;
|
||||
|
||||
[Header("Static Rewards")]
|
||||
[Tooltip("Nothing happened reward")]
|
||||
public float nonReward = -0.05f;
|
||||
public float nonReward = -1f;
|
||||
|
||||
[Tooltip("Episode Lose reward")]
|
||||
public float loseReward = -0.05f;
|
||||
public float loseReward = -999f;
|
||||
|
||||
[Tooltip("Agent Do shoot action reward")]
|
||||
public float shootReward = -0.1f;
|
||||
public float shootReward = -0.5f;
|
||||
|
||||
[Tooltip("Hit Not target Enemy reward")]
|
||||
public float hitReward = 30.0f;
|
||||
public float hitNonTargetReward = -5f;
|
||||
|
||||
[Tooltip("Not Target Enemy down reward")]
|
||||
public float killReward = 40.0f;
|
||||
public float killNonTargetReward = -5f;
|
||||
|
||||
[Tooltip("Agent Do shoot action but gun is not read")]
|
||||
public float shootWithoutReadyReward = -0.15f;
|
||||
public float shootWithoutReadyReward = -1.15f;
|
||||
|
||||
[Tooltip("Kill bonus reward stack to nothing happend reward")]
|
||||
public float killBonusReward = 0.0f;
|
||||
|
||||
[Tooltip("Facing to enemy's reward")]
|
||||
public float facingReward = 2.0f;
|
||||
public float facingReward = 5f;
|
||||
|
||||
[Tooltip("Shoot at target area but didn't hit enemy")]
|
||||
public float shootTargetAreaReward = 5.0f;
|
||||
public float shootTargetAreaReward = 10f;
|
||||
|
||||
[Header("Penalty Rewards")]
|
||||
[Tooltip("move Penalty Reward")]
|
||||
public float movePenalty = 0f;
|
||||
public float movePenalty = 0.1f;
|
||||
|
||||
[Tooltip("spiiiiiiin Panalty Reward")]
|
||||
public float spinPenalty = 0f;
|
||||
public float spinPenalty = 0.08f;
|
||||
|
||||
[Tooltip("while move mouse a little bit's penalty")]
|
||||
public float mousePenalty = 0f;
|
||||
public float mousePenalty = 0.06f;
|
||||
|
||||
[Header("Dynamic Rewards")]
|
||||
[Tooltip("Free mode Hit Enemy reward")]
|
||||
@@ -112,7 +112,7 @@ public class ParameterContainer : MonoBehaviour
|
||||
public float killTargetEnemyReward = 80.0f;
|
||||
|
||||
[Tooltip("stay in firebasesArea reward")]
|
||||
public float inAreaReward = 1.0f;
|
||||
public float inAreaReward = 5.0f;
|
||||
|
||||
[Space(10)]
|
||||
[Tooltip("go Win reward")]
|
||||
|
||||
@@ -17,7 +17,7 @@ public class RaySensors : MonoBehaviour
|
||||
//[SerializeField, Range(0, 1)] public float totalRange = 1f; // Total view range Max = 1
|
||||
[SerializeField, Range(0, 1)] public float focusRange = 0.15f; // center focus range
|
||||
|
||||
public int halfOuterRayNum = 3; // >=2
|
||||
public int halfOuterRayNum = 7; // >=2
|
||||
public int focusRayNum = 5; // >= 1 and must be odd num!
|
||||
|
||||
[Header("InGameLineSetting")]
|
||||
|
||||
@@ -449,7 +449,7 @@ public class TargetController : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
thisKillReward = paramCon.killReward;
|
||||
thisKillReward = paramCon.killNonTargetReward;
|
||||
}
|
||||
}
|
||||
else if (targetTypeInt == (int)SceneBlockContainer.Targets.Free)
|
||||
@@ -460,7 +460,7 @@ public class TargetController : MonoBehaviour
|
||||
else
|
||||
{
|
||||
// goto & defence
|
||||
thisKillReward = paramCon.killReward;
|
||||
thisKillReward = paramCon.killNonTargetReward;
|
||||
}
|
||||
return thisKillReward;
|
||||
}
|
||||
@@ -481,7 +481,7 @@ public class TargetController : MonoBehaviour
|
||||
else
|
||||
{
|
||||
// hit not in area enemy
|
||||
thisHitReward = paramCon.hitReward;
|
||||
thisHitReward = paramCon.hitNonTargetReward;
|
||||
}
|
||||
}
|
||||
else if (targetTypeInt == (int)SceneBlockContainer.Targets.Free)
|
||||
@@ -492,7 +492,7 @@ public class TargetController : MonoBehaviour
|
||||
else
|
||||
{
|
||||
// goto & defence
|
||||
thisHitReward = paramCon.hitReward;
|
||||
thisHitReward = paramCon.hitNonTargetReward;
|
||||
}
|
||||
return thisHitReward;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user