diff --git a/README.md b/README.md index 49a7148ed446003ec044a1731db76711083032cd..fca82a34f73b6c81fe81875293855c91ac1b128f 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ for (int episode=0; episode<5; episode++) { ```python hfo = hfo.HFOEnvironment() hfo.connectServer(...) -for episode in xrange(5): # replace with range(5) for Python 3.X +for episode in range(5): # replace with xrange(5) for Python 2.X status = IN_GAME while status == IN_GAME: features = hfo.getState() diff --git a/example/high_level_custom_agent.py b/example/high_level_custom_agent.py index 33d42a65cec49070284b91013c6a549596531e95..c8b946e733df7d761f9485166bc779ce12c1f7f6 100755 --- a/example/high_level_custom_agent.py +++ b/example/high_level_custom_agent.py @@ -52,11 +52,14 @@ def get_action(state,hfo_env,num_teammates): curr_goal_angle = goal_op_angle): hfo_env.act(PASS, teammate_uniform_number) return + # not sure if below check is needed - doDribble in agent.cpp includes + # (via doPreprocess) doForceKick, which may cover this situation depending + # on what existKickableOpponent returns. if can_dribble(dist_to_op = state[9]): hfo_env.act(DRIBBLE) return - # If nothing can be done pass - hfo_env.act(PASS) # doesn't this require a target teammate? + # If nothing can be done, do not do anything + hfo_env.act(NOOP) def main():