Commit 62e39c85 authored by drallensmith's avatar drallensmith

Merge branch 'master' into cmake_work - avoid rebase

parents ada1d48e 851d2059
...@@ -70,7 +70,7 @@ for (int episode=0; episode<5; episode++) { ...@@ -70,7 +70,7 @@ for (int episode=0; episode<5; episode++) {
```python ```python
hfo = hfo.HFOEnvironment() hfo = hfo.HFOEnvironment()
hfo.connectServer(...) 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 status = IN_GAME
while status == IN_GAME: while status == IN_GAME:
features = hfo.getState() features = hfo.getState()
......
...@@ -52,11 +52,14 @@ def get_action(state,hfo_env,num_teammates): ...@@ -52,11 +52,14 @@ def get_action(state,hfo_env,num_teammates):
curr_goal_angle = goal_op_angle): curr_goal_angle = goal_op_angle):
hfo_env.act(PASS, teammate_uniform_number) hfo_env.act(PASS, teammate_uniform_number)
return 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]): if can_dribble(dist_to_op = state[9]):
hfo_env.act(DRIBBLE) hfo_env.act(DRIBBLE)
return return
# If nothing can be done pass # If nothing can be done, do not do anything
hfo_env.act(PASS) # doesn't this require a target teammate? hfo_env.act(NOOP)
def main(): def main():
......
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