Skip to content

Commit

Permalink
agent confidence 버그 픽스
Browse files Browse the repository at this point in the history
  • Loading branch information
quantylab committed Jun 7, 2018
1 parent ef77fd9 commit a6f50ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def decide_action(self, policy_network, sample, epsilon):
exploration = False
probs = policy_network.predict(sample) # 각 행동에 대한 확률
action = np.argmax(probs)
confidence = 1 + probs[action]
confidence = probs[action]
return action, confidence, exploration

def validate_action(self, action):
Expand Down
6 changes: 1 addition & 5 deletions agent_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def decide_action(self, policy_network, sample, epsilon):
exploration = False
probs = policy_network.predict(sample) # 각 행동에 대한 확률
action = np.argmax(probs) if np.max(probs) > 0.1 else Agent.ACTION_HOLD
confidence = 1 + probs[action]
confidence = probs[action]
return action, confidence, exploration

def validate_action(self, action):
Expand Down Expand Up @@ -167,7 +167,3 @@ def act(self, action, confidence):
else:
delayed_reward = -1
return self.immediate_reward, delayed_reward



# confidence = 1 + probs[action] / (np.sum(probs))

0 comments on commit a6f50ac

Please sign in to comment.