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

📄 instintive.h.svn-base

📁 一个巴西大学编写的2D仿真组足球机器人程序
💻 SVN-BASE
字号:
/* *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#ifndef INSTINTIVE_H#define INSTINTIVE_H#include <sstream>#include <src/Agent/Behavior.h>#include <src/Expert-Coop++/InferenceEngine.h>#include <src/Expert-Coop++/FactsBase.h>#include <src/Expert-Coop++/RulesBase.h>#include "Message.h"/*! PlayerPositionT eh uma enumeracao das posiveis areas onde pode estar     localizado o agente. */enum PlayerPositionT {  AREA_ILLEGAL,                /*!< localizacao ilegal                       */  AREA_DEFENSE,                /*!< localizacao de defesa                    */  AREA_SIDE_DEFENSE,           /*!< laterais na defesa                       */  AREA_CENTRAL_DEFENSE,        /*!< atras do meio campo                      */  AREA_ATTACK,                 /*!< localizacao de ataque                    */  AREA_SIDE_ATTACK,            /*!< latereais no ataque                      */  AREA_CENTRAL,                /*!< meio campo                               */  AREA_CENTRAL_ATTACK,         /*!< a frente do meio campo                   */  AREA_SIDE                    /*!< laterais do meio campo                   */};class Instintive{ private:   WorldModel*       WM;   PlayerSettings*   PS;   ServerSettings*   SS;   InferenceEngine   mInferenceEngine;   RulesBase         mRulesBase;   FactsBase         mFactsBase;   // vari�veis para auxiliar na atualiza��o da base de fatos   bool              pastConfidenceToPass3;   bool              pastConfidenceToPass4;   bool              pastConfidenceToPass5;   bool              pastConfidenceToPass6;   bool              pastConfidenceToPass7;   bool              pastConfidenceToPass8;   bool              pastConfidenceToPass9;   bool              pastConfidenceToPass10;   bool              pastConfidenceToPass11;   bool              pastConfidenceForKick;   bool              pastPlayMode;   bool              pastAgentFrontFreeSpace;   bool              pastBallKickable;   bool              pastBallOurPossesion;   bool              pastBallPossesionOpponent;   bool              pastFastestToBall;   bool              pastCloseToPlayer;   bool              pastBallPositonKnown;   //bool              pastBallAtuationZone;   bool              pastAgentNextLineR;   bool              pastAgentNextLineOfDeep;   bool              pastBallMidplayerPossesion;    bool              pastBallAttackplayerPossesion;    bool              pastTeammateSick;   string            pastPositionOpponent1;   string            pastBestOptionKick;   string            pastDeadBall;   ObjectT           pastChoosePass9;   ObjectT           pastChoosePass2;   ObjectT           pastChoosePass5;   ObjectT           pastChoosePass3;   ObjectT           pastChoosePass4;   ObjectT           pastChoosePass6;   ObjectT           pastChoosePass7;   ObjectT           pastChoosePass8;   PlayerPositionT   pastPlayerLocalization;   PlayerPositionT   pastBallLocalization;   LocalGoal         m_localGoal;   bool              pastBackGoalie;   double            pastDistanceToGoalie;   //A bola está na esquerda?   bool              pastBallLeftPosition;   bool              pastBallSouthPosition;   bool              pastPlayerLeftPosition;   bool              pastPlayerSouthPosition;   string            pastOpponentLocalization;   bool              updateFactsBase      (                                  );   PlayerPositionT   getLocalization      (  VecPosition position            );   string            getLocalizationString(  VecPosition position            );   string            getModeUsOrThemString(                                  );   string            getPlayModeString    (                                  );   double            getSafetyToPass      ( VecPosition      posA,                                             VecPosition      posM            );   double            getSafetyToKick      ( VecPosition      posA,                                             VecPosition      posM            );   bool              confidenceToPass     ( ObjectT          teamMate        );   string            bestOptionForKick    (                                  );   bool              confidenceToKick     (                                  );   string            ModeUsOrThem         (                                  );   bool              atuationZone         (    VecPosition pos               );   bool              teammateIsSick       (                                  );   string            getOpponentLocalization(                                );   bool              closeOpponentHasBall (                                  );   //metodos implementados por Timoteo   //string            getPositionYOpponent1(                                  );   ObjectT           objectTeammateCloser ( ObjectT          obj1,                                            ObjectT          obj2            );   bool              isBallInMidplayerPossesion(                             );   bool              isBallInAttackplayersPossesion(                         );   list<ObjectT>     getListCloseOpponents ( VecPosition pos,                                             double dDist, double dDist2     );   ObjectT           getClosestInSetTo    ( Line l,                                            VecPosition pos1,   VecPosition pos2,                                            double *dDistObjToLine,                                            double *dDistPos1ToPoint ); public:   Instintive                             (                                  );   void              loadRulesBase        (                                  );   string            makeInference        (                                  );   void              update               ( LocalGoal        lc              );   LocalGoal         getLocalGoal         (                                  );   string            getBallLocalization  (                                  );};#endif

⌨️ 快捷键说明

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