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
c94dba46
You need to sign in or sign up before continuing.
Commit
c94dba46
authored
Nov 15, 2017
by
DurgeshSamant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fix: Either all of opp/tm is visible or not
parent
5394bdce
Changes
2
Show 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 @
c94dba46
...
@@ -91,7 +91,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
...
@@ -91,7 +91,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
int
detected_teammates
=
0
;
int
detected_teammates
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
const
PlayerObject
*
teammate
=
*
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
);
addNormFeature
(
calcLargestGoalAngle
(
wm
,
teammate
->
pos
()),
0
,
M_PI
);
detected_teammates
++
;
detected_teammates
++
;
}
}
...
@@ -106,7 +106,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
...
@@ -106,7 +106,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
detected_teammates
=
0
;
detected_teammates
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
const
PlayerObject
*
teammate
=
*
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
);
calcClosestOpp
(
wm
,
teammate
->
pos
(),
th
,
r
);
addNormFeature
(
r
,
0
,
maxR
);
addNormFeature
(
r
,
0
,
maxR
);
detected_teammates
++
;
detected_teammates
++
;
...
@@ -126,7 +126,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
...
@@ -126,7 +126,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
detected_teammates
=
0
;
detected_teammates
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
const
PlayerObject
*
teammate
=
*
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
);
addNormFeature
(
calcLargestTeammateAngle
(
wm
,
self_pos
,
teammate
->
pos
()),
0
,
M_PI
);
detected_teammates
++
;
detected_teammates
++
;
}
}
...
@@ -140,7 +140,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
...
@@ -140,7 +140,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
detected_teammates
=
0
;
detected_teammates
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
for
(
PlayerPtrCont
::
const_iterator
it
=
teammates
.
begin
();
it
!=
teammates
.
end
();
++
it
)
{
const
PlayerObject
*
teammate
=
*
it
;
const
PlayerObject
*
teammate
=
*
it
;
if
(
valid
(
teammate
)
&&
detected_teammates
<
numTeammates
)
{
if
(
valid
(
teammate
)
&&
teammate
->
unum
()
>
0
&&
detected_teammates
<
numTeammates
)
{
if
(
playingOffense
)
{
if
(
playingOffense
)
{
addNormFeature
(
teammate
->
pos
().
x
,
-
tolerance_x
,
SP
.
pitchHalfLength
()
+
tolerance_x
);
addNormFeature
(
teammate
->
pos
().
x
,
-
tolerance_x
,
SP
.
pitchHalfLength
()
+
tolerance_x
);
}
else
{
}
else
{
...
@@ -162,7 +162,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
...
@@ -162,7 +162,7 @@ HighLevelFeatureExtractor::ExtractFeatures(const rcsc::WorldModel& wm,
int
detected_opponents
=
0
;
int
detected_opponents
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
opponents
.
begin
();
it
!=
opponents
.
end
();
++
it
)
{
for
(
PlayerPtrCont
::
const_iterator
it
=
opponents
.
begin
();
it
!=
opponents
.
end
();
++
it
)
{
const
PlayerObject
*
opponent
=
*
it
;
const
PlayerObject
*
opponent
=
*
it
;
if
(
valid
(
opponent
)
&&
detected_opponents
<
numOpponents
)
{
if
(
valid
(
opponent
)
&&
opponent
->
unum
()
>
0
&&
detected_opponents
<
numOpponents
)
{
if
(
playingOffense
)
{
if
(
playingOffense
)
{
addNormFeature
(
opponent
->
pos
().
x
,
-
tolerance_x
,
SP
.
pitchHalfLength
()
+
tolerance_x
);
addNormFeature
(
opponent
->
pos
().
x
,
-
tolerance_x
,
SP
.
pitchHalfLength
()
+
tolerance_x
);
}
else
{
}
else
{
...
...
src/highlevel_feature_extractor.h
View file @
c94dba46
...
@@ -25,7 +25,7 @@ public:
...
@@ -25,7 +25,7 @@ public:
//override FeatureExtractor::valid
//override FeatureExtractor::valid
//this method takes a pointer instead of a reference
//this method takes a pointer instead of a reference
static
bool
valid
(
const
rcsc
::
PlayerObject
*
player
);
bool
valid
(
const
rcsc
::
PlayerObject
*
player
);
protected:
protected:
// Number of features for non-player objects.
// 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