Skip to content

Instantly share code, notes, and snippets.

@YannBerthelot
Last active August 23, 2020 15:29
Show Gist options
  • Save YannBerthelot/402a0fe94e0c0be2990f68246f3d976a to your computer and use it in GitHub Desktop.
Save YannBerthelot/402a0fe94e0c0be2990f68246f3d976a to your computer and use it in GitHub Desktop.
Rewards
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