機(jī)器人足球球隊(duì)小組分工報(bào)告_第1頁
機(jī)器人足球球隊(duì)小組分工報(bào)告_第2頁
機(jī)器人足球球隊(duì)小組分工報(bào)告_第3頁
機(jī)器人足球球隊(duì)小組分工報(bào)告_第4頁
機(jī)器人足球球隊(duì)小組分工報(bào)告_第5頁
免費(fèi)預(yù)覽已結(jié)束,剩余10頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、小組成儕, 決策PlayerTeamsuva334334 formations-setFormationFT_334_OFFENSIVE設(shè)置球隊(duì)出場(chǎng)陣形!小組成儕, 決策PlayerTeamsuva334334 formations-setFormationFT_334_OFFENSIVE設(shè)置球隊(duì)出場(chǎng)陣形!433 334 的陣型。 11 soc ObjectT ClosestAgent1; doubleClosestOwnDis1;soc = leadingPass(ClosestAgent1,1); 11號(hào)開球,則將球傳給距離他最近的隊(duì)友,來減少被截?cái)嗟目?soc= soc soc soc=

2、soc=, soc soc=soc=,=WM-內(nèi) soc = leadingPass(ClosestAgent,1);else/doublesoc=內(nèi) 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( ) ) / 要做開球后的決策,向下面繼續(xù)找另外一個(gè) WM-isBeforeKickOff( )ifWM-isKickOffUs&WM-getPlayerNumber(99takeskickmand AgentWMition();/ Agent(/ ();/ =WM-ifWM-isBeforeKickOff( ) ) / 要做開球后的決策,向下面繼續(xù)找另外一個(gè) 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設(shè)置球隊(duì)出場(chǎng)陣形! mandType = CMD_ILLEGAL;/soc 命令對(duì)象mand(CMD_DASH,80,45)forv14.fixedbyifWM-getConfidence(OBJECT_BALLPS-getBallConfThr判斷對(duì)球的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內(nèi) 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 )/動(dòng)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等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論