Created
June 14, 2018 11:42
-
-
Save jangirrishabh/ce0ef99adc652c7469f1bc4303a3af41 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 policyListUpdater(self, W, i): #add the policyFE list and differences | |
tempFE = self.getRLAgentFE(W, i) # get feature expectations of a new policy respective to the input weights | |
hyperDistance = np.abs(np.dot(W, np.asarray(self.expertPolicy)-np.asarray(tempFE))) #hyperdistance = t | |
self.policiesFE[hyperDistance] = tempFE | |
return hyperDistance # t = (weights.tanspose)*(expert-newPolicy) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment