72
CSCE 552 Spring 2010 AI II By Jijun Tang

CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th In class Each group 12 minutes What to show: Detailed designs

Embed Size (px)

Citation preview

Page 1: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

CSCE 552 Spring 2010

AI II

By Jijun Tang

Page 2: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Announcements

Second presentation: April 5th

In class Each group 12 minutes

What to show: Detailed designs of layers/modules/classes Progress report with demo 3D/2D Models, graphics, etc Schedules and milestones Problems and planned changes

Page 3: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

FK & IK

Most animation is “forward kinematics” Motion moves down skeletal hierarchy

But there are feedback mechanisms Eyes track a fixed object while body moves Foot stays still on ground while walking Hand picks up cup from table

This is “inverse kinematics” Motion moves back up skeletal hierarchy

Page 4: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Single Bone IK

Orient a bone in given direction Eyeballs Cameras

Find desired aim vector Find current aim vector Find rotation from one to the other

Cross-product gives axis Dot-product gives angle

Transform object by that rotation

Page 5: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Cyclic Coordinate Descent

Simple type of multi-bone IK Iterative: Can be slow May not find best solution: May not

find any solution in complex cases But it is simple and versatile: No

precalculation or preprocessing needed

Page 6: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Two Bone IK Example

Allowedelbowposition

Shoulder

Wrist

Disallowedelbowposition

Page 7: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Goals of anAI Game Programmer

Different than academic or defense industry

1. AI must be intelligent, yet purposely flawed2. AI must have no unintended weaknesses3. AI must perform within the constraints4. AI must be configurable by game designers

or players5. AI must not keep the game from shipping

Page 8: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Game Agents

May act as an Opponent Ally Neutral character

Continually loops through the

Sense-Think-Act cycle Optional learning or remembering step

Page 9: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Sensing:Human Vision Model for Agents

Get a list of all objects or agents; for each:1. Is it within the viewing distance of the agent?

How far can the agent see? What does the code look like?

2. Is it within the viewing angle of the agent? What is the agent’s viewing angle? What does the code look like?

3. Is it unobscured by the environment? Most expensive test, so it is purposely last What does the code look like?

Page 10: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Sensing:Human Hearing Model

Human can hear sounds Human can recognize sounds and

knows what emits each sound Human can sense volume and indicates

distance of sound Human can sense pitch and location

Sounds muffled through walls have more bass

Where sound is coming from

Page 11: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Sensing:Communication

Agents might talk amongst themselves! Guards might alert other guards Agents witness player location and spread

the word Model sensed knowledge through

communication Event-driven when agents within vicinity of

each other

Page 12: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Sensing:Reaction Times

Agents shouldn’t see, hear, communicate instantaneously

Players notice! Build in artificial reaction times

Vision: ¼ to ½ second Hearing: ¼ to ½ second Communication: > 2 seconds

Page 13: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Sense-Think-Act Cycle: Thinking

Sensed information gathered Must process sensed information Two primary methods

Process using pre-coded expert knowledge

Use search to find an optimal solution

Page 14: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Finite-state machine (FSM)

Page 15: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Production systems

Consists primarily of a set of rules about behavior

Productions consist of two parts: a sensory precondition (or "IF" statement) and an action (or "THEN")

A production system also contains a database about current state and knowledge, as well as a rule interpreter

Page 16: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Decision trees

Page 17: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Logical inference

Process of derive a conclusion solely based on what one already knows

Prolog (programming in logic)

mortal(X) :- man(X). man(socrates).

?- mortal(socrates). Yes

Page 18: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Depth and breadth-first

Page 19: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Sense-Think-Act Cycle:Acting

Sensing and thinking steps invisible to player

Acting is how player witnesses intelligence Numerous agent actions, for example:

Change locations Pick up object Play animation Play sound effect Converse with player Fire weapon

Page 20: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Extra Step in Cycle:Learning and Remembering

Optional 4th step Not necessary in many games

Agents don’t live long enough Game design might not desire it

Page 21: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Making Agents Stupid

Sometimes very easy to trounce player Make agents faster, stronger, more accurate Challenging but sense of cheating may

frustrate the player Sometimes necessary to dumb down

agents, for example: Make shooting less accurate Make longer reaction times Engage player only one at a time Change locations to make self more vulnerable

Page 22: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Agent Cheating

Players don’t like agent cheating When agent given unfair advantage in speed, strength, or

knowledge People notices it

Sometimes necessary For highest difficultly levels For CPU computation reasons For development time reasons

Don’t let the player catch you cheating! Consider letting the player know upfront No one wants to fight a stupid enemy, trade-off

Page 23: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Common Game AI Techniques

A* Pathfinding Command Hierarchy Dead Reckoning Emergent Behavior Flocking Formations Influence Mapping …

Page 24: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

A* Pathfinding

Directed search algorithm used for finding an optimal path through the game world

Used knowledge about the destination to direct the search

A* is regarded as the best Guaranteed to find a path if one exists Will find the optimal path Very efficient and fast

Page 25: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Command Hierarchy

Strategy for dealing with decisions at different levels From the general down to the foot soldier

Modeled after military hierarchies General directs high-level strategy Foot soldier concentrates on combat

Page 26: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

US Military Chain of Command

Page 27: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Dead Reckoning

Method for predicting object’s future position based on current position, velocity and acceleration

Works well since movement is generally close to a straight line over short time periods

Can also give guidance to how far object could have moved

Example: shooting game to estimate the leading distance

Page 28: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Emergent Behavior

Behavior that wasn’t explicitly programmed

Emerges from the interaction of simpler behaviors or rules Rules: seek food, avoid walls Can result in unanticipated individual or

group behavior

Page 29: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Flocking

Example of emergent behavior Simulates flocking birds, schooling fish Developed by Craig Reynolds: 1987

SIGGRAPH paper Three classic rules

1. Separation – avoid local flockmates2. Alignment – steer toward average

heading3. Cohesion – steer toward average position

Page 30: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Formations

Group movement technique Mimics military formations Similar to flocking, but actually distinct

Each unit guided toward formation position Flocking doesn’t dictate goal positions Need a leader

Page 31: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Flocking/Formation

Page 32: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Influence Mapping

Method for viewing/abstracting distribution of power within game world

Typically 2D grid superimposed on land Unit influence is summed into each grid cell

Unit influences neighboring cells with falloff Facilitates decisions

Can identify the “front” of the battle Can identify unguarded areas Plan attacks Sim-city: influence of police around the city

Page 33: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Mapping Example

Page 34: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Level-of-Detail AI

Optimization technique like graphical LOD Only perform AI computations if player will

notice For example

Only compute detailed paths for visible agents Off-screen agents don’t think as often

Page 35: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Manager Task Assignment

Manager organizes cooperation between agents Manager may be invisible in game Avoids complicated negotiation and

communication between agents Manager identifies important tasks and

assigns them to agents For example, a coach in an AI football team

Page 36: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Obstacle Avoidance

Paths generated from pathfinding algorithm consider only static terrain, not moving obstacles

Given a path, agent must still avoid moving obstacles Requires trajectory prediction Requires various steering behaviors

Page 37: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Scripting

Scripting specifies game data or logic outside of the game’s source language

Scripting influence spectrumLevel 0: Everything hardcoded

Level 1: Data in files specify stats/locations

Level 2: Scripted cut-scenes (non-interactive)

Level 3: Lightweight logic, like trigger system

Level 4: Heavy logic in scripts

Level 5: Everything coded in scripts

Page 38: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Scripting Pros and Cons

Pros Scripts changed without recompiling game Designers empowered Players can tinker with scripts

Cons More difficult to debug Nonprogrammers required to program Time commitment for tools

Page 39: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

State Machine

Most common game AI software pattern Set of states and transitions, with only one

state active at a time Easy to program, debug, understand

Page 40: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Stack-Based State Machine

Also referred to as push-down automata

Remembers past states Allows for diversions, later returning to

previous behaviors

Page 41: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Example

Player escapes in combat, pop Combat off, goes to search; if not find the player, pop Search off, goes to patrol, …

Page 42: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Subsumption Architecture

Popularized by the work of Rodney Brooks Separates behaviors into concurrently running

finite-state machines Well suited for character-based games where

moving and sensing co-exist Lower layers

Rudimentary behaviors (like obstacle avoidance) Higher layers

Goal determination and goal seeking Lower layers have priority

System stays robust

Page 43: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Example

Page 44: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Terrain Analysis

Analyzes world terrain to identify strategic locations

Identify Resources Choke points Ambush points Sniper points Cover points

Page 45: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Terrain:Height Field Landscape

T o p - D o wn Vie w

P e r sp e c t iv e Vie w

T o p - D o wn Vie w ( h e igh t s a dde d)

P e r sp e c t iv e Vie w ( h e igh t s a dde d)

Page 46: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Locate Triangle on Height Field

Q

R

Q

Q z > Q x

Q z < = Q x

z

x

R z > 1 - R x

R z < = 1 - R x

R

Essentially a 2D problem

Page 47: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Locate Point on Triangle

Plane equation: A, B, C are the x, y, z components of

the triangle plane’s normal vector Where

with one of the triangles

vertices being Giving:

0 DCzByAx

0PND

0P

00 PNNNN zyx zyx

Page 48: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Locate Point on Triangle-cont’d

The normal can be constructed by taking the cross product of two sides:

Solve for y and insert the x and z components of Q, giving the final equation for point within triangle:

0201 PPPPN

y

zzxxy N

PNQNQNQ 0

Page 49: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Treating Nonuniform Polygon Mesh

Hard to detect the triangle where the point lies in

Using Triangulated Irregular Networks (TINs)

Barycentric Coordinates

Page 50: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Barycentric Coordinates

Even with complex data structure, we still have to test each triangle (in a sub region) to see if the point lies in it

Using Barycentric Coordinates to do the test

P 1

P 2

P 0

Q

P o in t = w 0P 0 + w 1P 1 + w 2P 2

Q = ( 0 )P 0 + ( 0 .5 )P 1 + ( 0 .5 )P 2

R = ( 0 .3 3 )P 0 + ( 0 .3 3 )P 1 + ( 0 .3 3 )P 2R

Page 51: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Locate Point on Triangle Using Barycentric Coordinates

Calculate barycentric coordinates for point Q in a triangle’s plane

If any of the weights (w0, w1, w2) are negative, then the point Q does not lie in the triangle

2

1

2121

212

22

212

22

12

1 1

VS

VS

VV

VV

VV V

V

VVw

w

022

011

0

PPV

PPV

PQS

210 1 www

Page 52: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Trigger System

Highly specialized scripting system Uses if/then rules

If condition, then response Simple for designers/players to

understand and create More robust than general scripting Tool development simpler than general

scripting

Page 53: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Promising AI Techniques

Show potential for future Generally not used for games

May not be well known May be hard to understand May have limited use May require too much development time May require too many resources

Page 54: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Bayesian Networks

Performs humanlike reasoning when faced with uncertainty

Potential for modeling what an AI should know about the player Alternative to cheating

RTS Example AI can infer existence or nonexistence of

player build units

Page 55: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Example

Page 56: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Blackboard Architecture

Complex problem is posted on a shared communication space Agents propose solutions Solutions scored and selected Continues until problem is solved

Alternatively, use concept to facilitate communication and cooperation

Page 57: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Decision Tree Learning

Constructs a decision tree based on observed measurements from game world

Best known game use: Black & White Creature would learn and form

“opinions” Learned what to eat in the world based

on feedback from the player and world

Page 58: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Filtered Randomness

Filters randomness so that it appears random to players over short term

Removes undesirable events Like coin coming up heads 8 times in a row

Statistical randomness is largely preserved without gross peculiarities

Example: In an FPS, opponents should randomly spawn

from different locations (and never spawn from the same location more than 2 times in a row).

Page 59: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Genetic Algorithms

Technique for search and optimization that uses evolutionary principles

Good at finding a solution in complex or poorly understood search spaces

Typically done offline before game ships Example:

Game may have many settings for the AI, but interaction between settings makes it hard to find an optimal combination

Page 60: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Flowchat

Page 61: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

N-Gram Statistical Prediction

Technique to predict next value in a sequence

In the sequence 18181810181, it would predict 8 as being the next value

Example In street fighting game, player just did

Low Kick followed by Low Punch Predict their next move and expect it

Page 62: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Neural Networks

Complex non-linear functions that relate one or more inputs to an output

Must be trained with numerous examples Training is computationally expensive making

them unsuited for in-game learning Training can take place before game ships

Once fixed, extremely cheap to compute

Page 63: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Example

Page 64: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Planning

Planning is a search to find a series of actions that change the current world state into a desired world state

Increasingly desirable as game worlds become more rich and complex

Requires Good planning algorithm Good world representation Appropriate set of actions

Page 65: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Player Modeling

Build a profile of the player’s behavior Continuously refine during gameplay Accumulate statistics and events

Player model then used to adapt the AI Make the game easier: player is not good at

handling some weapons, then avoid Make the game harder: player is not good at

handling some weapons, exploit this weakness

Page 66: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Production (Expert) Systems

Formal rule-based system Database of rules Database of facts Inference engine to decide which rules trigger –

resolves conflicts between rules Example

Soar used experiment with Quake 2 bots Upwards of 800 rules for competent opponent

Page 67: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Reinforcement Learning

Machine learning technique Discovers solutions through trial and

error Must reward and punish at appropriate

times Can solve difficult or complex problems

like physical control problems Useful when AI’s effects are uncertain

or delayed

Page 68: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Reputation System

Models player’s reputation within the game world

Agents learn new facts by watching player or from gossip from other agents

Based on what an agent knows Might be friendly toward player Might be hostile toward player

Affords new gameplay opportunities “Play nice OR make sure there are no

witnesses”

Page 69: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Smart Terrain

Put intelligence into inanimate objects Agent asks object how to use it: how to

open the door, how to set clock, etc Agents can use objects for which they

weren’t originally programmed for Allows for expansion packs or user created

objects, like in The Sims Enlightened by Affordance Theory

Objects by their very design afford a very specific type of interaction

Page 70: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Speech Recognition

Players can speak into microphone to control some aspect of gameplay

Limited recognition means only simple commands possible

Problems with different accents, different genders, different ages (child vs adult)

Page 71: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Text-to-Speech

Turns ordinary text into synthesized speech Cheaper than hiring voice actors Quality of speech is still a problem

Not particularly natural sounding Intonation problems Algorithms not good at “voice acting”: the mouth

needs to be animated based on the text Large disc capacities make recording human

voices not that big a problem No need to resort to worse sounding solution

Page 72: CSCE 552 Spring 2010 AI II By Jijun Tang. Announcements Second presentation: April 5 th  In class  Each group 12 minutes What to show:  Detailed designs

Weakness Modification Learning

General strategy to keep the AI from losing to the player in the same way every time

Two main steps1. Record a key gameplay state that precedes a

failure

2. Recognize that state in the future and change something about the AI behavior AI might not win more often or act more intelligently,

but won’t lose in the same way every time Keeps “history from repeating itself”