Skip to content

Instantly share code, notes, and snippets.

@jangirrishabh
Created June 14, 2018 11:42
Show Gist options
  • Save jangirrishabh/be55a5d44e5b1ff13dfa68cc96f6b1b1 to your computer and use it in GitHub Desktop.
Save jangirrishabh/be55a5d44e5b1ff13dfa68cc96f6b1b1 to your computer and use it in GitHub Desktop.
Snippet for toyCarIRL, blog usage, not executable
def optimalWeightFinder(self):
i = 1
while True:
W = self.optimization() # optimize to find new weights in the list of policies
print ("weights ::", W )
print ("the distances ::", self.policiesFE.keys())
self.currentT = self.policyListUpdater(W, i)
print ("Current distance (t) is:: ", self.currentT )
if self.currentT <= self.epsilon: # terminate if the point reached close enough
break
i += 1
return W
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment