Commit b5478714 authored by anon's avatar anon
Browse files

Q4 Pass, refactor Q4

parent db760cd6
......@@ -162,10 +162,7 @@ class AsynchronousValueIterationAgent(ValueIterationAgent):
def runValueIteration(self):
states = self.mdp.getStates()
for i in range(self.iterations):
state = states.pop(0)
except IndexError:
states = self.mdp.getStates()
state = states[i % len(states)]
rewards = util.Counter()
actions = self.mdp.getPossibleActions(state)
for action in actions:
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