Commit 0a6fc010 authored by Wen Yao Jin's avatar Wen Yao Jin
Browse files

go

parent 88045d91
......@@ -115,6 +115,8 @@ class afterstateAgent:
comb += [int(np.log2(state[r][l]))]
else:
comb += [0]
# if sum(comb) > sum(list(self._max_ind))
# self._max_ind = tuple(comb)
return tuple(comb)
# def _size(self, mat):
......@@ -122,6 +124,7 @@ class afterstateAgent:
def act(self):
self.forget = self.TD_lambda
# self._max_ind = (0,0,0,0)
action_index = np.argmax(np.array([self._afterstate(a,act=True) for a in range(len(Action))]))
self._action_index = action_index
return Action(action_index+1)
......
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