Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Seminar-HFO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
Seminar-HFO
Commits
39201fcc
Commit
39201fcc
authored
Jul 12, 2017
by
drallensmith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in high_level_random_agent.py; script to do 2v1
parent
7448e17a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
example/high_level_random_agent.py
example/high_level_random_agent.py
+2
-1
example/random_python_2v1.sh
example/random_python_2v1.sh
+13
-0
No files found.
example/high_level_random_agent.py
View file @
39201fcc
...
...
@@ -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
)
...
...
example/random_python_2v1.sh
0 → 100755
View file @
39201fcc
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment