3.3 Pathfinding Design Architecture 저 자 : Dan Higgins 발표자 : 김용욱.

Slides:



Advertisements
Similar presentations
Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
Advertisements

Categories of I/O Devices
Memory.
AI Pathfinding Representing the Search Space
COL 106 Shweta Agrawal and Amit Kumar
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering.
Quick Review of Apr 10 material B+-Tree File Organization –similar to B+-tree index –leaf nodes store records, not pointers to records stored in an original.
Skip List & Hashing CSE, POSTECH.
Copyright 2003Curt Hill Hash indexes Are they better or worse than a B+Tree?
Today’s Agenda  Stacks  Queues  Priority Queues CS2336: Computer Science II.
CS 171: Introduction to Computer Science II Hashing and Priority Queues.
1 LINK STATE PROTOCOLS (contents) Disadvantages of the distance vector protocols Link state protocols Why is a link state protocol better?
CS 307 Fundamentals of Computer Science 1 Abstract Data Types many slides taken from Mike Scott, UT Austin.
Binary Heaps CSE 373 Data Structures Lecture 11. 2/5/03Binary Heaps - Lecture 112 Readings Reading ›Sections
Data Communication and Networks Lecture 2 ADTs in Protocol Design (Ring Buffer, Queue, FSM) September 16, 2004 Joseph Conron Computer Science Department.
Hash Tables and Associative Containers CS-212 Dick Steflik.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
Quick Review of material covered Apr 8 B+-Tree Overview and some definitions –balanced tree –multi-level –reorganizes itself on insertion and deletion.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Main Memory. Background Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are only.
CSCI2413 Lecture 6 Operating Systems Memory Management 2 phones off (please)
Chapter 5.4 Artificial Intelligence: Pathfinding.
Memory Management Last Update: July 31, 2014 Memory Management1.
Copyright © Wondershare Software Introduction to Data Structures Prepared by: Eng. Ahmed & Mohamed Taha.
Chapter 5.4 Artificial Intelligence: Pathfinding.
1 Hash Tables  a hash table is an array of size Tsize  has index positions 0.. Tsize-1  two types of hash tables  open hash table  array element type.
CSC 213 – Large Scale Programming. Today’s Goal  Consider what will be important when searching  Why search in first place? What is its purpose?  What.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Chapter 3 List Stacks and Queues. Data Structures Data structure is a representation of data and the operations allowed on that data. Data structure is.
B-Trees. CSM B-Trees 2 Motivation for B-Trees So far we have assumed that we can store an entire data structure in main memory What if we have so.
CSC 213 – Large Scale Programming Lecture 37: External Caching & (a,b)-Trees.
Big Java Chapter 16.
IT253: Computer Organization
Operating Systems COMP 4850/CISG 5550 Page Tables TLBs Inverted Page Tables Dr. James Money.
Chapter 11 Heap. Overview ● The heap is a special type of binary tree. ● It may be used either as a priority queue or as a tool for sorting.
„Policy-Based Benchmarking of Weak Heaps and Their Relatives“ Asger Bruun*, Stefan Edelkamp, Jyrki Katajainen*, Jens Rasmussen* *University of Copenhagen.
1 CSE 326: Data Structures: Hash Tables Lecture 12: Monday, Feb 3, 2003.
Data structures Abstract data types Java classes for Data structures and ADTs.
Maps and Dictionaries Data Structures and Algorithms CS 244 Brent M. Dingle, Ph.D. Department of Mathematics, Statistics, and Computer Science University.
Hashing Sections 10.2 – 10.3 CS 302 Dr. George Bebis.
1 Indexing. 2 Motivation Sells(bar,beer,price )Bars(bar,addr ) Joe’sBud2.50Joe’sMaple St. Joe’sMiller2.75Sue’sRiver Rd. Sue’sBud2.50 Sue’sCoors3.00 Query:
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Toward More Realistic Pathfinding Authored by: Marco Pinter Presentation Date: 11/17/03 Presented by: Ricky Uy.
Hash Tables CSIT 402 Data Structures II. Hashing Goal Perform inserts, deletes, and finds in constant average time Topics Hash table, hash function, collisions.
Collections Data structures in Java. OBJECTIVE “ WHEN TO USE WHICH DATA STRUCTURE ” D e b u g.
CSE373: Data Structures & Algorithms Lecture 6: Priority Queues Kevin Quinn Fall 2015.
CSS446 Spring 2014 Nan Wang.  to study trees and binary trees  to understand how binary search trees can implement sets  to learn how red-black trees.
Mapping IP Addresses to Hardware Addresses Chapter 5.
B-TREE. Motivation for B-Trees So far we have assumed that we can store an entire data structure in main memory What if we have so much data that it won’t.
1 Chapter 9 Searching And Table. 2 OBJECTIVE Introduces: Basic searching concept Type of searching Hash function Collision problems.
Copyright © 2009 – Curt Hill Standard Template Library An Introduction.
Accumulator Representations Dr. Susan Gauch. Criteria  Fast look up by docid  Need to be able to add posting data efficiently  Acc.Add (docid, wt)
1 Data Structures CSCI 132, Spring 2014 Lecture 33 Hash Tables.
Chapter 5 Record Storage and Primary File Organizations
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
Memory management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory.
Operating Systems, Winter Semester 2011 Practical Session 9, Memory 1.
Efficient implementations of Alignment-based algorithms
Main Memory Management
Chapter 8: Main Memory.
Hashing CS2110 Spring 2018.
Computer Architecture
Memory Management-I 1.
Lecture 29: Virtual Memory-Address Translation
CACHE-CONSCIOUS INDEXES
Linked List and Selection Sort
Lecture 13: Computer Memory
Indexing, Access and Database System Architecture
Presentation transcript:

3.3 Pathfinding Design Architecture 저 자 : Dan Higgins 발표자 : 김용욱

Abstract Hundreds of units could pathfind without bogging down the system How to split paths up over time? Keep the user believing that paths are computed instantaneously

Terms A* machine : Generic A* engine described in article 3.2 Unit Anything else that wish to pathfind from one point to another Node A* node which encompasses information like Position, cost Pathfinding revolution Single iteration through the A* engine’s main loop Out-of-sync It occurs in network game, the game ceases to be the same. Major problem for multi-player games

The Road to Cross The first of many hurdles to cross “Game freeze” – plague of pathfinders In large map, A* consume much time Time-sliced pathfinding Split the paths up over time In the real-time strategy game, giant maps, thousands of units by using a three-step path architecture Quick path Full path Splice path

Quick path To get unit moving To respond quickly High speed short-distance pathfinder To buy us time to compute the real path in the background How works? 10 revolution limit Five-tile path is generated

Full path The real deal Search thousands of A* nodes to find the correct path Put the full path on the pathfinding queue

Splice path When quick path and full path are completed Path = quick path + full path Correct and Smooth out The errors made by the quick path High-speed path Same as quick path From the unit’s current position To some point further down the complete path

Splice path

Priority paths What happens? If a unit gets to the end of its quick path before the full path is finished computing How it works? Takes the unit out of the pathfinding queue Sets its max revolutions cap a little bit higher Then finishes the path

Managing the paths Single revolution 1. Get the cheapest node 2. Look at its neighbors 3. Put the node on the closed list Path manager Use revolutions to balance performance Path manager update Consists of performing X number of overall revolution per game tick

Managing the paths Time-slicing technique Equal time Divide the revolutions by the number of paths in the queue All pathfinding engines get an equal amount of processing time each tick Progressive Start with a low number of max revolutions per tick Each time through the queue, this number should get larger Biased In order to get quick paths for the user

3.4 How to Achieve Lightning-Fast A*

Abstract A* optimization Implementing the pathfinding engine Focus on high-level and low-level optimization Speed up optimization

Optimization High-level Redefine search space Bound the amount of A* node flooding Group pathfinding Low-level C++ optimization

For fast A* Don't use STL while STL is amazing, pathfinding warrants a hand-written linked-list and hash-table system Memory pool Use limits on your pools to handle typical situations

For fast A* Caching make a flags Flags array to indicate the state of each node The array is 1 byte per tile The incredible lookup speed and optimization Clear unexamined Passablepassable for A* Blockednot passable for A* open in open list Closedin closed list

For fast A* Sliding window if you can't afford the memory to dedicate to a flags array try using a sliding window system

For fast A* Hash table transform open and closed lists into hash tables Make sure to play with the hash function Cheapskate Use a cheap list Sorted heap structure - Slow insertion, Fast removal Unsorted list - Fast insertion, slow removal Cheap list List of 15 node that are the cheapest on the open list Search for the cheapest node on the Open list

For fast A* Fast storage Used more memory Only one fast-storage pathfinder for entire game An array of pointers to nodes for searches long-distance pathfinders use STL map, hash_map, hash_set To store all nodes for fast lookups