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