Commit 39201fcc authored by drallensmith's avatar drallensmith

Fix bug in high_level_random_agent.py; script to do 2v1

parent 7448e17a
......@@ -47,7 +47,8 @@ def main():
status = hfo_env.step()
# Check the outcome of the episode
print(('Episode %d ended with %s'%(episode, hfo.statusToString(status))))
print(('Episode %d ended with %s'%(episode,
hfo_env.statusToString(status))))
# Quit if the server goes down
if status == hfo.SERVER_DOWN:
hfo_env.act(hfo.QUIT)
......
#!/bin/bash
./bin/HFO --offense-agents=2 --defense-npcs=1 --trials 20 --headless &
sleep 5
python2.7 -x example/high_level_random_agent.py --port 6000 &> agent1.txt &
sleep 5
python3 -x example/high_level_random_agent.py --port 6000 &> agent2.txt &
# The magic line
# $$ holds the PID for this script
# Negation means kill by process group id instead of PID
trap "kill -TERM -$$" SIGINT
wait
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