亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? loneforwardteamhomog.java

?? 一個多機器人的仿真平臺
?? JAVA
字號:
package Domains.SoccerBots.teams;/*--------------------------------------------------------------------*//* * LoneForwardTeamHomoG.java */import  EDU.gatech.cc.is.util.Vec2;import  EDU.gatech.cc.is.abstractrobot.*;import java.lang.*;/** * @author Bryan Nagy * @version $Revision: 1.1 $ * *      Only faintly derived from the BasicTeam code for things like *      finding the closest teammate and calculating the kickspot. *  All actual control and decision algorithims are unique, */public class LoneForwardTeamHomoG extends ControlSystemSS        {        /**        Configure the control system.  This method is        called once at initialization time.  You can use it        to do whatever you like.        */        public void Configure()                {                // not used                }                                /**        Called every timestep to allow the control system to        run.        */        public int TakeStep()                {                // the eventual movement command is placed here                Vec2    result = new Vec2(0,0);                // get the current time for timestamps                long    curr_time = abstract_robot.getTime();                //--- Get some sensor data ---                // get vector to the ball                Vec2 ball = abstract_robot.getBall(curr_time);                // get vector to our and their goal                Vec2 ourgoal = abstract_robot.getOurGoal(curr_time);                Vec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);                // get a list of the positions of our teammates                Vec2[] teammates = abstract_robot.getTeammates(curr_time);                // find the closest teammate                Vec2 closestteammate = new Vec2(99999,0);                for (int i=0; i< teammates.length; i++) {                         if (teammates[i].r < closestteammate.r)                                closestteammate = teammates[i];                }                                // find if we are the robot on our team closest to the ball                double distance=0;                double minDistance=99999;                for (int i=0; i< teammates.length; i++){                       distance=Math.pow((Math.pow((ball.x-teammates[i].x),2.0)+Math.pow((ball.y-teammates[i].y),2.0)),.5);                        if (distance < minDistance){                                minDistance = distance;                        }                }                boolean iAmClosest=true;                if (ball.r*.95 > minDistance){                                iAmClosest =false;                }                        //--- now compute some strategic places to go ---                // compute a point one robot radius                // behind the ball.                Vec2 kickspot = new Vec2(ball.x, ball.y);                kickspot.sub(theirgoal);                kickspot.setr(abstract_robot.RADIUS);                kickspot.add(ball);                                //we will use this to test if we are in front of or behind the ball                Vec2 frontspot = new Vec2(ball.x, ball.y);                frontspot.sub(theirgoal);                frontspot.setr(-abstract_robot.RADIUS*2);                frontspot.add(ball);                // compute a north and south spot                Vec2 northspot = newVec2(ball.x,ball.y+abstract_robot.RADIUS*2);                Vec2 southspot = newVec2(ball.x,ball.y-abstract_robot.RADIUS*2);                // compute a position between the ball and defended goal                Vec2 goaliepos = new Vec2(ourgoal.x + ball.x,                                ourgoal.y + ball.y);                goaliepos.setr(goaliepos.r*0.5);                // a direction away from the closest teammate.                Vec2 awayfromclosest = new Vec2(closestteammate.x,                                closestteammate.y);                awayfromclosest.sett(awayfromclosest.t + Math.PI);                //the LoneForwardTeamPlan:                //if I am the closest member of my team to the ball,                 if(iAmClosest){                        //then it will be my job to put it in                        //If I am between the ball and their goal,                         //that is, on the wrong side of the ball,                        if(kickspot.r>frontspot.r){                                //I will first 'swirl' around the ball,                                //if I am above the ball,                                 if(ball.y<0){                                        result=northspot;                                       abstract_robot.setDisplayString("Swirling North");                                //I will swirl north                                 }else{                                       abstract_robot.setDisplayString("Swirling South");                                        result=southspot;                                        //else I will swirl south                                }                        }                        else{                        //otherwise I will head for the kickspot behind the ball.                                //if I am already at the kickspot                                if(kickspot.r<abstract_robot.RADIUS*.1){                                                //I will continue toward it                                                result = ball;                                          //and if I can kick the ball                                                //and I am close enough to score...                                                if(abstract_robot.canKick(curr_time) && theirgoal.r<=1){                                                  //I will kick the ball                                                       abstract_robot.kick(curr_time);                                                }                                                //and continue toward it                                                result = ball;                                }else{abstract_robot.setDisplayString("Seeking Kickspot");                                        result=kickspot;                                }                        }                }else{                        //but if I am not the closet member of my team to the ball,                         //I will go defend the goal.                        //by driving towards the center of the goal                        abstract_robot.setDisplayString("Defending");                        result=ourgoal;                        result.sety((ourgoal.y+goaliepos.y*0.5)/2);                        result.setx(ourgoal.x+ball.x*0.01);                                                //but if I am within a certain distance of the x value of the goal,                         // and within a certain distance of my teammates,                        if((Math.abs(ourgoal.x)<2)&&(closestteammate.r<0.08)){                                // I will move away from the closest one.                                //but only in the y vector.                                 result.sety(awayfromclosest.y*1.5);                                result.setx(0);                                abstract_robot.setDisplayString("Defending and avoiding Teammate");                        }                                                //detect if we are being trapped...                        if((Math.abs(ourgoal.x)<abstract_robot.RADIUS*5)&&(Math.abs((ourgoal.y+goaliepos.y*0.5)/2)>abstract_robot.RADIUS*3)){                        //and if so, circle around the trapper...                                result.setx(ourgoal.x*-500);                                result.setx(ourgoal.y*2);                                abstract_robot.setDisplayString("Defending and avoiding Being Trapped");                        }                }                //--- Send commands to actuators ---                // set the heading                abstract_robot.setSteerHeading(curr_time, result.t);                // set speed at maximum                abstract_robot.setSpeed(curr_time, 1.0);                // tell the parent we're OK                return(CSSTAT_OK);                }        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精一区二区三区| 亚洲一二三四在线| 91麻豆精品国产91久久久久| 91蜜桃婷婷狠狠久久综合9色| 国产最新精品免费| 国产一区二区在线视频| 久久成人免费网| 免费成人在线网站| 狠狠色丁香久久婷婷综| 国产伦精一区二区三区| 成人免费观看视频| 不卡欧美aaaaa| 欧美性videosxxxxx| 欧美体内she精高潮| 欧美区在线观看| 91精品国产综合久久精品图片 | 成人av在线播放网址| 国产suv精品一区二区三区| 高清视频一区二区| www.欧美色图| 欧洲中文字幕精品| 欧美日韩国产免费| 欧美电影免费提供在线观看| 久久免费看少妇高潮| 欧美极品美女视频| 一区二区三区日韩精品视频| 亚洲h精品动漫在线观看| 男女男精品网站| 国产一区二区三区精品欧美日韩一区二区三区| 国产毛片精品国产一区二区三区| 成人精品在线视频观看| 一道本成人在线| 欧美大片在线观看一区| 欧美激情一二三区| 亚洲国产精品一区二区久久恐怖片| 视频一区中文字幕国产| 懂色av一区二区三区蜜臀| 色偷偷成人一区二区三区91| 欧美精品少妇一区二区三区| 久久精品一区八戒影视| 亚洲欧美日韩一区二区三区在线观看| 亚洲国产精品精华液网站| 国产麻豆精品theporn| 91国偷自产一区二区开放时间| 欧美一级在线观看| 国产精品你懂的| 日韩成人精品视频| 91亚洲精品一区二区乱码| 日韩视频中午一区| 亚洲黄网站在线观看| 精品亚洲免费视频| 日本韩国欧美三级| 国产午夜精品一区二区三区四区| 一区二区成人在线观看| 国产在线精品不卡| 欧美影视一区二区三区| 国产精品免费aⅴ片在线观看| 日韩影院精彩在线| 日本道精品一区二区三区| 国产女同互慰高潮91漫画| 天天综合天天综合色| 色偷偷88欧美精品久久久| 国产精品欧美一区二区三区| 国内成人自拍视频| 日韩一二三四区| 五月综合激情日本mⅴ| 91免费观看在线| 中文字幕一区在线观看| 国产精品538一区二区在线| 日韩一级免费观看| 日韩电影在线观看电影| 欧美裸体一区二区三区| 亚洲人快播电影网| 91丨九色丨蝌蚪富婆spa| 国产精品视频一二三区| 国产91丝袜在线观看| 2欧美一区二区三区在线观看视频| 亚洲永久精品国产| 欧美伊人精品成人久久综合97 | 欧美色综合久久| 亚洲激情图片qvod| 91久久精品网| 午夜电影网一区| 欧美视频三区在线播放| 午夜欧美电影在线观看| 欧美日韩精品一区视频| 婷婷中文字幕一区三区| 8x福利精品第一导航| 奇米精品一区二区三区在线观看一| 欧美日韩国产免费一区二区| 天天色图综合网| 日韩视频在线你懂得| 韩国理伦片一区二区三区在线播放| 日韩欧美一级精品久久| 国产精品一二一区| 国产欧美久久久精品影院| 暴力调教一区二区三区| 亚洲欧美另类在线| 欧美丰满美乳xxx高潮www| 日本网站在线观看一区二区三区| 欧美一二三四区在线| 国产乱淫av一区二区三区| 国产精品麻豆网站| 欧美色综合久久| 黄色成人免费在线| ㊣最新国产の精品bt伙计久久| 色综合天天综合网国产成人综合天| 亚洲综合色网站| 欧美成va人片在线观看| 高清国产一区二区| 亚洲国产婷婷综合在线精品| 日韩欧美色综合| 99精品国产热久久91蜜凸| 日日骚欧美日韩| 国产视频一区不卡| 欧美日韩三级一区二区| 国产精品资源站在线| 一二三区精品视频| 久久综合久久综合亚洲| 欧美综合一区二区三区| 国产剧情av麻豆香蕉精品| 一区二区高清在线| 国产欧美日韩综合| 91精品国产综合久久福利软件| 成人免费视频免费观看| 狂野欧美性猛交blacked| 亚洲激情综合网| 久久久噜噜噜久噜久久综合| 在线观看视频一区二区| 成人网在线免费视频| 蜜臀av性久久久久蜜臀aⅴ | 日韩专区欧美专区| 中文字幕一区二区在线播放| 日韩免费一区二区三区在线播放| 99精品桃花视频在线观看| 国产在线不卡一卡二卡三卡四卡| 五月婷婷久久综合| 亚洲乱码国产乱码精品精可以看| 久久久久免费观看| 欧美一区二区女人| 欧美日韩在线精品一区二区三区激情| 99久久精品国产网站| 成人性生交大片免费看在线播放| 精品一区二区三区久久| 天天综合色天天综合色h| 一区二区三国产精华液| 一区二区三区在线播| 国产精品久久久久一区| 日本一区二区视频在线观看| 久久久五月婷婷| 久久久五月婷婷| 久久久久久久精| 久久在线免费观看| 久久久久久久综合色一本| 精品国产电影一区二区 | 蜜桃91丨九色丨蝌蚪91桃色| 夜夜爽夜夜爽精品视频| 亚洲精品欧美激情| 中文字幕一区二区在线观看| 精品国产一区二区国模嫣然| 日韩精品一区二区三区视频| 欧美一级片在线观看| 欧美自拍偷拍午夜视频| 欧美日韩一区二区三区不卡| 欧美影视一区在线| 欧美挠脚心视频网站| 欧美日韩色一区| 欧美日韩一区二区不卡| 6080国产精品一区二区| 91精品国产手机| 2欧美一区二区三区在线观看视频| 精品福利av导航| 国产色91在线| 亚洲品质自拍视频| 亚洲高清视频中文字幕| 麻豆精品视频在线观看视频| 久久精品二区亚洲w码| 国产成人午夜高潮毛片| 成人综合在线视频| 91视视频在线观看入口直接观看www| 99视频热这里只有精品免费| 在线观看av一区| 777欧美精品| 久久精品水蜜桃av综合天堂| 久久精品视频免费观看| 一区二区三区在线观看欧美| 亚洲香蕉伊在人在线观| 男女视频一区二区| 不卡一区二区在线| 欧美色网站导航| 国产日韩影视精品| 亚洲国产综合视频在线观看| 日韩不卡免费视频| www.日本不卡| 欧美成人国产一区二区| 亚洲男同1069视频| 国产精品一区二区x88av| 欧美日韩中文另类| 国产精品欧美综合在线| 奇米在线7777在线精品 |