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
e52a84f4
Commit
e52a84f4
authored
Aug 10, 2017
by
drallensmith
Browse files
Options
Browse Files
Download
Plain Diff
Merge with add_reorient so can do cleanly after that
parents
8740b55b
732c2b99
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
doc/manual.pdf
doc/manual.pdf
+0
-0
doc/manual.tex
doc/manual.tex
+0
-1
hfo/hfo.py
hfo/hfo.py
+8
-0
src/agent.cpp
src/agent.cpp
+6
-2
No files found.
doc/manual.pdf
View file @
e52a84f4
No preview for this file type
doc/manual.tex
View file @
e52a84f4
...
@@ -596,7 +596,6 @@ faithfully report which action spaces were used.
...
@@ -596,7 +596,6 @@ faithfully report which action spaces were used.
with the specified uniform number.
}
with the specified uniform number.
}
\item
{
\textbf
{
Reorient
}
(): Deal with loss of self or ball localization information and
\item
{
\textbf
{
Reorient
}
(): Deal with loss of self or ball localization information and
pay increased attention to surroundings.
}
pay increased attention to surroundings.
}
\end{itemize}
\end{itemize}
\subsection
{
Special Actions
}
\subsection
{
Special Actions
}
...
...
hfo/hfo.py
View file @
e52a84f4
...
@@ -29,6 +29,7 @@ An enum of the possible HFO actions, including:
...
@@ -29,6 +29,7 @@ An enum of the possible HFO actions, including:
QUIT(): Quit the game
QUIT(): Quit the game
"""
"""
NUM_HFO_ACTIONS
=
20
NUM_HFO_ACTIONS
=
20
<<<<<<<
HEAD
DASH
,
TURN
,
TACKLE
,
KICK
,
KICK_TO
,
MOVE_TO
,
DRIBBLE_TO
,
INTERCEPT
,
MOVE
,
SHOOT
,
PASS
,
DRIBBLE
,
CATCH
,
NOOP
,
QUIT
,
REDUCE_ANGLE_TO_GOAL
,
MARK_PLAYER
,
DEFEND_GOAL
,
GO_TO_BALL
,
REORIENT
=
list
(
range
(
NUM_HFO_ACTIONS
))
DASH
,
TURN
,
TACKLE
,
KICK
,
KICK_TO
,
MOVE_TO
,
DRIBBLE_TO
,
INTERCEPT
,
MOVE
,
SHOOT
,
PASS
,
DRIBBLE
,
CATCH
,
NOOP
,
QUIT
,
REDUCE_ANGLE_TO_GOAL
,
MARK_PLAYER
,
DEFEND_GOAL
,
GO_TO_BALL
,
REORIENT
=
list
(
range
(
NUM_HFO_ACTIONS
))
ACTION_STRINGS
=
{
DASH
:
"Dash"
,
ACTION_STRINGS
=
{
DASH
:
"Dash"
,
TURN
:
"Turn"
,
TURN
:
"Turn"
,
...
@@ -53,6 +54,13 @@ ACTION_STRINGS = {DASH: "Dash",
...
@@ -53,6 +54,13 @@ ACTION_STRINGS = {DASH: "Dash",
"""
"""
Possible game statuses:
Possible game statuses:
=======
DASH, TURN, TACKLE, KICK, KICK_TO, MOVE_TO, DRIBBLE_TO, INTERCEPT,
\
MOVE, SHOOT, PASS, DRIBBLE, CATCH, NOOP, QUIT, REDUCE_ANGLE_TO_GOAL,MARK_PLAYER,DEFEND_GOAL,GO_TO_BALL,REORIENT = list(range(NUM_HFO_ACTIONS))
ACTION_STRINGS = ["Dash", "Turn", "Tackle", "Kick", "KickTo", "MoveTo", "DribbleTo", "Intercept", "Move", "Shoot", "Pass", "Dribble", "Catch", "No-op", "Quit", "Reduce_Angle_To_Goal", "Mark_Player", "Defend_Goal", "Go_To_Ball", "Reorient"]
''' Possible game status
>>>>>>> add_reorient
[IN_GAME] Game is currently active
[IN_GAME] Game is currently active
[GOAL] A goal has been scored by the offense
[GOAL] A goal has been scored by the offense
[CAPTURED_BY_DEFENSE] The defense has captured the ball
[CAPTURED_BY_DEFENSE] The defense has captured the ball
...
...
src/agent.cpp
View file @
e52a84f4
...
@@ -642,7 +642,7 @@ Agent::doPreprocess()
...
@@ -642,7 +642,7 @@ Agent::doPreprocess()
__FILE__
": (doPreProcess)"
);
__FILE__
": (doPreProcess)"
);
//
//
// fr
eezed
by tackle effect
// fr
ozen
by tackle effect
//
//
if
(
wm
.
self
().
isFrozen
()
)
if
(
wm
.
self
().
isFrozen
()
)
{
{
...
@@ -766,7 +766,8 @@ Agent::doReorient()
...
@@ -766,7 +766,8 @@ Agent::doReorient()
dlog
.
addText
(
Logger
::
TEAM
,
dlog
.
addText
(
Logger
::
TEAM
,
__FILE__
": tackle wait. expires= %d"
,
__FILE__
": tackle wait. expires= %d"
,
wm
.
self
().
tackleExpires
()
);
wm
.
self
().
tackleExpires
()
);
if
(
Bhv_Emergency
().
execute
(
this
)){
// includes change view
if
(
Bhv_Emergency
().
execute
(
this
))
{
// includes change view
return
ACTION_STATUS_MAYBE
;
return
ACTION_STATUS_MAYBE
;
}
else
{
}
else
{
return
ACTION_STATUS_UNKNOWN
;
return
ACTION_STATUS_UNKNOWN
;
...
@@ -824,6 +825,7 @@ Agent::doReorient()
...
@@ -824,6 +825,7 @@ Agent::doReorient()
{
{
dlog
.
addText
(
Logger
::
TEAM
,
dlog
.
addText
(
Logger
::
TEAM
,
__FILE__
": search ball"
);
__FILE__
": search ball"
);
if
(
Bhv_NeckBodyToBall
().
execute
(
this
))
{
if
(
Bhv_NeckBodyToBall
().
execute
(
this
))
{
return
ACTION_STATUS_MAYBE
;
return
ACTION_STATUS_MAYBE
;
}
else
{
}
else
{
...
@@ -831,6 +833,7 @@ Agent::doReorient()
...
@@ -831,6 +833,7 @@ Agent::doReorient()
}
}
}
}
//
//
// check pass message
// check pass message
//
//
...
@@ -843,6 +846,7 @@ Agent::doReorient()
...
@@ -843,6 +846,7 @@ Agent::doReorient()
if
(
!
(
ball
.
rposValid
()
&&
ball
.
velValid
()
))
{
if
(
!
(
ball
.
rposValid
()
&&
ball
.
velValid
()
))
{
dlog
.
addText
(
Logger
::
TEAM
,
dlog
.
addText
(
Logger
::
TEAM
,
__FILE__
": search ball"
);
__FILE__
": search ball"
);
if
(
Bhv_NeckBodyToBall
().
execute
(
this
))
{
if
(
Bhv_NeckBodyToBall
().
execute
(
this
))
{
return
ACTION_STATUS_MAYBE
;
return
ACTION_STATUS_MAYBE
;
}
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