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
167bca8b
Commit
167bca8b
authored
Nov 15, 2017
by
Matthew Hausknecht
Committed by
GitHub
Nov 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #58 from DurgeshSamant/master
Partial Observability in High Level Features
parents
5394bdce
c94dba46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/highlevel_feature_extractor.cpp
src/highlevel_feature_extractor.cpp
+5
-5
src/highlevel_feature_extractor.h
src/highlevel_feature_extractor.h
+1
-1
No files found.
src/highlevel_feature_extractor.cpp
View file @
167bca8b
...
...
@@ -91,7 +91,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
int
detected_teammates
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
const
PlayerObject
*
teammate
=
*
it
;
if
(
valid
(
teammate
)
&&
detected_teammates
<
numTeammates
)
{
if
(
valid
(
teammate
)
&&
teammate
->
unum
()
>
0
&&
detected_teammates
<
numTeammates
)
{
addNormFeature
(
calcLargestGoalAngle
(
wm
,
teammate
->
pos
()),
0
,
M_PI
);
detected_teammates
++
;
}
...
...
@@ -106,7 +106,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
detected_teammates
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
const
PlayerObject
*
teammate
=
*
it
;
if
(
valid
(
teammate
)
&&
detected_teammates
<
numTeammates
)
{
if
(
valid
(
teammate
)
&&
teammate
->
unum
()
>
0
&&
detected_teammates
<
numTeammates
)
{
calcClosestOpp
(
wm
,
teammate
->
pos
(),
th
,
r
);
addNormFeature
(
r
,
0
,
maxR
);
detected_teammates
++
;
...
...
@@ -126,7 +126,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
detected_teammates
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
const
PlayerObject
*
teammate
=
*
it
;
if
(
valid
(
teammate
)
&&
detected_teammates
<
numTeammates
)
{
if
(
valid
(
teammate
)
&&
teammate
->
unum
()
>
0
&&
detected_teammates
<
numTeammates
)
{
addNormFeature
(
calcLargestTeammateAngle
(
wm
,
self_pos
,
teammate
->
pos
()),
0
,
M_PI
);
detected_teammates
++
;
}
...
...
@@ -140,7 +140,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
detected_teammates
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
const
PlayerObject
*
teammate
=
*
it
;
if
(
valid
(
teammate
)
&&
detected_teammates
<
numTeammates
)
{
if
(
valid
(
teammate
)
&&
teammate
->
unum
()
>
0
&&
detected_teammates
<
numTeammates
)
{
if
(
playingOffense
)
{
addNormFeature
(
teammate
->
pos
().
x
,
-
tolerance_x
,
SP
.
pitchHalfLength
()
+
tolerance_x
);
}
else
{
...
...
@@ -162,7 +162,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
int
detected_opponents
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
opponents
.
begin
();
it
!=
opponents
.
end
();
++
it
)
{
const
PlayerObject
*
opponent
=
*
it
;
if
(
valid
(
opponent
)
&&
detected_opponents
<
numOpponents
)
{
if
(
valid
(
opponent
)
&&
opponent
->
unum
()
>
0
&&
detected_opponents
<
numOpponents
)
{
if
(
playingOffense
)
{
addNormFeature
(
opponent
->
pos
().
x
,
-
tolerance_x
,
SP
.
pitchHalfLength
()
+
tolerance_x
);
}
else
{
...
...
src/highlevel_feature_extractor.h
View file @
167bca8b
...
...
@@ -25,7 +25,7 @@ public:
//override FeatureExtractor::valid
//this method takes a pointer instead of a reference
static
bool
valid
(
const
rcsc
::
PlayerObject
*
player
);
bool
valid
(
const
rcsc
::
PlayerObject
*
player
);
protected:
// Number of features for non-player objects.
...
...
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