Commit a0ffcb91 authored by drallensmith's avatar drallensmith

Rename to Reorient - clearer

parent f54c759c
......@@ -26,7 +26,7 @@ LOW_LEVEL_FEATURE_SET, HIGH_LEVEL_FEATURE_SET = list(range(2))
NOOP(): Do Nothing
QUIT(): Quit the game '''
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,PREPROCESS = list(range(20))
MOVE, SHOOT, PASS, DRIBBLE, CATCH, NOOP, QUIT, REDUCE_ANGLE_TO_GOAL,MARK_PLAYER,DEFEND_GOAL,GO_TO_BALL,REORIENT = list(range(20))
''' Possible game status
[IN_GAME] Game is currently active
......
......@@ -317,8 +317,8 @@ void Agent::actionImpl() {
case GO_TO_BALL:
this->doGoToBall();
break;
case PREPROCESS:
this->doPreprocessAsAction();
case REORIENT:
this->doReorient();
break;
default:
std::cerr << "ERROR: Unsupported Action: "
......@@ -704,10 +704,10 @@ Agent::doPreprocess()
/*-------------------------------------------------------------------*/
/*!
Alternative high-level action to always doing "Move"; usable by either side, although
probably more useful for offense.
probably more useful for offense. Variant of doPreprocess (above), which is called by doDribble.
*/
bool
Agent::doPreprocessAsAction()
Agent::doReorient()
{
// check tackle expires
// check self position accuracy
......@@ -763,6 +763,12 @@ Agent::doPreprocessAsAction()
return true;
}
//
// set default change view
//
this->setViewAction( new View_Tactical() );
//
// ball localization error
//
......@@ -775,16 +781,11 @@ Agent::doPreprocessAsAction()
{
dlog.addText( Logger::TEAM,
__FILE__": search ball" );
this->setViewAction( new View_Tactical() );
Bhv_NeckBodyToBall().execute( this );
return true;
}
//
// set default change view
//
this->setViewAction( new View_Tactical() );
//
// check queued action
......@@ -805,7 +806,7 @@ Agent::doPreprocessAsAction()
}
const BallObject& ball = wm.ball();
if (! ( ball.rposValid() && ball.rvelValid() )) {
if (! ( ball.rposValid() && ball.velValid() )) {
dlog.addText( Logger::TEAM,
__FILE__": search ball" );
Bhv_NeckBodyToBall().execute( this );
......
......@@ -76,7 +76,7 @@ protected:
private:
bool doPreprocess();
bool doPreprocessAsAction();
bool doReorient();
bool doSmartKick();
bool doShoot();
bool doPass();
......
......@@ -38,7 +38,7 @@ enum action_t
MARK_PLAYER, // [High-Level] Mark_Player(opponent_unum [0,11]) : Moves to the position in between the kicker and a given player
DEFEND_GOAL,
GO_TO_BALL,
PREPROCESS // [High-Level] Handle lost position of self/ball; variant called in DRIBBLE
REORIENT // [High-Level] Handle lost position of self/ball, misc other situations; variant of doPreprocess called in DRIBBLE
};
// Status of a HFO game
......@@ -118,7 +118,7 @@ inline int NumParams(const action_t action) {
return 0;
case GO_TO_BALL:
return 0;
case PREPROCESS:
case REORIENT:
return 0;
}
std::cerr << "Unrecognized Action: " << action << std::endl;
......@@ -168,8 +168,8 @@ inline std::string ActionToString(action_t action) {
return "Defend_Goal";
case GO_TO_BALL:
return "Go_To_Ball";
case PREPROCESS:
return "PreProcessAsAction";
case REORIENT:
return "Reorient";
default:
return "Unknown";
}
......
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