protected float PlayoutHeuristic(WorldModelDST state) { int hp = state.Walter.HP; float cHP = Convert.ToSingle(hp); //Console.WriteLine(hp); //Console.WriteLine(cHP); int hunger = state.Walter.Hunger; float cHunger = Convert.ToSingle(hunger); //Console.WriteLine("Is it Night?"); //Console.WriteLine(Convert.ToSingle(13 - state.CycleInfo[2]) <= (state.Cycle)); //Console.WriteLine(""); if (cHP <= 0) { return(0.0f); } else if (Convert.ToSingle(15 - state.CycleInfo[2]) <= (state.Cycle)) { //Console.WriteLine("light"); //Console.WriteLine(state.LightValueNight()); //Console.WriteLine(state.FoodValue()); //Console.WriteLine(""); return((state.LightValueNight()) * 0.9f + state.FoodValue() * 0.1f); } else { //float reward = ((cHP/150) + (cHunger/150)*4 + (state.LogsValue())*2 + (state.RocksValue())*2 + (state.TorchValueDay())*10 + (state.AxePickaxeValue())*6 + (state.FoodValue())*7)/32; float reward = (state.LightValueDay()) * 0.7f + (state.FoodValue()) * 0.3f; return(reward); } }