亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? worldmodelhighlevel.cpp

?? RoboCup仿真組世界冠軍源代碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
        objLog             = objFastestOpp;        bFinishedOpponents = true;      }      else        bContinue = false;      if( featLog != FEATURE_ILLEGAL )      {        Log.log( 460, "log feature %d object %d in %d cycles sense %d see %d",          featLog, objLog, iCyclesLog,getTimeLastSenseMessage().getTime(),          getTimeLastSeeMessage().getTime()  );        setFeature( featLog,                    Feature( getTimeLastSeeMessage(),                             getTimeLastSenseMessage(),                             getTimeLastHearMessage(), objLog,                             getTimeLastSeeMessage().getTime() + iCyclesLog));      }    }    bFinished = bFinishedTeammates && bFinishedTeammatesNoGoalie;    if( bFinished == true )      bOnlyMe = true;    bFinished &= bFinishedMe ;    if( bFinished == true )      set = OBJECT_SET_OPPONENTS;    bFinished &= bFinishedOpponents;  }  Log.log( 460, "creatIntercept: team %d me %d opp %d",     iCyclesFastestTeamNoGoalie, iCyclesFastestMe, iCyclesFastestOpp );}/*! This method returns the fastest object to a specified object and fills the    last argument with the predicted amount of cycles needed to intercept    this object. Only objects within the set 'set' are taken into    consideration and the objects have to have a confidence higher than the    player confidence threshold defined in PlayerSettings.    \param set ObjectSetT which denotes objects taken into consideration    \param obj object type of object that should be intercepted    \param iCyclesToIntercept will be filled with the amount of cycles needed    \returns object that can intercept object obj fastest */ObjectT WorldModel::getFastestInSetTo( ObjectSetT set, ObjectT obj,                              int *iCyclesToIntercept ){  ObjectT  objFastestOpp  = OBJECT_ILLEGAL, objFastestTeam  = OBJECT_ILLEGAL;  int      iCyclesFastestOpp = 30; // how much do we try  int     iCyclesFastestTeam;  bool  bSkip = false;  FeatureT        feature_type = FEATURE_ILLEGAL;  ObjectT         fastestObject = OBJECT_ILLEGAL;  int             iCycles       = -1;  if( obj == OBJECT_BALL )  {    switch( set )    {      case OBJECT_SET_OPPONENTS:        feature_type = FEATURE_FASTEST_OPPONENT_TO_BALL;        break;      case OBJECT_SET_TEAMMATES:        feature_type = FEATURE_FASTEST_TEAMMATE_TO_BALL;        break;      case OBJECT_SET_TEAMMATES_NO_GOALIE:        feature_type = FEATURE_FASTEST_TEAMMATE_TO_BALL_NO_GOALIE;        break;      case OBJECT_SET_PLAYERS:        objFastestOpp =         getFastestInSetTo( OBJECT_SET_OPPONENTS, obj, &iCyclesFastestOpp);        objFastestTeam =         getFastestInSetTo( OBJECT_SET_TEAMMATES, obj, &iCyclesFastestTeam);        if( iCyclesFastestOpp < iCyclesFastestTeam )        {          fastestObject = objFastestOpp;          iCycles = iCyclesFastestOpp;        }        else        {          fastestObject = objFastestTeam;          iCycles = iCyclesFastestTeam;        }        bSkip = true;        feature_type = FEATURE_FASTEST_PLAYER_TO_BALL;        break;      default:        cerr << "WorldModel::getFastestInSetTo unknown set: " << set << endl;        return OBJECT_ILLEGAL;    }    if( isFeatureRelevant( feature_type ) )    {      int i = max(0,             ((int)getFeature( feature_type ).getInfo() - getCurrentCycle() ));      if( iCyclesToIntercept != NULL )        *iCyclesToIntercept  = i;      return getFeature( feature_type ).getObject();    }    Log.log( 460, "create intercept features" );    createInterceptFeatures( );    Log.log( 460, "call fastest again" );    return getFastestInSetTo( set, obj, iCyclesToIntercept );    if( set == OBJECT_SET_TEAMMATES || set == OBJECT_SET_TEAMMATES_NO_GOALIE )      objFastestOpp =         getFastestInSetTo( OBJECT_SET_OPPONENTS, obj, &iCyclesFastestOpp);  }  // no feature available, calculate information  double          dConfThr      = PS->getPlayerConfThr();  int             iCyclesToObj  ;  int             iMinCycles    = 100;  int             iIndex;  VecPosition     posObj;  while( bSkip == false &&         iCycles < iMinCycles &&         iCycles <= iCyclesFastestOpp )  {    iCycles++;    iMinCycles = 100;    posObj     = predictPosAfterNrCycles( obj, iCycles );    Log.log( 460, "fastest loop: %d fastest_opp %d",              iCycles, iCyclesFastestOpp );    for( ObjectT o = iterateObjectStart( iIndex, set, dConfThr );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, dConfThr ) )    {      if( getGlobalPosition(o).getDistanceTo(posObj)/SS->getPlayerSpeedMax()              < iMinCycles &&          getGlobalPosition(o).getDistanceTo(posObj)/SS->getPlayerSpeedMax()              < iCycles + 1 )      {        Log.log( 460, "call predictNrCyclesToPoint %d %d",                  iCycles,iMinCycles );        iCyclesToObj = predictNrCyclesToPoint( o, posObj );        if( iCyclesToObj < iMinCycles )        {          iMinCycles = iCyclesToObj;          fastestObject = o;        }      }    }    iterateObjectDone( iIndex );  }    // opponent is faster and we haven't calculated who can go to the   // interception point the fastest  if( fastestObject == OBJECT_ILLEGAL )    fastestObject = getFastestInSetTo(set,posObj,VecPosition(0,0),0, &iCycles);  if( iCyclesToIntercept != NULL )    *iCyclesToIntercept  = iCycles;  if( feature_type != FEATURE_ILLEGAL )  {    Log.log( 460, "log feature %d object %d in %d cycles sense %d see %d",             feature_type, fastestObject, iCycles,getTimeLastSenseMessage().             getTime(), getTimeLastSeeMessage().getTime()  );    setFeature( feature_type,                Feature( getTimeLastSeeMessage(),                         getTimeLastSenseMessage(),                          getTimeLastHearMessage(), fastestObject,                         getTimeLastSeeMessage().getTime() + iCycles ) );  }  return fastestObject;}/*! This method returns the fastest object to another object that is currently    located at position 'pos' and has velocity 'vel' that decays with a value    'dDecay'. The last argument will be filled with the predicted amount of    cycles needed to reach this object.    \param set ObjectSetT which denotes objects taken into consideration    \param pos current position of the object    \param vel current velocity of the object    \param dDecay decay value of the velocity of the object    \param iCyclesToIntercept will be filled with the amount of cycles needed    \returns object that can reach it fastest */ObjectT WorldModel::getFastestInSetTo( ObjectSetT set, VecPosition pos,                    VecPosition vel, double dDecay, int *iCyclesToIntercept){  double  dConfThr      = PS->getPlayerConfThr();  ObjectT fastestObject = OBJECT_ILLEGAL;  int     iCycles       = 0;  int     iCyclesToObj  ;  int     iMinCycles    = 100;  int     iIndex;  while( iCycles <= iMinCycles && iCycles < 100)  {    iCycles    = iCycles + 1  ;    iMinCycles = 100;    Log.log( 460, "fastest to point: %d", iCycles );    for( ObjectT o = iterateObjectStart( iIndex, set, dConfThr );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, dConfThr ) )    {       if( getGlobalPosition(o).getDistanceTo(pos)/SS->getPlayerSpeedMax()           < iMinCycles )       {         iCyclesToObj = predictNrCyclesToPoint( o, pos );         if( iCyclesToObj < iMinCycles )         {           iMinCycles    = iCyclesToObj;           fastestObject = o;         }       }    }    iterateObjectDone( iIndex );    pos += vel;    vel *= dDecay;    if( vel.getMagnitude( ) < EPSILON ) // we can quit    {      iCycles = iMinCycles;      iMinCycles--;    }  }    if( iCyclesToIntercept != NULL )    *iCyclesToIntercept = iCycles;  return fastestObject;}/*! This method returns the first empty spot in the set 'set'. The    first empty spot is returned as the object which has a lower    confidence than the threshold player_conf_thr defined in the    PlayerSettings. This can be used when information of an unknown    object is perceived. It is set on the first position where there    is currently no information stored. If 'iUnknownPlayer' is    specified, the range that corresponds to this unknown player is    used to dermine the position.    \param set ObjectSetT consisting of the objects to check    \param iUnknownPlayer indicates the unknownplayer that has to be mapped    \return object type of which currently no up to date information    is stored */ObjectT WorldModel::getFirstEmptySpotInSet( ObjectSetT set, int iUnknownPlayer){  int     iIndex;  for( ObjectT o = iterateObjectStart( iIndex, set,  0.0, true );       o != OBJECT_ILLEGAL;       o = iterateObjectNext ( iIndex, set, 0.0, true ) )  {    if( getConfidence( o ) <= PS->getPlayerConfThr() &&        o != getAgentObjectType() )      return o;  }  return OBJECT_ILLEGAL;}/*! This method returns a truth value that represents whether the object    supplied as the first argument was seen in the last see message. If    "touch" information was received, i.e. the object was very close to the    agent but not in its view cone, false is also returned.    \param ObjectT that represent the type of the object to check    \return bool indicating whether o was seen in the last see message */bool WorldModel::isVisible( ObjectT o ){  Object *object = getObjectPtrFromType( o );  if( object != NULL &&      object->getTimeLastSeen() == getTimeLastSeeMessage() )    return true;  return false;}/*! This method determines whether the ball is kicakble, i.e. the ball    is in the kickable range of the agent (see ServerSettings). This    value can be different for the different heterogeneous player    types.    \return bool indicating whether ball can be kicked. */bool WorldModel::isBallKickable(){  return getRelativeDistance( OBJECT_BALL ) < SS->getMaximalKickDist();}/*! This method determines whether the ball is catchable. This only applies    to a goalie. Three things are tested:    - the ball hasn't been catched in catch_ban_cycles (see ServerSettings)      before the current cycle    - the relative distance to the ball is smaller than the length of the      catchable area length of the goalie (see also ServerSettings)    - the ball is in the (own) penalty area.    \return true when above three constraints are met, false otherwise. */bool WorldModel::isBallCatchable(){  return getTimeSinceLastCatch()            > SS->getCatchBanCycle()  &&         getRelativeDistance( OBJECT_BALL ) <= SS->getCatchableAreaL() &&         isInOwnPenaltyArea( getBallPos() );}/*! This method checks whether the ball is currently heading towards our own    goal. For the ball to be heading to our goal a few constraints must be met:    - ball must be located in our penalty area    - line of ball heading must intersect with goal line within goal width +    small constant.    - ball must pass goal line within 20 cycles.    If all these constraints are met true is returned, false otherwise    \return bool indicating whether the ball is heading towards our own goal */bool WorldModel::isBallHeadingToGoal(  ){  int iSide = 1;  if( isPenaltyUs() || isPenaltyThem() )    iSide = ( getSide() == getSidePenalty() ) ? 1 : -1;  if( !isConfidenceGood( OBJECT_BALL ) ||      fabs( getBallPos().getX() ) <  PENALTY_X - 5.0 )  {    Log.log( 553, "ball not towards goal: confidence too low" );    return false;  }  // make line from ball heading and goal line  Line l = Line::makeLineFromPositionAndAngle(getBallPos(),getBallDirection());  Line l2= Line::makeLineFromTwoPoints( getPosOwnGoal(), getPosOwnGoal() +                                                         VecPosition( 0, 10 ));  // if intersection is outside goalwidth, not heading to goal  VecPosition posIntersect = l.getIntersection( l2 );  if( fabs(posIntersect.getY()) > SS->getGoalWidth()/2.0 + 3.0)  {    Log.log( 553, "ball not towards goal: outside goal %f",       posIntersect.getY());    return false;  }  // check whether ball will be behind goal line within 20 cycles.  VecPosition pos    = getBallPos();  int         iCycle = 1;  while( fabs( pos.getX() ) < PITCH_LENGTH/2.0 && iCycle < 20)  {    pos = predictPosAfterNrCycles( OBJECT_BALL, iCycle );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩小视频| 综合亚洲深深色噜噜狠狠网站| 精品三级在线看| 国产精品理论在线观看| 亚洲高清视频的网址| www.成人在线| 欧美一级高清大全免费观看| 一区二区三区精密机械公司| 国产一区二区在线看| 欧美性xxxxxx少妇| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 欧美午夜一区二区| 久久蜜桃一区二区| 蜜臀av亚洲一区中文字幕| 在线观看一区二区视频| 中文字幕一区不卡| 国产成人欧美日韩在线电影| 欧美精品 日韩| 一个色在线综合| 99久久精品国产观看| 久久久久久一级片| 久草中文综合在线| 制服丝袜中文字幕亚洲| 亚洲一区二区美女| 色婷婷国产精品综合在线观看| 中文字幕第一区综合| 国产真实乱偷精品视频免| 欧美一级一区二区| 日韩高清不卡一区二区三区| 欧美综合亚洲图片综合区| 亚洲卡通动漫在线| 91麻豆文化传媒在线观看| 亚洲欧美影音先锋| 97久久超碰国产精品| 亚洲欧美中日韩| 一本久久综合亚洲鲁鲁五月天| 中文字幕一区二区三区在线不卡| 国产一区二区三区国产| 久久噜噜亚洲综合| 风间由美中文字幕在线看视频国产欧美| 欧美不卡激情三级在线观看| 麻豆一区二区三| 久久这里只精品最新地址| 蓝色福利精品导航| 久久久不卡影院| 成+人+亚洲+综合天堂| 亚洲欧美日韩人成在线播放| 色综合久久综合| 亚洲成人黄色影院| 欧美一级二级三级乱码| 麻豆精品一区二区av白丝在线| 精品捆绑美女sm三区| 国产乱国产乱300精品| 中文字幕中文字幕在线一区 | 9191成人精品久久| 国产高清久久久| 国产精品色眯眯| 日本精品视频一区二区| 视频一区在线播放| 久久色.com| 91丨porny丨最新| 日韩精品视频网| 久久久777精品电影网影网| 成人在线综合网站| 亚洲国产中文字幕在线视频综合 | 免费高清在线一区| 中文在线资源观看网站视频免费不卡| 成人福利视频网站| 亚洲一区二区在线播放相泽| 欧美大尺度电影在线| av在线免费不卡| 丝袜美腿一区二区三区| 国产精品久久久久aaaa樱花| 欧美日韩国产另类一区| 国产成人99久久亚洲综合精品| 一区二区三区丝袜| 久久久亚洲高清| 欧美性猛片aaaaaaa做受| 蜜臀91精品一区二区三区| 欧美经典一区二区三区| 欧美午夜精品一区二区蜜桃| 高清成人免费视频| 日韩二区三区在线观看| 自拍偷拍亚洲欧美日韩| 精品日韩欧美在线| 欧美日韩视频不卡| 成人免费毛片片v| 免费人成精品欧美精品 | av不卡在线播放| 精品一区二区在线观看| 亚洲图片欧美综合| 国产午夜亚洲精品午夜鲁丝片| 在线观看视频一区二区| 国产.欧美.日韩| 免费日韩伦理电影| 亚洲国产cao| 亚洲精品久久久久久国产精华液| 精品国产乱码久久久久久夜甘婷婷 | 国产精品久久99| 久久―日本道色综合久久| 欧美乱熟臀69xxxxxx| 91亚洲午夜精品久久久久久| 国产一区二区三区免费观看| 蜜臀久久99精品久久久久久9| 亚洲美女电影在线| 国产精品成人网| 欧美国产在线观看| 久久久久久久免费视频了| 日韩一区二区在线看| 678五月天丁香亚洲综合网| 91成人免费在线视频| 色婷婷亚洲综合| 91在线免费播放| 91网站在线观看视频| av电影在线观看完整版一区二区| 成人黄页毛片网站| 99精品视频在线观看免费| www.成人在线| 97精品久久久久中文字幕| 99久久er热在这里只有精品15 | 欧美精品第一页| 91精品国产综合久久香蕉麻豆| 欧美一区二区三区思思人| 欧美一级午夜免费电影| 日韩色视频在线观看| 精品国内片67194| 国产三级精品在线| 中文文精品字幕一区二区| 国产精品传媒视频| 亚洲精选视频免费看| 亚洲国产日韩一区二区| 亚洲123区在线观看| 另类小说综合欧美亚洲| 激情成人午夜视频| 粉嫩aⅴ一区二区三区四区| av午夜一区麻豆| 日本高清不卡在线观看| 欧美巨大另类极品videosbest | 亚洲成人av福利| 青娱乐精品在线视频| 国产综合久久久久影院| 丁香啪啪综合成人亚洲小说| 97国产一区二区| 欧美嫩在线观看| 久久一区二区三区国产精品| 欧美韩日一区二区三区四区| 综合电影一区二区三区| 日韩不卡免费视频| 国产91丝袜在线18| 欧洲精品视频在线观看| 日韩欧美一级精品久久| 中文字幕va一区二区三区| 亚洲精品久久久久久国产精华液| 日韩成人精品在线| 9i看片成人免费高清| 欧美精品丝袜久久久中文字幕| 久久夜色精品国产欧美乱极品| 亚洲人快播电影网| 久久精品99国产国产精| 91在线视频免费观看| 日韩一区二区三| 综合自拍亚洲综合图不卡区| 免费观看久久久4p| 色欧美乱欧美15图片| 欧美va在线播放| 一区二区三区视频在线看| 国产在线精品一区在线观看麻豆| 91福利在线观看| 中文字幕欧美区| 蜜桃精品在线观看| 色播五月激情综合网| 国产日韩精品一区二区浪潮av| 午夜精品aaa| 97国产精品videossex| 久久综合视频网| 午夜不卡av免费| 97se亚洲国产综合自在线不卡| 久久综合99re88久久爱| 蜜臀a∨国产成人精品| 欧美另类变人与禽xxxxx| 亚洲精品国产成人久久av盗摄| 国产精品白丝av| 26uuu精品一区二区| 免费观看在线色综合| 欧美久久久久久久久| 亚洲一区二区三区激情| 91在线视频在线| 国产精品每日更新在线播放网址| 日本成人在线视频网站| 欧美日韩国产综合久久| 樱桃国产成人精品视频| 91一区在线观看| 最新久久zyz资源站| 成人午夜视频网站| 中文字幕不卡在线播放| 高清视频一区二区| 中文字幕免费观看一区| 懂色av一区二区三区蜜臀| 久久久久综合网| 国产1区2区3区精品美女|