Skip to content

Instantly share code, notes, and snippets.

@YannBerthelot
Last active August 23, 2020 15:20
Show Gist options
  • Save YannBerthelot/7a6352bdc19ceb0f5f34527eccb2ef83 to your computer and use it in GitHub Desktop.
Save YannBerthelot/7a6352bdc19ceb0f5f34527eccb2ef83 to your computer and use it in GitHub Desktop.
Terminal states
def max_episode_timesteps(self):
return 100
def terminal(self):
self.finished = self.FlightModel.Pos[1] > 25 # The Agent suceeded
self.episode_end = (self.FlightModel.timestep > self.max_step_per_episode) or (
self.FlightModel.Pos[0] > 5000 # The Agent did not suceed (runs of the runway or takes too much time)
)
return self.finished or self.episode_end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment