Commit dda0c9d0 authored by Matthew Hausknecht's avatar Matthew Hausknecht

Updated state features to include teammate unums.

parent f076b7d9
No preview for this file type
......@@ -74,11 +74,12 @@ follows:
angle available to pass to teammate i. Shown as $\theta_p$ in Figure
\ref{fig:openAngle}. If teammates are present but not detected, this
feature is considered invalid and given the value of -2.}
\item [$2T$] {\textbf{Distance and Angle to Teammates} - For each
teammate i: the distance and angle to that teammate.}
\item [$3T$] {\textbf{Distance, Angle, and Uniform Number of
Teammates} - For each teammate i: the distance, angle, and uniform
number of that teammate.}
\end{enumerate}
There are a total of $9 + 4*\textrm{num\_teammates}$ features with an
There are a total of $9 + 5*\textrm{num\_teammates}$ features with an
additional $1 + \textrm{num\_teammates}$ features if at least one
opponent is present.
......@@ -270,9 +271,10 @@ server.
should be used.}
\item{\textbf{Shoot}(): Executes the best available shot. This command
only works when the agent has the ball.}
\item{\textbf{Pass}(): Finds the best teammate to pass to and the type
of pass to use. This command only works when the agent has the
ball.}
\item{\textbf{Pass}(teammate\_uniform\_number): Passes to the teammate
with the provided uniform number. Does nothing if the player does
not have control of the ball or the requested teammate is not
detected.}
\item{\textbf{Dribble}(): Advances the ball towards the goal using a
combination of short kicks and moves.}
\end{itemize}
......
......@@ -132,6 +132,7 @@ const std::vector<float>& HighLevelFeatureExtractor::ExtractFeatures(
angleDistToPoint(self_pos, teammate.pos(), th, r);
addFeature(r);
addFeature(th);
addFeature(teammate.unum());
detected_teammates++;
}
}
......@@ -139,6 +140,7 @@ const std::vector<float>& HighLevelFeatureExtractor::ExtractFeatures(
for (int i=detected_teammates; i<numTeammates; ++i) {
addFeature(FEAT_INVALID);
addFeature(FEAT_INVALID);
addFeature(FEAT_INVALID);
}
assert(featIndx == numFeatures);
......
......@@ -24,7 +24,7 @@ protected:
// Number of features for non-player objects.
const static int num_basic_features = 9;
// Number of features for each player or opponent in game.
const static int features_per_teammate = 4;
const static int features_per_teammate = 5;
int numTeammates; // Number of teammates in HFO
int numOpponents; // Number of opponents in HFO
bool playingOffense; // Are we playing offense or defense?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment