Commit b88931dd authored by Steven Cordwell's avatar Steven Cordwell
Browse files

change from iter = iter + 1 to iter += 1

parent 3eaaa0e8
......@@ -1153,7 +1153,7 @@ class PolicyIteration(MDP):
itr = 0
done = False
while not done:
itr = itr + 1
itr += 1
Vprev = policy_V
policy_V = policy_R + self.discount * policy_P * Vprev
......@@ -1213,7 +1213,7 @@ class PolicyIteration(MDP):
self.time = time()
while not done:
self.iter = self.iter + 1
self.iter += 1
# these _evalPolicy* functions will update the classes value
# attribute
......@@ -1339,7 +1339,7 @@ class PolicyIterationModified(PolicyIteration):
done = False
while not done:
self.iter = self.iter + 1
self.iter += 1
self.policy, Vnext = self._bellmanOperator()
#[Ppolicy, PRpolicy] = mdp_computePpolicyPRpolicy(P, PR, policy);
......@@ -1622,7 +1622,7 @@ class RelativeValueIteration(MDP):
while not done:
self.iter = self.iter + 1;
self.iter += 1;
self.policy, Vnext = self._bellmanOperator()
Vnext = Vnext - self.gain
......@@ -1861,7 +1861,7 @@ class ValueIteration(MDP):
self.time = time()
done = False
while not done:
self.iter = self.iter + 1
self.iter += 1
Vprev = self.V.copy()
......@@ -1951,7 +1951,7 @@ class ValueIterationGS(ValueIteration):
self.time = time()
while not done:
self.iter = self.iter + 1
self.iter += 1
Vprev = self.V.copy()
......
Markdown is supported
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