您好,欢迎光临本网站![请登录][注册会员]  
文件名称: 2012RobocupRuscue东大代码
  所属分类: Java
  开发工具:
  文件大小: 2mb
  下载次数: 0
  上传时间: 2012-09-25
  提 供 者: longs******
 详细说明: 2012东大伊朗公开赛代码 package seu.agent; import java.awt.Point; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.EnumSet; import java.util.HashSet; import java.util.List; import java.util.Random; import java.util.Set; import rescuecore2.Constants; import rescuecore2.config.Config; import rescuecore2.messages.Command; import rescuecore2.misc.Pair; import rescuecore2.standard.components.StandardAgent; import rescuecore2.standard.entities.AmbulanceTeam; import rescuecore2.standard.entities.Area; import rescuecore2.standard.entities.Blockade; import rescuecore2.standard.entities.Building; import rescuecore2.standard.entities.Civilian; import rescuecore2.standard.entities.Edge; import rescuecore2.standard.entities.FireBrigade; import rescuecore2.standard.entities.Human; import rescuecore2.standard.entities.PoliceForce; import rescuecore2.standard.entities.Refuge; import rescuecore2.standard.entities.Road; import rescuecore2.standard.entities.StandardEntity; import rescuecore2.standard.entities.StandardEntityConstants.Fieryness; import rescuecore2.standard.entities.StandardEntityURN; import rescuecore2.standard.entities.StandardPropertyURN; import rescuecore2.standard.entities.StandardWorldModel; import rescuecore2.standard.messages.AKSpeak; import rescuecore2.worldmodel.ChangeSet; import rescuecore2.worldmodel.EntityID; import rescuecore2.worldmodel.Property; import seu.agent.BasicTask.BasicTask; import seu.agent.BasicTask.State; import seu.config.Configuration; import seu.message.ImportantMessage; import seu.message.MessageController; import seu.message.MessageMemory; import seu.message.MessagePriority; import seu.message.MessageTranslator; import seu.message.QueueMessage; import seu.message.SmartChoose; import seu.message.Type.AgentIsBuriedMessage; import seu.message.Type.BlankMessage; import seu.message.Type.BuildingIsBurningMessage; import seu.message.Type.BuildingIsExploredMessage; import seu.message.Type.BuildingIsExtinguishedMessage; import seu.message.Type.CivilianInformationMessage; import seu.message.Type.CivilianIsSavedOrDeadMessage; import seu.message.Type.InformTeamMessage; import seu.message.Type.Message; import seu.message.Type.MessageCount; import seu.message.Type.MessageType; import seu.message.Type.RegionAssignmentMessage; import seu.object.Exploration; import seu.object.SEUWorldModel; import seu.object.Building.BuildingInfo; import seu.object.Partition.EntityInPartition; import seu.object.Partition.GroupingType; import seu.object.Partition.PartitionMap; import seu.object.Road.MultiBlockDistanceComparator; import seu.object.Road.RoadInfo; import seu.object.Road.RoadUtilities; import seu.utilities.DistanceComparator; import seu.utilities.Path; import seu.utilities.PositionHistory; import seu.utilities.Geometry.PositionLocate; import seu.utilities.Search.AbstractSearch; import seu.utilities.Search.AStar.AStarSearch; import seu.utilities.Search.Cost.PathType; /** * SEU's Top Level Agent */ public abstract class SEUAgent extends StandardAgent { public static final double AGENT_RADIUS = 500; private static final int RANDOM_WALK_LENGTH = 3; private static final int MIN_DAMAGE_GO_TO_REFUGE = 0; private static final int DEFAULT_AGENT_THINK_TIME = 1000; private static final double AGENT_THINK_TIME_TOLERANCE = 0.8; private static final int DEFAULT_VIEW_DISTANCE = 30000; private static final int DEFAULT_RANDOM_WALK_PENALTY = 3; private static final int IGNORE_COMMANDS_AFTER = 2; protected static final int MAX_PATH_LENGTH = 30; @SuppressWarnings("unused") private static final String SAY_COMMUNICATION_MODEL = "kernel.standard.StandardCommunicationModel"; private static final String MAX_PLATOON_CHANNELS_KEY = "comms.channels.max.platoon"; private static final String SPEAK_COMMUNICATION_MODEL = "kernel.standard.ChannelCommunicationModel"; protected static final String START_TIME_KEY = "kernel.agents.ignoreuntil"; private static final String AGENT_THINK_TIME_KEY = "kernel.agents.think-time"; private static final String VIEW_DISTANCE_KEY = "perception.los.max-distance"; protected int viewDistance; // 鍙湁Say閫氫俊鏃惰竟璧拌竟璇� protected MessageTranslator sayMessageTransfer; protected int timeStep; protected int startTime; protected int totalSent; protected int totalReceived; protected int agentThinkTime; protected int randomWalkPenalty; protected int desiredPath; protected SEUWorldModel world; protected State state; protected Collection unexploredBuildings; protected Collection> informedBurningBuildings; protected MessageController messageController; protected MessageMemory messageMemory; protected ChangeSet changeSet; protected Set changedEntities; protected List observableBuildings; @SuppressWarnings({ "rawtypes" }) protected List tasks; protected StandardEntity locationAtLastCycle; protected StandardEntityURN agentType; protected List burningBuildingsInChangeSet; protected List foundAgents; protected List heatingBuildings; protected Date decisionStartTime; protected List civiliansAround; protected ImportantMessage importantmessage; protected SmartChoose smartchoose; // 姝讳骸鐨勬櫤鑳戒綋鍜孋ivilain private List deadHumans; public List getDeadHumans() { return deadHumans; } public void setSavedCivAndAgents(List savedCivAndAgents) { } // 璁板綍鍒拌揪鐨勫湴鐐瑰拰鏃堕棿 PositionHistory positionHistory; /** * The search algorithm. */ protected AbstractSearch search; /** * Whether to use AKSpeak messages or not. */ protected boolean useSpeak; /** * Construct a SEU Agent. */ protected SEUAgent() { importantmessage =new ImportantMessage(); smartchoose = new SmartChoose(); } public int getNo() { if (world == null) { return 0; } List team = world.getTeam(); if (team.contains(getID())) { return team.indexOf(getID()); } else { return 0; } } public void superPostConnect() { super.postConnect(); } // 璁板綍涓婁笂鍛ㄦ湡锛屼笂涓�懆鏈燂紝褰撳墠鍛ㄦ湡鏅鸿兘浣撲綅缃� private Area latestPosition; private Area lastPosition; private Area currentPostion; // private State latestState; private State lastState; private State currentState; // 涓や釜绉诲姩鏍囧織 // 杩炵画涓や釜鍛ㄦ湡闅忔満绉诲姩 boolean moveOnce = false; boolean moveAgain = false; // 鏅鸿兘浣撶姸鎬佷俊鎭� State temp; // 閲嶅娆℃暟 ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: robocup rescue redsun seu
 输入关键字,在本站1000多万海量源码库中尽情搜索: