Last active
August 23, 2020 15:29
-
-
Save YannBerthelot/402a0fe94e0c0be2990f68246f3d976a to your computer and use it in GitHub Desktop.
Rewards
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reward(self): | |
if self.finished: | |
reward = np.log(((5000 - self.FlightModel.Pos[0]) ** 2)) #if sucessfull reward based on how much runway is left (5000 being the length of the runway). | |
else: | |
reward = -1 #else, if unsucessful, give a small punition. | |
return reward |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment