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
83b22387
Commit
83b22387
authored
Jul 15, 2017
by
drallensmith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--record as option for random agents
parent
4dff9748
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
10 deletions
+24
-10
example/high_action_random_agent.py
example/high_action_random_agent.py
+12
-5
example/high_level_random_agent.py
example/high_level_random_agent.py
+12
-5
No files found.
example/high_action_random_agent.py
View file @
83b22387
...
...
@@ -23,7 +23,9 @@ def main():
help
=
"Python randomization seed; uses python default if 0 or not given"
)
parser
.
add_argument
(
'--no-reorient'
,
action
=
'store_true'
,
help
=
"Do not use the new Reorient action"
)
parser
.
add_argument
(
'--record-dir'
,
type
=
str
,
default
=
'log/'
,
parser
.
add_argument
(
'--record'
,
action
=
'store_true'
,
help
=
"Doing HFO --record"
)
parser
.
add_argument
(
'--rdir'
,
type
=
str
,
default
=
'log/'
,
help
=
"Set directory to use if doing HFO --record"
)
args
=
parser
.
parse_args
()
if
args
.
seed
:
...
...
@@ -32,10 +34,15 @@ def main():
hfo_env
=
hfo
.
HFOEnvironment
()
# Connect to the server with the specified
# feature set. See feature sets in hfo.py/hfo.hpp.
hfo_env
.
connectToServer
(
hfo
.
LOW_LEVEL_FEATURE_SET
,
'bin/teams/base/config/formations-dt'
,
args
.
port
,
'localhost'
,
'base_left'
,
False
,
record_dir
=
args
.
record_dir
)
if
args
.
record
:
hfo_env
.
connectToServer
(
hfo
.
LOW_LEVEL_FEATURE_SET
,
'bin/teams/base/config/formations-dt'
,
args
.
port
,
'localhost'
,
'base_left'
,
False
,
record_dir
=
args
.
rdir
)
else
:
hfo_env
.
connectToServer
(
hfo
.
LOW_LEVEL_FEATURE_SET
,
'bin/teams/base/config/formations-dt'
,
args
.
port
,
'localhost'
,
'base_left'
,
False
)
if
args
.
seed
:
print
(
"Python randomization seed: {0:d}"
.
format
(
args
.
seed
))
for
episode
in
itertools
.
count
():
...
...
example/high_level_random_agent.py
View file @
83b22387
...
...
@@ -21,7 +21,9 @@ def main():
help
=
"Server port"
)
parser
.
add_argument
(
'--seed'
,
type
=
int
,
default
=
None
,
help
=
"Python randomization seed; uses python default if 0 or not given"
)
parser
.
add_argument
(
'--record-dir'
,
type
=
str
,
default
=
'log/'
,
parser
.
add_argument
(
'--record'
,
action
=
'store_true'
,
help
=
"Doing HFO --record"
)
parser
.
add_argument
(
'--rdir'
,
type
=
str
,
default
=
'log/'
,
help
=
"Set directory to use if doing HFO --record"
)
args
=
parser
.
parse_args
()
if
args
.
seed
:
...
...
@@ -30,10 +32,15 @@ def main():
hfo_env
=
hfo
.
HFOEnvironment
()
# Connect to the server with the specified
# feature set. See feature sets in hfo.py/hfo.hpp.
hfo_env
.
connectToServer
(
hfo
.
HIGH_LEVEL_FEATURE_SET
,
'bin/teams/base/config/formations-dt'
,
args
.
port
,
'localhost'
,
'base_left'
,
False
,
record_dir
=
args
.
record_dir
)
if
args
.
record
:
hfo_env
.
connectToServer
(
hfo
.
HIGH_LEVEL_FEATURE_SET
,
'bin/teams/base/config/formations-dt'
,
args
.
port
,
'localhost'
,
'base_left'
,
False
,
record_dir
=
args
.
rdir
)
else
:
hfo_env
.
connectToServer
(
hfo
.
HIGH_LEVEL_FEATURE_SET
,
'bin/teams/base/config/formations-dt'
,
args
.
port
,
'localhost'
,
'base_left'
,
False
)
if
args
.
seed
:
print
(
"Python randomization seed: {0:d}"
.
format
(
args
.
seed
))
for
episode
in
itertools
.
count
():
...
...
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