Created
June 14, 2018 11:42
-
-
Save jangirrishabh/be55a5d44e5b1ff13dfa68cc96f6b1b1 to your computer and use it in GitHub Desktop.
Snippet for toyCarIRL, blog usage, not executable
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 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