Creating and Navigating Virtual Worlds David Mould.

Slides:



Advertisements
Similar presentations
Artificial Intelligence in Game Design
Advertisements

Heuristic Search techniques
Problem solving with graph search
AI Pathfinding Representing the Search Space
Pathfinding AI John See 29 Nov, 13 Dec 2010.
BackTracking Algorithms
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Games & Adversarial Search
NUS CS5247 Motion Planning for Camera Movements in Virtual Environments By Dennis Nieuwenhuisen and Mark H. Overmars In Proc. IEEE Int. Conf. on Robotics.
Pathfinding Basic Methods.
Lecture 12: Revision Lecture Dr John Levine Algorithms and Complexity March 27th 2006.
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
Graphs Chapter 12. Chapter Objectives  To become familiar with graph terminology and the different types of graphs  To study a Graph ADT and different.
CSE 380 – Computer Game Programming Pathfinding AI
Adversarial Search Chapter 5.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Content Based Image Clustering and Image Retrieval Using Multiple Instance Learning Using Multiple Instance Learning Xin Chen Advisor: Chengcui Zhang Department.
Identifying Early Buyers from Purchase Data Paat Rusmevichientong, Shenghuo Zhu & David Selinger Presented by: Vinita Shinde Feb 18 th, 2010.
Using Structure Indices for Efficient Approximation of Network Properties Matthew J. Rattigan, Marc Maier, and David Jensen University of Massachusetts.
Games with Chance Other Search Algorithms CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 3 Adapted from slides of Yoonsuck Choe.
Game Playing CSC361 AI CSC361: Game Playing.
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
Spring 2010CS 2251 Graphs Chapter 10. Spring 2010CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
Using Search in Problem Solving
Route Planning Vehicle navigation systems, Dijkstra’s algorithm, bidirectional search, transit-node routing.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Abstract Shortest distance query is a fundamental operation in large-scale networks. Many existing methods in the literature take a landmark embedding.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Dijkstra’s Algorithm and Heuristic Graph Search David Johnson.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Lab 3 How’d it go?.
Graphs II Robin Burke GAM 376. Admin Skip the Lua topic.
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Multiscale Moment-Based Painterly Rendering Diego Nehab and Luiz Velho
Representing and Using Graphs
Stylization and Abstraction of Photographs Doug Decarlo and Anthony Santella.
Heuristic Optimization Methods Greedy algorithms, Approximation algorithms, and GRASP.
WORLD NAVIGATION Don’t Fall Asleep Through These Topics  Tile Graphs  Points of Visibility  NavMesh  Path Smoothing  Hierarchical Pathfinding.
Lecture 3: Uninformed Search
Stipple Placement using Distance in a Weighted Graph David Mould University of Saskatchewan.
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
CSCI 4310 Lecture 8: Path Planning. Book Buckland Ch. 8.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Learning to Detect Faces A Large-Scale Application of Machine Learning (This material is not in the text: for further information see the paper by P.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 13: Graphs Data Abstraction & Problem Solving with C++
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
The A* and applications to Games Sources: My own Joseph Siefers presentation 2008.
CSCE 552 Spring 2010 AI (III) By Jijun Tang. A* Pathfinding Directed search algorithm used for finding an optimal path through the game world Used knowledge.
CSCE 552 Fall 2012 AI By Jijun Tang. Homework 3 List of AI techniques in games you have played; Select one game and discuss how AI enhances its game play.
HEURISTIC Good enough is perfect
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
Image-Guided Fracture David Mould University of Saskatchewan.
Game Playing Why do AI researchers study game playing?
Simplified Representation of Vector Fields
Chapter 5.4 Artificial Intelligence: Pathfinding
Announcements Homework 1 Full assignment posted..
Modeling Dendritic Structures Using Path Planning
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search.
Games & Adversarial Search
Games & Adversarial Search
CO Games Development 1 Week 8 Depth-first search, Combinatorial Explosion, Heuristics, Hill-Climbing Gareth Bellaby.
Games & Adversarial Search
Games & Adversarial Search
Presentation transcript:

Creating and Navigating Virtual Worlds David Mould

Overview Creating scenery in virtual worlds Navigating through virtual worlds Helping game players to understand virtual worlds

[World of Warcraft, ]

[Oblivion, 2006]

Ontogenetic Modeling Ontogenetic modeling: approach appearance of model without regard for underlying process Seek lightweight means of mimicking appearance of dendritic objects Path planning: irregular curves paths from root never cross

Path Planning Problem Given a weighted graph, a start node S, and a destination D, find the path from S to D that has the lowest cost. a path is a sequence of edges. the cost of a path is the sum of all the edge weights along the path.

Path planned dendrites

Basic Idea Shortest paths in a weighted graph Automated process Offers user control: weights in graph influence path shape endpoint choice affects dendrite’s appearance generator shape, likewise

Implementation Dijkstra’s algorithm used to get costs from root to all other nodes in graph O(N) to cover graph O(n) for path from arbitrary endpoint to root endpoints placed by hand or procedurally

Fractal Dendrites Real objects often exhibit fractal (multiscale) detail Explicitly introduce hierarchical detail: Create low-frequency detail Add structure at higher frequency Repeat previous step

real DLAimitated DLA

[Xu and Mould 2007 – GRAPP 2007 Best Paper]

“Rocks” Multi-source path planning partitions space – can be used to produce irregular 3D objects

Constructive Path Planning Path planning for procedural structure Simple implementation Rich control handles Wide variety of phenomena Trees, rocks, coral, lightning

[Mould 2005]

Navigating Virtual Worlds Virtual worlds are full of obstacles and hazards, and getting from point A to point B is not trivial Both computer-controlled and player- controlled agents need automatic navigation Formal framework: least-cost path through a weighted graph

[Total Annihilation, 1997] [Heroes of Might and Magic V, 2007]

Weighted Graphs

3 1 - Weights represent difficulty - distance - time - hazard

Heuristic Search: A* If the heuristic is perfect, we always search exactly in the right direction, and only look at nodes on the path If the heuristic is admissible, the final path is guaranteed to be optimal

Bad heuristics If the heuristic is poor (doesn’t give much information about where to search) then A* does no better than breadth-first search It's very difficult to devise general heuristics In computer games, level designers try to invent maps which defeat simple heuristics

Giving up But, is there much need for optimal paths? People don’t usually use the optimal path, and they seem to get around fine A path can be “good enough” without being optimal [Aside: non-admissible heuristics can work OK, but can result in extremely high costs fixing the errors in tricky maps]

Hierarchical search

Hierarchical Search

Create a second graph which is an abstraction of the first (maybe repeat) Use the hierarchy to give the paths waypoints Use the hierarchy to give estimates Use the hierarchy to constrain the search HTAP’s pyramid

HTAP HTAP: Hierarchical Terrain Representation for Approximately Shortest Paths [Mould and Horsch 2004; Mould and Horsch 2005] Offline construction of hierarchy Online linear-time pathfinding Search space constrained by hierarchy

Creating the Hierarchy Choose “representatives” – nodes estimated to be on many paths Associate nodes with representatives Insight: according to path cost in original graph Place edges between representatives again, based on original-graph path cost New graph obtained; repeat if still too big

Using the Hierarchy Find representatives of endpoints in coarsest graph, and search for path there Next level down: find representatives of endpoints in current level (just a lookup) find path, searching only in regions whose representatives one level up were on the path Repeat until bottom level reached

Search space comparison

Results path cost computational cost (number of vertices opened) A* - quadratic HTAP - linear

Results computational cost (number of vertices opened) path cost

Path Quality path cost Ratio of cost of optimal path to HTAP path

Path quality -- random graph Ratio of cost of optimal path to HTAP path path cost

Hierarchical Path Planning

Navigating Virtual Worlds Summary: by preprocessing the original map, HTAP can perform online path planning in linear time Path quality is usually (>90%) very good (within 1.2 times optimal) Reduces the burden of AI in games, freeing processor to do more planning, physics, rendering, …

Information Management Virtual worlds tend to be immense, and game state tends to be extremely complex Information overload is a serious problem for game players and designers players: keeping track of what's going on designers: deciding what to present to the players, and how

Rich Embodiments Attach information to the agents inhabiting the gameworld e.g., health bars in MMORPGs or RTSs Adds to visual clutter Not particularly good aesthetics But, players can easily track large numbers of variables

Coherent Rich Embodiments Games also contain vast quantities of non- information-bearing detail appearance of units, scenery Idea: use existing information vectors (textures, shape) to convey game- meaningful information

Coherent Rich Embodiments Goal: convey information about agent state using thematically coherent elements size, shape of agent color, textures, transparency Ideally, mappings would be semantically meaningful (e.g. bullet holes = damage) Even abstract mappings can be learned!

Coherent Rich Embodiments Coherent: information presented naturally; no obvious extraneous elements Rich: many parameters presented (10-30) Novice players: appreciate the aesthetics Sophisticated players: interpret underlying information Natural continuum of player progress

Rich Worlds Holy grail: no extraneous detail, everything conveys game state/history destructible terrain, usable terrain features (Assassin's Creed) Black and White: world appearance changes depending on player good/evil choices Procedural, game-relevant music (integrated music and sound effects?)

Summary Populating virtual worlds with natural scenery Automatically moving around in virtual worlds Integrating appearance of gameworld objects with game-meaningful information

Acknowledgements Thanks to my students and collaborators who contributed to this work: Shane Dielschneider, Carl Gutwin, Michael C. Horsch, Hua Li, Jeremy Long, Tomas Pawliuk, Ling Xu This work was funded by NSERC and by the University of Saskatchewan

Thank you! Questions?