?? advancedagent.h
字號:
/* * Copyright 2002-2005, Mersad Team, Allameh Helli High School (NODET). * * 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. * * 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 Library General Public License for more details. * * This file is created by: Ahmad Boorghany * * Released on Monday 1 August 2005, 10 Mordad 1384 by Mersad RoboCup Team. * For more information please read README file.*/#ifndef __ADVANCED_AGENT_H#define __ADVANCED_AGENT_H#include <GroupWorks.h>#include <Positioning.h>#include <SyncedAgent.h>#include <SayDecision.h>#include <BodyDecision.h>#include <HeadDecision.h>#include <PointToDecision.h>#include <PenaltyDecision.h>#include <NonPlayOnDecision.h>#include <GoaliePlayOnDecision.h>#include <WithBallPlayOnDecision.h>#include <WithoutBallPlayOnDecision.h>#include <StatelessPlan.h>#include <RootPlan.h>#ifndef NULL# define NULL 0#endif // NULLclass Form{public: SayDecisionForm sayForm; HeadDecisionForm headForm; float setBreakExperiment; unsigned setCycle; Form(); void reset();};class Library{protected:public: int quickLevel; float breakExperiment; PassLibrary pass; Positioning positioning; WithoutBallSelection gwSelection; Command *lastBodyCycleCommand; Library(const WorldModel *worldModel);};class RadarSystem{protected: const WorldModel *worldModel; const Player *saids[3]; const Player *sayings[3]; int saidsNum; int sayingsNum; int anglesNum; float anglesList[FULL_PLAYERS_NUM + HALF_PLAYERS_NUM]; const Player *angPlayers[FULL_PLAYERS_NUM + HALF_PLAYERS_NUM]; bool isSaid(const Player &player); int semiRandom; int lastUpdateTime; const Player *lastTargetPlayer;public: RadarSystem(const WorldModel *worldModel); void sender(Form &form, const Library &library); void receiver(Form &form, const Library &library);};class AdvancedAgent: public SyncedAgent{public: AdvancedAgent(int argc, char **argv); virtual ~AdvancedAgent();protected: StatelessPlan *statelessPlan; RootPlan *rootPlan; GroupWorks groupWorks; SayDecision sayDecision; HeadDecision headDecision; PointToDecision pointToDecision; Form form; Library library; RadarSystem radar; virtual void senseBody(const SExpression &exp); virtual void see(const SExpression &exp); virtual void hear(const SExpression &exp); virtual void sayDecide(); virtual void headDecide(); virtual void pointToDecide(); virtual bool bodyDecide(int quickLevel);};#endif // __ADVANCED_AGENT_H
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -