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
c4ffdac8
Commit
c4ffdac8
authored
Jul 13, 2017
by
drallensmith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made REORIENT suppressable by an option for high_action_random_agent.py
parent
b2def020
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
example/high_action_random_agent.py
example/high_action_random_agent.py
+4
-1
No files found.
example/high_action_random_agent.py
View file @
c4ffdac8
...
@@ -21,6 +21,8 @@ def main():
...
@@ -21,6 +21,8 @@ def main():
help
=
"Server port"
)
help
=
"Server port"
)
parser
.
add_argument
(
'--seed'
,
type
=
int
,
default
=
None
,
parser
.
add_argument
(
'--seed'
,
type
=
int
,
default
=
None
,
help
=
"Python randomization seed; uses python default if 0 or not given"
)
help
=
"Python randomization seed; uses python default if 0 or not given"
)
parser
.
add_argument
(
'--no-reorient'
,
action
=
'store_true'
,
help
=
"Do not use rew reorient action"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
if
args
.
seed
:
if
args
.
seed
:
random
.
seed
(
args
.
seed
)
random
.
seed
(
args
.
seed
)
...
@@ -49,7 +51,8 @@ def main():
...
@@ -49,7 +51,8 @@ def main():
hfo_env
.
act
(
hfo
.
DRIBBLE
)
hfo_env
.
act
(
hfo
.
DRIBBLE
)
num_had_ball
+=
1
num_had_ball
+=
1
# 8 is frozen; rest are self or ball position/velocity valid
# 8 is frozen; rest are self or ball position/velocity valid
elif
(
state
[
8
]
>
0
)
or
(
min
(
state
[
0
],
state
[
1
],
state
[
50
],
state
[
54
])
<
0
):
elif
(((
state
[
8
]
>
0
)
or
(
min
(
state
[
0
],
state
[
1
],
state
[
50
],
state
[
54
])
<
0
))
and
not
args
.
no_reorient
):
hfo_env
.
act
(
hfo
.
REORIENT
)
hfo_env
.
act
(
hfo
.
REORIENT
)
num_reorient
+=
1
num_reorient
+=
1
else
:
else
:
...
...
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