Skip to content

Commit

Permalink
Add docstring to _rule_action()
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbrenner-ai committed Nov 14, 2018
1 parent 64b691f commit aed35a5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dqn_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ def get_action(self, state, use_rule=False):
return self._dqn_action(state)

def _rule_action(self):
"""
Returns a rule-based policy action.
Selects the next action of a simple rule-based policy.
Returns:
int: The index of the action in the possible actions
dict: The action/response itself
"""

if self.rule_current_slot_index < len(self.rule_request_set):
slot = self.rule_request_set[self.rule_current_slot_index]
self.rule_current_slot_index += 1
Expand Down

0 comments on commit aed35a5

Please sign in to comment.