//Every scene needs an academy script.
//Create an empty gameObject and attach this script.
//The brain needs to be a child of the Academy gameObject.
using UnityEngine;
using MLAgents;
public class PushBlockAcademy : Academy
{
///
/// The "walking speed" of the agents in the scene.
///
public float agentRunSpeed;
///
/// The agent rotation speed.
/// Every agent will use this setting.
///
public float agentRotationSpeed;
///
/// The spawn area margin multiplier.
/// ex: .9 means 90% of spawn area will be used.
/// .1 margin will be left (so players don't spawn off of the edge).
/// The higher this value, the longer training time required.
///
public float spawnAreaMarginMultiplier;
///
/// When a goal is scored the ground will switch to this
/// material for a few seconds.
///
public Material goalScoredMaterial;
///
/// When an agent fails, the ground will turn this material for a few seconds.
///
public Material failMaterial;
///
/// The gravity multiplier.
/// Use ~3 to make things less floaty
///
public float gravityMultiplier;
void State()
{
Physics.gravity *= gravityMultiplier;
}
}