Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ public enum Position

public override void Initialize()
{
m_Existential = 1f / MaxStep;
SoccerEnvController envController = GetComponentInParent<SoccerEnvController>();
if (envController != null)
{
m_Existential = 1f / envController.MaxEnvironmentSteps;
}
else
{
m_Existential = 1f / MaxStep;
}

m_BehaviorParameters = gameObject.GetComponent<BehaviorParameters>();
if (m_BehaviorParameters.TeamId == (int)Team.Blue)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class PlayerInfo
/// Max Academy steps before this platform resets
/// </summary>
/// <returns></returns>
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
[Tooltip("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;

/// <summary>
/// The area bounds.
Expand Down