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
5c51529a
Commit
5c51529a
authored
Nov 16, 2015
by
Matthew Hausknecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added high-level catch action.
parent
e1f0e319
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
1 deletion
+15
-1
hfo/hfo.py
hfo/hfo.py
+3
-1
src/HFO.cpp
src/HFO.cpp
+8
-0
src/HFO.hpp
src/HFO.hpp
+1
-0
src/agent.cpp
src/agent.cpp
+3
-0
No files found.
hfo/hfo.py
View file @
5c51529a
...
@@ -22,12 +22,13 @@ class HFO_Actions:
...
@@ -22,12 +22,13 @@ class HFO_Actions:
[High-Level] Shoot(): Shoot the ball
[High-Level] Shoot(): Shoot the ball
[High-Level] Pass(teammate_unum): Pass to teammate
[High-Level] Pass(teammate_unum): Pass to teammate
[High-Level] Dribble(): Offensive dribble
[High-Level] Dribble(): Offensive dribble
[High-Level] Catch(): Catch the ball (Goalie Only)
NOOP(): Do Nothing
NOOP(): Do Nothing
QUIT(): Quit the game
QUIT(): Quit the game
'''
'''
DASH
,
TURN
,
TACKLE
,
KICK
,
KICK_TO
,
MOVE_TO
,
DRIBBLE_TO
,
INTERCEPT
,
\
DASH
,
TURN
,
TACKLE
,
KICK
,
KICK_TO
,
MOVE_TO
,
DRIBBLE_TO
,
INTERCEPT
,
\
MOVE
,
SHOOT
,
PASS
,
DRIBBLE
,
NOOP
,
QUIT
=
range
(
14
)
MOVE
,
SHOOT
,
PASS
,
DRIBBLE
,
CATCH
,
NOOP
,
QUIT
=
range
(
15
)
class
HFO_Status
:
class
HFO_Status
:
''' Current status of the HFO game. '''
''' Current status of the HFO game. '''
...
@@ -59,6 +60,7 @@ class HFOEnvironment(object):
...
@@ -59,6 +60,7 @@ class HFOEnvironment(object):
HFO_Actions
.
SHOOT
:
0
,
HFO_Actions
.
SHOOT
:
0
,
HFO_Actions
.
PASS
:
1
,
HFO_Actions
.
PASS
:
1
,
HFO_Actions
.
DRIBBLE
:
0
,
HFO_Actions
.
DRIBBLE
:
0
,
HFO_Actions
.
CATCH
:
0
,
HFO_Actions
.
NOOP
:
0
,
HFO_Actions
.
NOOP
:
0
,
HFO_Actions
.
QUIT
:
0
}
.
get
(
action_type
,
-
1
);
HFO_Actions
.
QUIT
:
0
}
.
get
(
action_type
,
-
1
);
...
...
src/HFO.cpp
View file @
5c51529a
...
@@ -41,6 +41,12 @@ std::string HFOEnvironment::ActionToString(Action action) {
...
@@ -41,6 +41,12 @@ std::string HFOEnvironment::ActionToString(Action action) {
case
DRIBBLE
:
case
DRIBBLE
:
ss
<<
"Dribble"
;
ss
<<
"Dribble"
;
break
;
break
;
case
CATCH
:
ss
<<
"Catch"
;
break
;
case
NOOP
:
ss
<<
"No-op"
;
break
;
case
QUIT
:
case
QUIT
:
ss
<<
"Quit"
;
ss
<<
"Quit"
;
break
;
break
;
...
@@ -74,6 +80,8 @@ int HFOEnvironment::NumParams(action_t action) {
...
@@ -74,6 +80,8 @@ int HFOEnvironment::NumParams(action_t action) {
return
1
;
return
1
;
case
DRIBBLE
:
case
DRIBBLE
:
return
0
;
return
0
;
case
CATCH
:
return
0
;
case
NOOP
:
case
NOOP
:
return
0
;
return
0
;
case
QUIT
:
case
QUIT
:
...
...
src/HFO.hpp
View file @
5c51529a
...
@@ -29,6 +29,7 @@ enum action_t
...
@@ -29,6 +29,7 @@ enum action_t
SHOOT
,
// [High-Level] Shoot(): Shoot the ball
SHOOT
,
// [High-Level] Shoot(): Shoot the ball
PASS
,
// [High-Level] Pass(teammate_unum [0,11]): Pass to the most open teammate
PASS
,
// [High-Level] Pass(teammate_unum [0,11]): Pass to the most open teammate
DRIBBLE
,
// [High-Level] Dribble(): Offensive dribble
DRIBBLE
,
// [High-Level] Dribble(): Offensive dribble
CATCH
,
// [High-Level] Catch(): Catch the ball (Goalie only!)
NOOP
,
// Do nothing
NOOP
,
// Do nothing
QUIT
// Special action to quit the game
QUIT
// Special action to quit the game
};
};
...
...
src/agent.cpp
View file @
5c51529a
...
@@ -496,6 +496,9 @@ void Agent::actionImpl() {
...
@@ -496,6 +496,9 @@ void Agent::actionImpl() {
case
DRIBBLE
:
case
DRIBBLE
:
this
->
doDribble
();
this
->
doDribble
();
break
;
break
;
case
CATCH
:
this
->
doCatch
();
break
;
case
NOOP
:
case
NOOP
:
break
;
break
;
case
QUIT
:
case
QUIT
:
...
...
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