110 likes | 326 Views
G54DIA. TUTORIAL #2 Julian Zappala. Tutorial Overview. This tutorial covers common problems associated with the task environment: Exploring the task environment: searching for a well/task Processing percepts detecting a well/task Managing state not running out of fuel
E N D
G54DIA TUTORIAL #2 Julian Zappala
Tutorial Overview • This tutorial covers common problems associated with the task environment: • Exploring the task environment: • searching for a well/task • Processing percepts • detecting a well/task • Managing state • not running out of fuel • remembering wells/tasks • accomplishing tasks • But first....
Questions about the Java Package? <<Action>> MoveAction MoveTowardsAction RefuelAction LoadWaterAction DeliverWaterAction RefuelAction() execute() LoadWaterAction() execute() execute() MoveTowardsAction(Point) execute() DeliverWaterAction(Task) execute() MoveAction(int) execute() North : int South : int East : int West : int NorthEast : int NorthWest : int SouthEast : int SouthWest : int
Objectives of Exploration • To characterise the environment? • To characterise features within the environment? • To identify useful features of the environment? • What do we mean by "useful"? • All of the above? • Other ideas?
Some Constraints • The tanker can only "see" so far • Implications for how the tanker moves? • Implications for how often the view is processed? • Exploration requires fuel • How are OutOfFuelExceptions avoided? • A general problem (not just for exploration) • Maintenance goal • Other ideas?
Approaches to Exploration • These are not the only approaches • Which of these seems most appropriate?
Not running out of fuel • Useful method: tankerInstance.getFuelLevel() • Your approach may depend on your agent's architecture • Reactive: • If distance of tanker from fuel pump equals the amount of fuel remaining then go to the pump • Deliberative: • Incorporate fuel stops in to route planning • Advantages and disadvantages?
Gathering Information: Wells & Stations • The tanker's view is an 2D array of Cells • Wells and stations are derived from DefaultCell • You may need to • test if a cell is a well: someCell instanceof Well • cast a cell to a well: (Well)someCell • Where are the wells/stations located? • getPoint(): Inherited from DefaultCell • wellInstance.getPoint() • stationInstance.getPoint()
Gathering Information: Tasks • Tasks can be found a stations • Does a station have a task? • stationInstance.getTask()!=null • What information is held in a task? • taskInstance.getStationPosition() • taskInstance.getWaterDemand() (total) • taskInstance.isComplete() • taskInstance.getRequired() (remaining)
How much exploration is "enough"? • Should the tanker ever stop exploration? • If so, • what criteria might signal an end to exploration? • what criteria might signal further exploration is required?
Summary: Exploration • Design/Conceptual Challenges • What are the objectives of exploration? • What information can be gathered? • What are the constraints? • What is/are the strategy(ies) for this? • If multiple strategies, how are these selected? • How much exploration is "enough"? • Technical Challenges • Percepts - How is the view processed? • Memory - What data structures are required? • Persistence - How can a selected strategy persist over multiple sense/act cycles? • Other ideas?