示例#1
0
 private void Awake()
 {
     agentRef         = FindObjectOfType <BilliardAgent>();
     gameSystemRef    = FindObjectOfType <BilliardGameSystem>();
     heatmapRef       = FindObjectOfType <HeatMap>();
     trainerRef       = FindObjectOfType <TrainerMimic>();
     agentDecisionRef = agentRef.GetComponent <DecisionMAES>();
 }
示例#2
0
 public override void InitializeAgent()
 {
     if (gameSystem == null)
     {
         gameSystem = GetComponentInChildren <BilliardGameSystem>() as BilliardGameSystem;
     }
     //gameSystem.Reset(randomizeRedballs);
 }
示例#3
0
 // Use this for initialization
 void Start()
 {
     //cache game objects
     whiteBall = GameObject.Find("WhiteBall");
     stick     = GameObject.Find("Stick");
     stick.SetActive(false);
     gameSystem = GameObject.FindObjectOfType <BilliardGameSystem>();
 }
 private void Awake()
 {
     agentRef         = FindObjectOfType <BilliardAgent>();
     gameSystemRef    = FindObjectOfType <BilliardGameSystem>();
     heatmapRef       = FindObjectOfType <HeatMap>();
     trainerRef       = FindObjectOfType <TrainerMimic>();
     agentDecisionRef = agentRef.GetComponent <DecisionMAES>();
     if (agentDecisionRef && agentDecisionRef.GetComponent <ESOptimizer>())
     {
         defaultMAESInitStep = agentDecisionRef.GetComponent <ESOptimizer>().initialStepSize;
     }
 }
示例#5
0
 private void Start()
 {
     gameSystem = FindObjectOfType(typeof(BilliardGameSystem)) as BilliardGameSystem;
     Debug.Assert(gameSystem != null, "Did not find BilliardGameSystem in the scene");
 }
示例#6
0
 private void Awake()
 {
     gameSystemRef = FindObjectOfType <BilliardGameSystem>();
     agentRef      = FindObjectOfType <BilliardAgent>();
     agentSimplRef = FindObjectOfType <BilliardSimple>();
 }