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

remove .getA1() calls from value and policy returns because arrays rather than...

remove .getA1() calls from value and policy returns because arrays rather than matrices are being used now
parent 50770057
...@@ -1013,8 +1013,8 @@ class LP(MDP): ...@@ -1013,8 +1013,8 @@ class LP(MDP):
self.time = time() - self.time self.time = time() - self.time
# store value and policy as tuples # store value and policy as tuples
self.V = tuple(self.V.getA1().tolist()) self.V = tuple(self.V.tolist())
self.policy = tuple(self.policy.getA1().tolist()) self.policy = tuple(self.policy.tolist())
class PolicyIteration(MDP): class PolicyIteration(MDP):
...@@ -1293,8 +1293,8 @@ class PolicyIteration(MDP): ...@@ -1293,8 +1293,8 @@ class PolicyIteration(MDP):
self.time = time() - self.time self.time = time() - self.time
# store value and policy as tuples # store value and policy as tuples
self.V = tuple(self.V.getA1().tolist()) self.V = tuple(self.V.tolist())
self.policy = tuple(self.policy.getA1().tolist()) self.policy = tuple(self.policy.tolist())
class PolicyIterationModified(PolicyIteration): class PolicyIterationModified(PolicyIteration):
...@@ -1409,8 +1409,8 @@ class PolicyIterationModified(PolicyIteration): ...@@ -1409,8 +1409,8 @@ class PolicyIterationModified(PolicyIteration):
self.time = time() - self.time self.time = time() - self.time
# store value and policy as tuples # store value and policy as tuples
self.V = tuple(self.V.getA1().tolist()) self.V = tuple(self.V.tolist())
self.policy = tuple(self.policy.getA1().tolist()) self.policy = tuple(self.policy.tolist())
class QLearning(MDP): class QLearning(MDP):
...@@ -1695,8 +1695,8 @@ class RelativeValueIteration(MDP): ...@@ -1695,8 +1695,8 @@ class RelativeValueIteration(MDP):
self.time = time() - self.time self.time = time() - self.time
# store value and policy as tuples # store value and policy as tuples
self.V = tuple(self.V.getA1().tolist()) self.V = tuple(self.V.tolist())
self.policy = tuple(self.policy.getA1().tolist()) self.policy = tuple(self.policy.tolist())
class ValueIteration(MDP): class ValueIteration(MDP):
...@@ -2038,7 +2038,7 @@ class ValueIterationGS(ValueIteration): ...@@ -2038,7 +2038,7 @@ class ValueIterationGS(ValueIteration):
self.time = time() - self.time self.time = time() - self.time
self.V = tuple(self.V.getA1().tolist()) self.V = tuple(self.V.tolist())
self.policy = tuple(self.policy) self.policy = tuple(self.policy)
if __name__ == "__main__": if __name__ == "__main__":
......
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