classplayer.html

来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 781 行 · 第 1/4 页

HTML
781
字号
          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [private]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This is the main decision loop for an agent. <p>Definition at line <a class="el" href="Player_8C-source.html#l00167">167</a> of file <a class="el" href="Player_8C-source.html">Player.C</a>.<p>References <a class="el" href="Player_8C-source.html#l00182">deMeer5</a>().<p>Referenced by <a class="el" href="Player_8C-source.html#l00092">mainLoop</a>().    </td>  </tr></table><a name="c1" doxytag="Player::defenderMainLoop"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void Player::defenderMainLoop </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [private]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This is the main decision loop for a defender. <p>Definition at line <a class="el" href="Player_8C-source.html#l00155">155</a> of file <a class="el" href="Player_8C-source.html">Player.C</a>.<p>References <a class="el" href="Player_8C-source.html#l00182">deMeer5</a>().<p>Referenced by <a class="el" href="Player_8C-source.html#l00092">mainLoop</a>().    </td>  </tr></table><a name="a3" doxytag="Player::deMeer5"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void Player::deMeer5 </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method is the first complete simple team and defines the actions taken by all the players on the field (excluding the goalie). It is based on the high-level actions taken by the simple team FC Portugal that it released in 2000. The players do the following:<ul><li>if ball is kickable kick ball to goal (random corner of goal)<li>else if i am fastest player to ball and no opponent can intercept ball intercept the ball<li>else move to strategic position based on your home position and pos ball </ul><p>Definition at line <a class="el" href="Player_8C-source.html#l00182">182</a> of file <a class="el" href="Player_8C-source.html">Player.C</a>.<p>References <a class="el" href="BasicPlayer_8h-source.html#l00057">BasicPlayer::ACT</a>, <a class="el" href="BasicPlayer_8C-source.html#l00052">BasicPlayer::alignNeckWithBody</a>(), <a class="el" href="namespace_3globalScope_4.html#a247a181">CMD_DASH</a>, <a class="el" href="namespace_3globalScope_4.html#a247a180">CMD_ILLEGAL</a>, <a class="el" href="namespace_3globalScope_4.html#a247a183">CMD_TURNNECK</a>, <a class="el" href="SoccerTypes_8h-source.html#l00489">SoccerCommand::commandType</a>, <a class="el" href="SoccerTypes_8h-source.html#l00491">SoccerCommand::dPower</a>, <a class="el" href="Player_8h-source.html#l00056">formations</a>, <a class="el" href="namespace_3globalScope_4.html#a249a201">FT_INITIAL</a>, <a class="el" href="namespace_3globalScope_4.html#a249a202">FT_STANDARD</a>, <a class="el" href="WorldModel_8C-source.html#l00568">WorldModel::getAgentGlobalPosition</a>(), <a class="el" href="WorldModel_8C-source.html#l00502">WorldModel::getAgentObjectType</a>(), <a class="el" href="WorldModel_8C-source.html#l00540">WorldModel::getAgentStamina</a>(), <a class="el" href="PlayerSettings_8C-source.html#l00149">PlayerSettings::getBallConfThr</a>(), <a class="el" href="WorldModel_8C-source.html#l00620">WorldModel::getBallPos</a>(), <a class="el" href="ServerSettings_8C-source.html#l01056">ServerSettings::getBallSpeedMax</a>(), <a class="el" href="WorldModel_8C-source.html#l00803">WorldModel::getConfidence</a>(), <a class="el" href="WorldModel_8C-source.html#l00189">WorldModel::getCurrentCycle</a>(), <a class="el" href="Geometry_8C-source.html#l00589">VecPosition::getDistanceTo</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00459">WorldModel::getFastestInSetTo</a>(), <a class="el" href="Formations_8C-source.html#l00643">Formations::getFormation</a>(), <a class="el" href="ServerSettings_8C-source.html#l00523">ServerSettings::getGoalWidth</a>(), <a class="el" href="PlayerSettings_8C-source.html#l00185">PlayerSettings::getPlayerWhenToTurnAngle</a>(), <a class="el" href="ServerSettings_8C-source.html#l00673">ServerSettings::getRecoverDecThr</a>(), <a class="el" href="Objects_8C-source.html#l00914">Stamina::getRecovery</a>(), <a class="el" href="WorldModel_8C-source.html#l00734">WorldModel::getRelativeAngle</a>(), <a class="el" href="Objects_8C-source.html#l00854">Stamina::getStamina</a>(), <a class="el" href="ServerSettings_8C-source.html#l00639">ServerSettings::getStaminaMax</a>(), <a class="el" href="Player_8C-source.html#l00434">getStrategicPosition</a>(), <a class="el" href="Geometry_8C-source.html#l00542">VecPosition::getX</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01016">BasicPlayer::intercept</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00589">WorldModel::isBallKickable</a>(), <a class="el" href="WorldModel_8C-source.html#l01028">WorldModel::isBeforeKickOff</a>(), <a class="el" href="WorldModel_8C-source.html#l01049">WorldModel::isDeadBallThem</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00775">BasicPlayer::kickTo</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00442">BasicPlayer::moveToPos</a>(), <a class="el" href="namespace_3globalScope_4.html#a240a24">OBJECT_BALL</a>, <a class="el" href="namespace_3globalScope_4.html#a241a115">OBJECT_SET_TEAMMATES</a>, <a class="el" href="SoccerTypes_8h-source.html#l00075">PITCH_LENGTH</a>, <a class="el" href="BasicPlayer_8h-source.html#l00060">BasicPlayer::PS</a>, <a class="el" href="ActHandler_8C-source.html#l00168">ActHandler::putCommandInQueue</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00169">BasicPlayer::searchBall</a>(), <a class="el" href="Formations_8C-source.html#l00635">Formations::setFormation</a>(), <a class="el" href="BasicPlayer_8h-source.html#l00059">BasicPlayer::SS</a>, <a class="el" href="BasicPlayer_8C-source.html#l00370">BasicPlayer::teleportToPos</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00386">BasicPlayer::turnBodyToObject</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00075">BasicPlayer::turnBodyToPoint</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00406">BasicPlayer::turnNeckToObject</a>(), and <a class="el" href="BasicPlayer_8h-source.html#l00058">BasicPlayer::WM</a>.<p>Referenced by <a class="el" href="Player_8C-source.html#l00167">attackerMainLoop</a>(), <a class="el" href="Player_8C-source.html#l00155">defenderMainLoop</a>(), and <a class="el" href="Player_8C-source.html#l00161">midfielderMainLoop</a>().    </td>  </tr></table><a name="a4" doxytag="Player::deMeer5_goalie"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void Player::deMeer5_goalie </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method is a simple goalie based on the goalie of the simple Team of FC Portugal. It defines a rectangle in its penalty area and moves to the position on this rectangle where the ball intersects if you make a line between the ball position and the center of the goal. If the ball can be intercepted in the own penalty area the ball is intercepted and catched. <p>Definition at line <a class="el" href="Player_8C-source.html#l00278">278</a> of file <a class="el" href="Player_8C-source.html">Player.C</a>.<p>References <a class="el" href="BasicPlayer_8h-source.html#l00057">BasicPlayer::ACT</a>, <a class="el" href="BasicPlayer_8C-source.html#l00052">BasicPlayer::alignNeckWithBody</a>(), <a class="el" href="Geometry_8h-source.html#l00052">AngDeg</a>, <a class="el" href="BasicPlayer_8C-source.html#l00349">BasicPlayer::catchBall</a>(), <a class="el" href="namespace_3globalScope_4.html#a247a187">CMD_MOVE</a>, <a class="el" href="Player_8h-source.html#l00056">formations</a>, <a class="el" href="namespace_3globalScope_4.html#a249a201">FT_INITIAL</a>, <a class="el" href="WorldModel_8C-source.html#l00533">WorldModel::getAgentGlobalBodyAngle</a>(), <a class="el" href="WorldModel_8C-source.html#l00568">WorldModel::getAgentGlobalPosition</a>(), <a class="el" href="WorldModel_8C-source.html#l00502">WorldModel::getAgentObjectType</a>(), <a class="el" href="PlayerSettings_8C-source.html#l00149">PlayerSettings::getBallConfThr</a>(), <a class="el" href="WorldModel_8C-source.html#l00620">WorldModel::getBallPos</a>(), <a class="el" href="WorldModel_8C-source.html#l00803">WorldModel::getConfidence</a>(), <a class="el" href="Geometry_8C-source.html#l00589">VecPosition::getDistanceTo</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00459">WorldModel::getFastestInSetTo</a>(), <a class="el" href="Formations_8C-source.html#l00643">Formations::getFormation</a>(), <a class="el" href="SoccerTypes_8C-source.html#l01308">SoccerTypes::getGlobalPositionFlag</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01611">BasicPlayer::getInterceptionPointBall</a>(), <a class="el" href="Geometry_8C-source.html#l01278">Line::getIntersection</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00080">WorldModel::getNrInSetInCircle</a>(), <a class="el" href="PlayerSettings_8C-source.html#l00185">PlayerSettings::getPlayerWhenToTurnAngle</a>(), <a class="el" href="WorldModel_8C-source.html#l00334">WorldModel::getPlayMode</a>(), <a class="el" href="WorldModel_8C-source.html#l00300">WorldModel::getSide</a>(), <a class="el" href="Player_8C-source.html#l00434">getStrategicPosition</a>(), <a class="el" href="WorldModel_8C-source.html#l00150">WorldModel::getTimeSinceLastCatch</a>(), <a class="el" href="Geometry_8C-source.html#l00542">VecPosition::getX</a>(), <a class="el" href="Geometry_8C-source.html#l00558">VecPosition::getY</a>(), <a class="el" href="BasicPlayer_8C-source.html#l01016">BasicPlayer::intercept</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00603">WorldModel::isBallCatchable</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00589">WorldModel::isBallKickable</a>(), <a class="el" href="WorldModel_8C-source.html#l01028">WorldModel::isBeforeKickOff</a>(), <a class="el" href="WorldModel_8C-source.html#l01067">WorldModel::isCornerKickThem</a>(), <a class="el" href="WorldModel_8C-source.html#l01017">WorldModel::isFreeKickThem</a>(), <a class="el" href="WorldModel_8C-source.html#l01008">WorldModel::isFreeKickUs</a>(), <a class="el" href="WorldModel_8C-source.html#l01130">WorldModel::isGoalKickUs</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00675">WorldModel::isInOwnPenaltyArea</a>(), <a class="el" href="Geometry_8C-source.html#l00678">VecPosition::isLeftOf</a>(), <a class="el" href="Geometry_8C-source.html#l00699">VecPosition::isRightOf</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00775">BasicPlayer::kickTo</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00483">SoccerCommand::makeCommand</a>(), <a class="el" href="Geometry_8C-source.html#l01447">Line::makeLineFromTwoPoints</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00442">BasicPlayer::moveToPos</a>(), <a class="el" href="namespace_3globalScope_4.html#a240a24">OBJECT_BALL</a>, <a class="el" href="namespace_3globalScope_4.html#a240a25">OBJECT_GOAL_L</a>, <a class="el" href="namespace_3globalScope_4.html#a240a26">OBJECT_GOAL_R</a>, <a class="el" href="namespace_3globalScope_4.html#a241a116">OBJECT_SET_OPPONENTS</a>, <a class="el" href="namespace_3globalScope_4.html#a241a117">OBJECT_SET_PLAYERS</a>, <a class="el" href="SoccerTypes_8h-source.html#l00078">PENALTY_AREA_LENGTH</a>, <a class="el" href="SoccerTypes_8h-source.html#l00079">PENALTY_AREA_WIDTH</a>, <a class="el" href="SoccerTypes_8h-source.html#l00075">PITCH_LENGTH</a>, <a class="el" href="namespace_3globalScope_4.html#a242a136">PM_PLAY_ON</a>, <a class="el" href="BasicPlayer_8h-source.html#l00060">BasicPlayer::PS</a>, <a class="el" href="ActHandler_8C-source.html#l00168">ActHandler::putCommandInQueue</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00169">BasicPlayer::searchBall</a>(), <a class="el" href="Formations_8C-source.html#l00635">Formations::setFormation</a>(), <a class="el" href="Geometry_8C-source.html#l00534">VecPosition::setX</a>(), <a class="el" href="namespace_3globalScope_4.html#a246a177">SIDE_LEFT</a>, <a class="el" href="namespace_3globalScope_4.html#a246a178">SIDE_RIGHT</a>, <a class="el" href="BasicPlayer_8C-source.html#l00370">BasicPlayer::teleportToPos</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00386">BasicPlayer::turnBodyToObject</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00075">BasicPlayer::turnBodyToPoint</a>(), <a class="el" href="BasicPlayer_8C-source.html#l00406">BasicPlayer::turnNeckToObject</a>(), and <a class="el" href="BasicPlayer_8h-source.html#l00058">BasicPlayer::WM</a>.<p>Referenced by <a class="el" href="Player_8C-source.html#l00149">goalieMainLoop</a>().    </td>  </tr></table><a name="a7" doxytag="Player::executeStringCommand"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool Player::executeStringCommand </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">char *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>str</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method executes the command that is entered by the user. For the possible command look at the method showStringCommands. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em>&nbsp;</td><td>string that is entered by the user </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>true when command could be executed, false otherwise </dl><p>Definition at line <a class="el" href="Player_8C-source.html#l00512">512</a> of file <a class="el" href="Player_8C-source.html">Player.C</a>.<p>References <a class="el" href="BasicPlayer_8h-source.html#l00057">BasicPlayer::ACT</a>, <a class="el" href="Player_8h-source.html#l00057">bContLoop</a>, <a class="el" href="namespace_3globalScope_4.html#a247a185">CMD_CATCH</a>, <a class="el" href="namespace_3globalScope_4.html#a247a184">CMD_CHANGEVIEW</a>, <a class="el" href="namespace_3globalScope_4.html#a247a181">CMD_DASH</a>, <a class="el" href="namespace_3globalScope_4.html#a247a180">CMD_ILLEGAL</a>, <a class="el" href="namespace_3globalScope_4.html#a247a186">CMD_KICK</a>, <a class="el" href="namespace_3globalScope_4.html#a247a187">CMD_MOVE</a>, <a class="el" href="namespace_3globalScope_4.html#a247a189">CMD_SAY</a>, <a class="el" href="namespace_3globalScope_4.html#a247a182">CMD_TURN</a>, <a class="el" href="namespace_3globalScope_4.html#a247a183">CMD_TURNNECK</a>, <a class="el" href="SoccerTypes_8h-source.html#l00489">SoccerCommand::commandType</a>, <a class="el" href="SoccerTypes_8h-source.html#l00490">SoccerCommand::dAngle</a>, <a class="el" href="SoccerTypes_8h-source.html#l00491">SoccerCommand::dPower</a>, <a class="el" href="SoccerTypes_8h-source.html#l00494">SoccerCommand::dX</a>, <a class="el" href="SoccerTypes_8h-source.html#l00495">SoccerCommand::dY</a>, <a class="el" href="WorldModel_8C-source.html#l00526">WorldModel::getAgentGlobalNeckAngle</a>(), <a class="el" href="WorldModel_8C-source.html#l00568">WorldModel::getAgentGlobalPosition</a>(), <a class="el" href="WorldModel_8C-source.html#l00502">WorldModel::getAgentObjectType</a>(), <a class="el" href="WorldModelHighLevel_8C-source.html#l00109">WorldModel::getNrInSetInCone</a>(), <a class="el" href="PlayerSettings_8C-source.html#l00185">PlayerSettings::getPlayerWhenToTurnAngle</a>(), <a class="el" href="SoccerTypes_8C-source.html#l01661">SoccerTypes::getViewAngleFromStr</a>(), <a class="el" href="SoccerTypes_8C-source.html#l01711">SoccerTypes::getViewQualityFromStr</a>(), <a class="el" href="Parse_8C-source.html#l00058">Parse::gotoFirstNonSpace</a>(), <a class="el" href="Parse_8C-source.html#l00087">Parse::gotoFirstOccurenceOf</a>(), <a class="el" href="SoccerTypes_8h-source.html#l00497">SoccerCommand::iTimes</a>, <a class="el" href="BasicPlayer_8C-source.html#l00775">BasicPlayer::kickTo</a>(), <a class="el" href="SoccerTypes_8C-source.html#l00483">SoccerCommand::makeCommand</a>(), <a class="el" href="namespace_3globalScope_4.html#a241a116">OBJECT_SET_OPPONENTS</a>, <a class="el" href="Parse_8C-source.html#l00140">Parse::parseFirstDouble</a>(), <a class="el" href="Parse_8C-source.html#l00107">Parse::parseFirstInt</a>(), <a class="el" href="WorldModelPredict_8C-source.html#l00256">WorldModel::predictNrCyclesToPoint</a>(), <a class="el" href="BasicPlayer_8h-source.html#l00060">BasicPlayer::PS</a>, <a class="el" href="ActHandler_8C-source.html#l00168">ActHandler::putCommandInQueue</a>(), <a class="el" href="ActHandler_8C-source.html#l00216">ActHandler::sendMessage</a>(), <a class="el" href="WorldModel_8C-source.html#l01150">WorldModel::show</a>(), <a class="el" href="GenericValues_8C-source.html#l00460">GenericValues::show</a>(), <a class="el" href="WorldModel_8C-source.html#l01210">WorldModel::showQueuedCommands</a>(), <a class="el" href="Player_8C-source.html#l00484">showStringCommands</a>(), <a class="el" href="BasicPlayer_8h-source.html#l00059">BasicPlayer::SS</a>, <a class="el" href="SoccerTypes_8h-source.html#l00496">SoccerCommand::str</a>, <a class="el" href="SoccerTypes_8h-source.html#l00493">SoccerCommand::va</a>, <a class="el" href="SoccerTypes_8h-source.html#l00492">SoccerCommand::vq</a>, and <a class="el" href="BasicPlayer_8h-source.html#l00058">BasicPlayer::WM</a>.<p>Referenced by <a class="el" href="Player_8C-source.html#l00468">handleStdin</a>().    </td>  </tr></table><a name="a1" doxytag="Player::getStrategicPosition"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="classVecPosition.html">VecPosition</a> Player::getStrategicPosition </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>iPlayer</em> = -1          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?