Commit 10e4b5c8 authored by Wen Yao Jin's avatar Wen Yao Jin
Browse files

go

parent 31a4f82d
......@@ -11,7 +11,7 @@ class Action(IntEnum):
RIGHT = 4
class afterstateAgent:
def __init__(self, mat, TD_lambda = 0.0, alpha = 0.0025, gamma = 0.95, epsilon = 0.01, verbose= True, symmetric=True, tuple = 2):
def __init__(self, mat, TD_lambda = 0.0, alpha = 0.0025, gamma = 0.95, epsilon = 0.01, verbose= True, symmetric=1, tuple = 2):
self.state_per_tile = 12
self.commands = { Action.UP: up, Action.DOWN: down, Action.LEFT: left, Action.RIGHT: right}
self.alpha = alpha
......@@ -197,7 +197,7 @@ class afterstateAgent:
return
s,r = self.test_next(self._action_index,self.state)
n = next_state
if self.symmetric is True:
if self.symmetric>0:
for i in range(4):
s = transpose(s)
self.set_state(s)
......
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