Commit 6dead649 authored by anon's avatar anon
Browse files

Shuffle legal actions

parent 18ae9537
......@@ -81,7 +81,7 @@ class QLearningAgent(ReinforcementAgent):
if len(legalActions) == 0:
return None
# Shuffle so the argmax action is chosen randomly
# random.shuffle(legalActions)
random.shuffle(legalActions)
qValues = [self.getQValue(state, action) for action in legalActions]
maxQ = qValues[0]
maxAction = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment