cs 480: game ai - computer science 480: game ai introduction to game ai 4/3/2012 santiago ontañón...

37
CS 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón [email protected] https://www.cs.drexel.edu/~santi/teaching/2012/CS480/intro.html

Upload: dinhtuyen

Post on 11-Jul-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

CS 480: GAME AI INTRODUCTION TO GAME AI

4/3/2012 Santiago Ontañón [email protected] https://www.cs.drexel.edu/~santi/teaching/2012/CS480/intro.html

Page 2: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

CS 480 • Focus: artificial intelligence techniques for computer games.

• Goal: cover basic and advanced AI techniques used in commercial games:

•  Platformers •  Shooters •  Racing games •  Board games •  Strategy games •  RPG games

Page 3: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Outline • Structure of the course •  Intro to Game AI • Examples of Game AI • Course Scope • Projects

Page 4: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Outline • Structure of the course •  Intro to Game AI • Examples of Game AI • Course Scope • Projects

Page 5: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Structure of the Course •  4 individual projects

•  For each project, I will give you a small game engine (C++ / Java). •  You will have to implement an AI technique in it •  You turn in the code and demo your project in class

• Paper presentation •  Each student will read one paper and give a short presentation in

class (10 – 15 minutes)

• Exams: •  Midterm •  Final

Page 6: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Grading • Projects: 10% each project (total 40%) • Midterm: 20% •  Final: 20% • Paper presentation: 10% • Attendance and class participation: 10%

Page 7: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Miscelania • Prerequisites:

•  CS 380 (Artificial Intelligence) •  C++ / Java programming

• Book: •  “Artificial Intelligence for Games” (Millington & Funge)

•  If you have doubts about any AI technique: •  “Artificial Intelligence: A Modern Approach” (Russell & Norvig) •  “Machine Learning” (Mitchell)

Page 8: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Outline • Structure of the course •  Intro to Game AI • Examples of Game AI • Course Scope • Projects

Page 9: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

What is Game AI? • Artificial Intelligence for Computer Games • Different from traditional AI

Traditional AI: Optimality, efficiency Game AI: Fun, artificial “stupidity”

Page 10: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

What is Game AI? •  Intersection of games and AI:

•  Two (three) main communities working on it: •  Academics:

•  Artificial Intelligence community: how can games help us have better AI (AI centric)

•  Computer Game scholars: how can AI help us have better/more interesting/new forms of games?(Games centric)

•  Game industry: •  Their goal is to make games that sell more units (games centric)

Games AI

Page 11: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Outline • Structure of the course •  Intro to Game AI • Examples of Game AI • Course Scope • Projects

Page 12: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Examples of Game AI

Pac-Man (1980) First ever game to feature AI

AI: finite state machine

Page 13: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Examples of Game AI

“Pac-Man” (1980) First ever game to feature AI

AI: finite state machine

Page 14: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Examples of Game AI

“Double Dragon” AI: Finite State Machines

Page 15: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Examples of Game AI Chess AI needs to provide a collection of difficulty levels. Only one: hardest (to be played only against grand-masters), falls into the realm of traditional AI.

Page 16: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Examples of Game AI “The Secret of Monkey Island” “And Then There Were None” Dialogues, storytelling

Page 17: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Examples of Game AI

“Left 4 Dead 2” AI Director adjusts game pace to ensure desired dramatic effects

Page 18: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Examples of Game AI

“Black & White” Uses machine learning to simulate a learning creature

Page 19: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Examples of Game AI “Starcraft II” Strategy, planning, path-finding, economics, etc.

Page 20: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Types of Game AI •  Inside the game:

•  Character control •  Director (drama management)

• During game development: •  Help in behavior/content design

• After game deployment: •  Analysis of game data

Page 21: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Types of Game AI •  Inside the game:

•  Character control •  Director (drama management)

• During game development: •  Help in behavior/content design

• After game deployment: •  Analysis of game data

Covered in this course

Page 22: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Outline • Structure of the course •  Intro to Game AI • Examples of Game AI • Course Scope • Projects

Page 23: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Course Scope • Movement and Steering • Pathfinding • Decision Making •  Tactical and Strategic Reasoning • Board Games • Machine Learning

Page 24: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Course Scope • Movement and Steering

•  Platform games •  Racing games

• Pathfinding • Decision Making •  Tactical and Strategic Reasoning • Board Games • Machine Learning

Page 25: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Course Scope • Movement and Steering • Pathfinding

•  Dijkstra •  A* •  Recent A* variants for computer games

• Decision Making •  Tactical and Strategic Reasoning • Board Games • Machine Learning

Page 26: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Course Scope • Movement and Steering • Pathfinding • Decision Making

•  Decision trees •  Finite State Machines •  Behavior Trees

•  Tactical and Strategic Reasoning • Board Games • Machine Learning

Page 27: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Course Scope • Movement and Steering • Pathfinding • Decision Making •  Tactical and Strategic Reasoning

•  Rule-based Systems •  Waypoints and Influence Maps

• Board Games • Machine Learning

Page 28: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Course Scope • Movement and Steering • Pathfinding • Decision Making •  Tactical and Strategic Reasoning • Board Games

•  Minimax •  Montecarlo Tree Search

• Machine Learning

Page 29: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Course Scope • Movement and Steering • Pathfinding • Decision Making •  Tactical and Strategic Reasoning • Board Games • Machine Learning

•  Supervised learning in games •  Reinforcement learning in games

Page 30: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Outline • Structure of the course •  Intro to Game AI • Examples of Game AI • Course Scope • Projects

Page 31: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Projects •  Individual projects •  4 projects:

•  Steering behavior (2 choices, pick one) •  Pathfinding •  Scripting •  Strategic decision making

• You will be provided with a game engine • Goal of each project: implement a specific Game AI

algorithm in the game engine • Deliverables:

•  Source code •  Present your project in class

Page 32: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Project 1: Steering (Java) •  Implement steering behaviors (explained week 2) • Game Engine:

•  PTSP (Java)

• Competition: •  http://www.ptsp-game.net/index.php •  (if you are interested)

Page 33: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Project 1: Steering (C++) •  Implement steering behaviors (explained week 2) • Game Engine:

•  F-1 Spirit (C++)

•  More realistic car handling than PTSP

•  No competition

Page 34: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Project 2: Pathfinding •  Implement A* in a RTS Game • Game Engine: S3 (Java)

Page 35: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Project 3: Scripting •  Implement a Finite State Machine or Behavior Tree

• Game Engine: •  Mario (Java, with bindings

for other languages)

•  Competition: •  http://www.marioai.org/ •  (if you are interested)

Page 36: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

Project 4: Strategic Decision Making •  Implement a rule-based AI to play an RTS Game • Game Engine: S3 (Java)

Page 37: CS 480: GAME AI - Computer Science 480: GAME AI INTRODUCTION TO GAME AI 4/3/2012 Santiago Ontañón santi@cs.drexel.edu ... • C++ / Java programming

If you like Game AI… •  Take CS680 (Continuation of this course)

•  Advanced AI techniques: •  recent theoretical developments with new applications to commercial

games. •  Topics revised every year •  This year’s topics (last quarter):

•  Real-Time Strategy Games •  Experience Management •  Procedural Content Generation

• Participate in the Game AI competitions! •  Come talk to me if you are interested

•  Independent Study in Game AI