⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 think.cc

📁 2007年机器人足球世界杯3D仿真组亚军于07年底的源程序。该队还于2008年获得伊朗公开赛的亚军。
💻 CC
字号:
#include "humanoidbat.ih"void HumanoidBat::think(){  d_fitness->update();  d_fitness->print();    Behavior::clearActionCommandBehaviors();    _debugLevel3("Running behaviors");  mvds::TimeVal t0 = mvds::TimeVal::getTimeOfDay();    rf<Behavior> win = Behavior::getWin();    if (!win)  {    _debugLevel1("No win behavior!");  }  else  {    _debugLevel3("Setting goal");    win->update();    win->setGoal(new Behavior::Goal);    _debugLevel3("Achieving goal " << win->ident());    if (!(win->achieveGoal()))      _debugLevel1("Win behavior was unable to achieve goal!");    else      _debugLevel3("Win behavior achieved goal!");  }                     /* ---------------- Collect action commands and send them to the server ------------*/              //if (wm.shouldSendAction())  //{    _debugLevel3("Send action commands");        _debugLevel1("FootForce: " << WorldModel::getInstance().getForceLeftFoot().length() << ", " << WorldModel::getInstance().getForceRightFoot().length());        Cerebellum& cer = Cerebellum::getInstance();        set<rf<Behavior> > acBehaviors = Behavior::getActionCommandBehaviors();    _debugLevel4("Nr of action behaviors: " << acBehaviors.size());    for (set<rf<Behavior> >::iterator iter = acBehaviors.begin(); iter != acBehaviors.end(); ++iter)    {    	cer.addAction((*iter)->getAction());    }        cer.outputCommands(d_comm);  //}    // Agent::run sends done thinking}

⌨️ 快捷键说明

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