机器人足球球队小组分工报告_第1页
机器人足球球队小组分工报告_第2页
机器人足球球队小组分工报告_第3页
机器人足球球队小组分工报告_第4页
机器人足球球队小组分工报告_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、小组成侪, 决策PlayerTeamsuva334334 formations-setFormationFT_334_OFFENSIVE设置球队出场阵形!小组成侪, 决策PlayerTeamsuva334334 formations-setFormationFT_334_OFFENSIVE设置球队出场阵形!433 334 的阵型。 11 soc ObjectT ClosestAgent1; doubleClosestOwnDis1;soc = leadingPass(ClosestAgent1,1); 11号开球,则将球传给距离他最近的队友,来减少被截断的可 soc= soc soc soc=

2、soc=, soc soc=soc=,=WM-内 soc = leadingPass(ClosestAgent,1);else/doublesoc=内 soc = leadingPass(ClosestAgent,1);else/doublesoc= soc=/91011 11 11109 soc=doublesoc=elsesoc= 11119 doublesoc=elsesoc= 11119 Copyright(c)2000-2003,JelleKok,Universityofs.ModifiedbyHfut.forserver1).dashdirctionfornotonlyforwar

3、dandbackbutalsoleftrightandother45*(-3,-2).addStamina.CapacityandtheysystermandRedistributionanduseinsourceandbinaryforms,withormodification,arepermittedtthefollowingconditionsare1.Redistributionsofsourcecodemustlistofconditionsandthefollowingheabovecopyrightnotice,2.Redistributionsinbinaryformmustr

4、eproducetheabovecopyrightthislistofconditionsandthefollowingand/orothermaterialsprovidedwiththe3.NeitherthenameoftheUniversityofAmsterdamnorthenamesofcontributorsmaybeusedtoendorseorpromoteproductsderivedfromsoftwarewithoutspecificpriorwritten.THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTO

5、RSASANDANYEXPRESSORDWARRANTIES,INCLUDING,BUTNOTLI ITEDTO, EED.INNOEVENTSHALLTHECOPYRIGHTOWNERORCONTRIBUTORSBEANDANYEXPRESSORDWARRANTIES,INCLUDING,BUTNOTLI ITEDTO, EED.INNOEVENTSHALLTHECOPYRIGHTOWNERORCONTRIBUTORSBEDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENTOFSUBSTITUTEGOODS;LOSSOFUSE,DATA,ORPROFIT

6、S;OR CAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTORTORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEOFTHISSOFTWARE,EVENIFADVISEDOFSIBILITYOFSUCH/*!fileRobocupSoccerSimulationTeam:UvATrilearn Jelle KokLast:Thisfilecontainstheclassdefinitionsfortareusedtotesttheteamshighlevel isB

7、eforeKickOff( ) ) / 要做开球后的决策,向下面继续找另外一个 WM-isBeforeKickOff( )ifWM-isKickOffUs&WM-getPlayerNumber(99takeskickmand AgentWMition();/ Agent(/ ();/ =WM-ifWM-isBeforeKickOff( ) ) / 要做开球后的决策,向下面继续找另外一个 WM-isBeforeKickOff( )ifWM-isKickOffUs&WM-getPlayerNumber(99takeskick9 ifWM-isBallKickable() )/ Goal( 0.4*

8、SS-getGoalWidth() );/ soc=Goal,SS-getBallSpeedMax();/Log.log(100,takekickoff /socLog.log(100,movetoballtotakekick-offreturnmandInQueue(soc if(formations-getFormation()!=FT_INITIAL|/notinition()2.0 /goto (WM-ition()/elseturnto (ition(0,0),0) /elseturnto (ition(0,0),0) / formations-setFormationFT_334_

9、OFFENSIVE设置球队出场阵形! mandType = CMD_ILLEGAL;/soc 命令对象mand(CMD_DASH,80,45)forv14.fixedbyifWM-getConfidence(OBJECT_BALLPS-getBallConfThr判断对球的ifunknownmandInQueue(soc=searchBall()mandInQueuealignNeckWithBodysearchforit 11 soc ObjectT ClosestAgent1; doubleClosestOwnDis1;soc = leadingPass(ClosestAgent1,1);

10、 soc soc=soc=soc= soc=soc=soc= soc= socifkickable / elseif(WM-CircleObjectT ClosestAgent; doubleClosestOwnDis;c=Circle(WM-Num=WM-itionball=WM-=WM-g tGl TNum=WM-itionball=WM-=WM-g tGl T内 soc = leadingPass(ClosestAgent,1);doublesoc= soc=/91011 11 11109 soc=soc=/91011 11 11109 soc=doublesoc=elsesoc= WM

11、&WM-isDeadBallThem() ) / /stesttoLog.log(100,Iamfastesttoball;cangettherein%dcycles,iTmpsocercept(falseercepttheifstamina/ er ifmandType=CMD_DASH )/动er=30.0*WM-getAgentStamina().getRecovery();/dashmandInQueue(soc /ifstaminaended mandInQueue(soc/dash elseif Ball.getX()/10.0) / 1.5+/ifnotnear /ifstami

12、naended mandInQueue(soc/dash elseif Ball.getX()/10.0) / 1.5+/ifnotnear /ifstamina soc=mandInQueue(soc/moveto /elsewatch elseiffabsWM-getRelativeAngle(OBJECT_BALL1.0watchball其他剩下 /nothingto return/*!ThismethodisasimplebasedontheofthesimpleTeamFCPortugal.Itdefinesarectangleinitspenaltyareaandmovestoit

13、iononthisrectanglewheretheersectsifyoumakeantheitionandthecenterofthegoal.IftheballheownpenaltyareatheballerceptedandmandmandAgent=WM-= WM-/definethetopanditionofarectangleinwhichkeepericconstL ftTop(-PI CH_LENGTH/2.0icconst/definethebordersofmandmandAgent=WM-= WM-/definethetopanditionofarectanglein

14、whichkeepericconstL ftTop(-PI CH_LENGTH/2.0icconst/definethebordersofthisrectangleusingthetwossic ic lineFront= ition(-sic lineRight=ition(-if(WM-isBeforeKickOff()if(formations-getFormation()!=FT_INITIAL|/notinition()2.0 /goto ition()/elseturntomandInQueue(soc=( ition(0,0),0returnif(WM-getConfidence

15、(OBJECT_BALL)getBallConfThr()/confidenceball/search elseif(WM-getPlayMode()=PM_PLAY_ON|WM-isFreeKickThem() if(WM-isBallCatchable()mandInQueue(soc=catchBall() elseif(WM-isBallKickable()soc=kickTo(elseif(WM-getPlayMode()=PM_PLAY_ON|WM-isFreeKickThem() if(WM-isBallCatchable()mandInQueue(soc=catchBall()

16、 elseif(WM-isBallKickable()soc=kickTo( mandInQueue(soc elseif(WM-isInOwnPenaltyArea(Ball(&i,true)WM-getAgentObjectType() )mandInQueue(socercept(true) /makelinenowngoalandtheMyGoal=(WM-getSide()=SIDE_LEFT? : LinelineBall=s(WM-/determinewhereyourfrontersectswiththelinefromersect=ersection(lineBall/outsiderectangle,uselineatsidetoifersect= ersect= elseififersect.getX()0.5soc=(mandInQueue(soc ifition()0.5soc=(mandInQueue(soc elseif(WM-isFreeKickUs()=true|WM-isGoalKickUs()=trueif(WM-isBallKickable()if(WM-getTimeSinceLastCatch()=25&W

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论