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
ed256670
Commit
ed256670
authored
Oct 18, 2018
by
CoolPhilChen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an HFO flag to switch on/off determinism
parent
b3137796
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
bin/HFO
bin/HFO
+8
-0
No files found.
bin/HFO
View file @
ed256670
...
@@ -93,6 +93,12 @@ def main(args):
...
@@ -93,6 +93,12 @@ def main(args):
args
.
messageSize
,
args
.
messageSize
,
args
.
verbose
)
args
.
verbose
)
if
args
.
deterministic
:
serverOptions
+=
' server::player_rand=0 '
\
'server::ball_rand=0 '
\
'server::kick_rand=0 '
\
'server::wind_rand=0'
try
:
try
:
signal
.
signal
(
signal
.
SIGTERM
,
term
)
signal
.
signal
(
signal
.
SIGTERM
,
term
)
except
(
ValueError
,
AttributeError
):
except
(
ValueError
,
AttributeError
):
...
@@ -202,6 +208,8 @@ def parseArgs():
...
@@ -202,6 +208,8 @@ def parseArgs():
help
=
'Ball initialization max y position: [-1,1]. Default: 0.8'
)
help
=
'Ball initialization max y position: [-1,1]. Default: 0.8'
)
p
.
add_argument
(
'--verbose'
,
dest
=
'verbose'
,
action
=
'store_true'
,
p
.
add_argument
(
'--verbose'
,
dest
=
'verbose'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Print verbose output.'
)
default
=
False
,
help
=
'Print verbose output.'
)
p
.
add_argument
(
'--deterministic'
,
dest
=
'deterministic'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Make environment deterministic.'
)
args
=
p
.
parse_args
()
args
=
p
.
parse_args
()
if
args
.
offenseAgents
not
in
list
(
range
(
0
,
11
)):
if
args
.
offenseAgents
not
in
list
(
range
(
0
,
11
)):
p
.
error
(
'argument --offense-agents: invalid choice: '
\
p
.
error
(
'argument --offense-agents: invalid choice: '
\
...
...
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