Artificial Intelligence CSE 191A: Seminar on Video Game Programming Lecture 7: Artificial Intelligence UCSD, Spring, 2003 Instructor: Steve Rotenberg.

Slides:



Advertisements
Similar presentations
Exploring Machine Learning in Computer Games Presented by: Matthew Hayden Thurs, 25 th March 2010.
Advertisements

Solving problems by searching
Heuristic Search techniques
AI Pathfinding Representing the Search Space
Using Parallel Genetic Algorithm in a Predictive Job Scheduling
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Motion Planning for Point Robots CS 659 Kris Hauser.
Algorithms + L. Grewe.
Game AI Kevin Dill Senior AI Engineer Blue Fang Games
Becerra-Fernandez, et al. -- Knowledge Management 1/e -- © 2004 Prentice Hall Chapter 7 Technologies to Manage Knowledge: Artificial Intelligence.
Flocking Behaviors Presented by Jyh-Ming Lien. Flocking System What is flocking system? – A system that simulates behaviors of accumulative objects (e.g.
Swarm algorithms COMP308. Swarming – The Definition aggregation of similar animals, generally cruising in the same direction Termites swarm to build colonies.
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Artificial Intelligence in Game Design Introduction to Learning.
DESIGN OF A GENERIC PATH PATH PLANNING SYSTEM AILAB Path Planning Workgroup.
Soul Envoy Final Year Project 22nd April 2006 By Zhu Jinhao.
Character Animation CSE 191A: Seminar on Video Game Programming Lecture 5: Character Animation UCSD, Spring, 2003 Instructor: Steve Rotenberg.
And Just Games etc.. EVOLUTION OF COMPUTER GAMES PongOdyssey Beginning of the use of microprocessors ATARI VCS system bit.
Behavior- Based Approaches Behavior- Based Approaches.
Chapter 3: Methods of Inference Expert Systems: Principles and Programming, Fourth Edition.
Chapter 5.4 Artificial Intelligence: Pathfinding.
Neural Networks Slides by Megan Vasta. Neural Networks Biological approach to AI Developed in 1943 Comprised of one or more layers of neurons Several.
SWARM INTELLIGENCE IN DATA MINING Written by Crina Grosan, Ajith Abraham & Monica Chis Presented by Megan Rose Bryant.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 8: Bridging Slides used with permissions.
Ioannis Karamouzas, Roland Geraerts, Mark Overmars Indicative Routes for Path Planning and Crowd Simulation.
Succeeding with Technology Information, Decision Support… Decision Making and Problem Solving Management Information Systems Decision Support Systems Group.
Chapter 5.4 Artificial Intelligence: Pathfinding.
1 CO Games Development 1 Week 1 Introduction to AI Gareth Bellaby.
Artificial Intelligence in Game Design Problems and Goals.
1 Game AI Path Finding. A Common Situation of Game AI A Common Situation of Game AI Path Planning Path Planning –From a start position to a destination.
Swarm Computing Applications in Software Engineering By Chaitanya.
1 CO Games Development 1 Week 6 Introduction To Pathfinding + Crash and Turn + Breadth-first Search Gareth Bellaby.
Neural Networks AI – Week 23 Sub-symbolic AI Multi-Layer Neural Networks Lee McCluskey, room 3/10
CS 484 – Artificial Intelligence1 Announcements Lab 4 due today, November 8 Homework 8 due Tuesday, November 13 ½ to 1 page description of final project.
Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under Supervision of: Dr. Ibrahim Fathy.
StarCraft Learning Algorithms By Logan Yarnell, Steven Raines, and Dean Antel.
Motion Planning in Games Mark Overmars Utrecht University.
I Robot.
Adrian Treuille, Seth Cooper, Zoran Popović 2006 Walter Kerrebijn
Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 – AI & Game Programming.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Neural Networks and Machine Learning Applications CSC 563 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Crowds (and research in animation and games) CSE 3541 Matt Boggus.
Artificial Intelligence and Searching CPSC 315 – Programming Studio Spring 2013 Project 2, Lecture 1 Adapted from slides of Yoonsuck Choe.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Evolving Reactive NPCs for the Real-Time Simulation Game.
Technical Seminar Presentation Presented By:- Prasanna Kumar Misra(EI ) Under the guidance of Ms. Suchilipi Nepak Presented By Prasanna.
Technology Mapping. 2 Technology mapping is the phase of logic synthesis when gates are selected from a technology library to implement the circuit. Technology.
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Artificial Intelligence: Research and Collaborative Possibilities a presentation by: Dr. Ernest L. McDuffie, Assistant Professor Department of Computer.
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.
Honors Track: Competitive Programming & Problem Solving Seminar Topics Kevin Verbeek.
Network Management Lecture 13. MACHINE LEARNING TECHNIQUES 2 Dr. Atiq Ahmed Université de Balouchistan.
The Game Development Process: Artificial Intelligence.
Crowds (and research in computer animation and games)
Chapter 5.4 Artificial Intelligence: Pathfinding
CS b659: Intelligent Robotics
Done Done Course Overview What is AI? What are the Major Challenges?
Movement in a full and dynamic environment using a limited influence map Paulo Lafeta Ferreira Artificial Intelligence for Games – CS 580 Professor: Steve.
CIS 488/588 Bruce R. Maxim UM-Dearborn
Crowds (and research in computer animation and games)
CSE 4705 Artificial Intelligence
CIS 488/588 Bruce R. Maxim UM-Dearborn
Interaction with artificial intelligence in games
Knowledge Representation
CSCE 552 Spring 2009 AI (III) By Jijun Tang.
CS 416 Artificial Intelligence
Games Development Game Architecture: Entities
Presentation transcript:

Artificial Intelligence CSE 191A: Seminar on Video Game Programming Lecture 7: Artificial Intelligence UCSD, Spring, 2003 Instructor: Steve Rotenberg

Video Game AI Goals of game AI Be ‘fun’ Run fast Use minimal memory Not quite the same as ‘computer science AI’ Predictability vs. intelligence Adaptive competitiveness AI Types Opponents (bad guys) Assistants (good guys) Ambient (neutral)

Navigation

World Representation Linear (race track…) Web network Grid 2D boundary 3D mesh

World Representation

A* Algorithm (A-Star) A* is a general purpose search algorithm that can be used to find the shortest path from point A to B Based on a graph (map) of nodes connected by links Can also handle arbitrary ‘cost’ functions to determine best path Nodes are assigned three main attributes: f, g, & h (fitness, goal, and heuristic values). g: cost to get to this node from the start node h: heuristic guess of the cost from this node to the goal f: the sum of g & h representing the best guess for the cost of the path going through this node. The lower the f, the better we think the path is

A* Algorithm 1. Let P=the starting point. 2. Assign f, g, and h values to P. 3. Add P to the Open list. At this point, P is the only node on the Open list. 4. Let B=the best node from the Open list (the best node has the lowest f-value). a. If B is the goal node, the quit- a path has been found. b. If the Open list is empty, then quit- a path cannot be found. 5. Let C=a valid node connected to B. a. Assign f, g, and h values to C. b. Check whether C is on the Open or Closed list. i. If so, check whether the new path is more efficient (lower f-value). 1. If so, update the path. ii. Else, add C to the Open list. c. Repeat step 5 for all valid children of B. 6. Repeat from step 4.

Unbiased A*

A* Heuristics

Tactical A*

A* Optimization In games with lots of entities navigating around in a complex, dynamic environment, A* path planning can become the dominant computational cost Intelligent biasing Time slicing Straight paths Hierarchical A* Waypoints

AI Optimization Strategies From Steve Rabin in “Game Programming Gems 2”: 1.Use event driven behavior rather than polling 2.Reduce redundant calculations 3.Centralize cooperation with managers 4.Run the AI less often 5.Distribute the processing over several frames 6.Employ level-of-detail AI 7.Solve only part of the problem 8.Do the hard work offline 9.Use emergent behavior to avoid scripting 10.Amortize query costs with continuous bookkeeping 11.Rethink the problem

Environment Awareness Potential Fields Obstacle avoidance Voronoi Diagrams

Flocking Every entity can see only the other entities nearby and within its field of view Entities try to match average position & velocity of other entities in view Other behaviors can be added (collision avoidance, follow the leader…) “Flocks, Herds, and Schools: A Distributed Behavior Model”, Craig Reynolds, SIGGRAPH, 1987

Misc Navigation ‘Popcorn trails’ Following Wander Wall crawling B-line

Behavior

Control Usually, AI’s are given a similar interface to controlling a vehicle/character as the player has: class Car { void SetGas(float g); void SetSteering(float s); void SetBrake(float b); void SetGear(int g); };

Rule Based Behavior Line of sight Hearing Reaction to events

Decision Trees A decision tree is a complex tree of if-else conditions A decision is made by starting at the root and selecting each child based on a condition. A leaf node represents a final decision DT’s can be constructed automatically based on input data (ID3 & C4.5 algorithms)

Scripting

State Machines Behaviors are represented by states and can transition to other states based on rules Exactly one state is active at any time Even simple behaviors may require a series of distinct steps State machines can be designed by game designers, but could also be procedurally constructed in certain situations (i.e., planning)

Message Systems

Subsumption In the subsumption approach, an entity has several distinct behaviors it could do, but it is usually restricted to one at a time. Every behavior first generates an ‘importance’ value based on its current situation. After all behaviors are tested, the one with the highest importance is allowed to apply its control to the entity. Example behaviors: Wander Follow Avoid collision Avoid enemy Find food Sleep

Subsumption class Entity { void SetGoalVelocity(Vector3 v);// or some more elaborate control scheme }; class Behavior { Behavior(Entity &e); virtual float ComputeImportance(); virtual void ApplyControl(); }; class SubsumptionBrain { SubsumptionBrain(Entity &e); void AddBehavior(Behavior *b); void RunAI(); };

Animation It is worth noting that a lot of intelligent behavior can be conveyed through canned animation or simple procedural animations There are some interesting similarities between animation & AI systems

Additional Topics Genetic Algorithms Reasoning & belief networks Strategic planning Neural networks

Neural Networks

New Possibilities Speech recognition Speech synthesis Computer vision Facial recognition Expression (emotion) recognition Posture, motion recognition

Conclusion

Preview of Next Week Visual effects Lighting Particle effects Vertex & pixel shaders

Reading Assignment “Real Time Rendering”, Chapter 5 & 6

AI References “AI Game Programming Wisdom”, Rabin “Game Programming Gems I, II, & III”, DeLoura “Artificial Intelligence: A Modern Approach” “Computational Principles of Mobile Robotics”, Dudek, Jenkin