Last active
January 9, 2019 13:51
-
-
Save amineremache/5221d88e5c86fb9fc4dc9e018760b1bd to your computer and use it in GitHub Desktop.
The Q-localSearch implementation for Bee Swarm Optimization algorithm
This file contains hidden or 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 ql_localSearch(self): | |
| for step in range(10): | |
| state = self.solution.copy() | |
| next_state, action, self.reward = self.data.ql.step(self.data,state) | |
| self.fitness = self.data.ql.get_q_value(self.data,state,action)[0] | |
| self.data.ql.learn(self.data,state,action,self.reward,next_state) | |
| self.solution = next_state.copy() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment