public double Run(TravelGameState state) { if (state.locations[_player] == _goal) { return(0); } TravelWorld world = state.ToWorld(); TravelPath cheapPath = world.findCheapestPath(state.locations[_player], _goal); var closeToPenality = (_MaxMoves - state.totalMoves[_player]) - cheapPath.Count; var res = -cheapPath.Cost(); if (closeToPenality <= 0) { res += 100; } return(res); }
private bool basicCutOf(TravelGameState state) { return(state.locations[agent] == 4 || state.totalMoves[agent] >= 4); }