private void Start() { // get all obstacles and save them into obstacles getBadPositions(); // get all mid positions positions = new MidPoint[10, 10]; calculate_mid_positions(positions); // save all mid positions to a file //var data_positions = JsonWriter.Serialize(positions); //var streamWriter = new StreamWriter(@"D:\midpositions.json"); //streamWriter.Write(data_positions); //streamWriter.Close(); // generate all possible states createStates(); // initialize q-learning matrix store = new QValueStore(n_states, n_actions); // read q-learning matrix store.readMatrix(); // initialize problem problem = new ReinforcementProblem(); //store.printQValueStore(); // one iteration test //QLearning(problem, 1, 1, 0, 0, 0); hp_text_object = GameObject.Find("HP").GetComponent <Text>(); energy_text_object = GameObject.Find("Energy").GetComponent <Text>(); actions_text_object = GameObject.Find("Actions").GetComponent <Text>(); }