Artificial Intelligence Cameron Jett, William Kentris, Arthur Mo, - - PowerPoint PPT Presentation

artificial intelligence
SMART_READER_LITE
LIVE PREVIEW

Artificial Intelligence Cameron Jett, William Kentris, Arthur Mo, - - PowerPoint PPT Presentation

Artificial Intelligence Cameron Jett, William Kentris, Arthur Mo, Juan Roman AI Outline Handicap for AI Machine Learning Monte Carlo Methods Group Intelligence Incorporating stupidity into game AI overview Why make our


slide-1
SLIDE 1

Artificial Intelligence

Cameron Jett, William Kentris, Arthur Mo, Juan Roman

slide-2
SLIDE 2

AI Outline

  • Handicap for AI
  • Machine Learning
  • Monte Carlo Methods
  • Group Intelligence
slide-3
SLIDE 3

Incorporating stupidity into game AI overview

  • Why make our intelligence less intelligent?
  • Examples of unbeatable AI in games.
  • How do we make our AI less intelligent?
  • Problems in weakening AI.
  • Conclusion.
slide-4
SLIDE 4

Why do we need to make our game AI less intelligent?

  • Perfect AI can be impossible to defeat.
  • Make the game balanced for many different

kinds of people.

  • Make the game fun.
  • Games can be frustrating when they're too

difficult.

  • We want the player to win a game without

feeling like the victory was handed to them.

slide-5
SLIDE 5

Unbeatable AI: Chess

  • A chess game that never makes mistakes.
slide-6
SLIDE 6

Unbeatable AI: Pool

  • A game of pool where the AI never misses a

shot.

slide-7
SLIDE 7

Unbeatable AI: First-Person Shooter

  • Enemies in a first-person shooter with

perfect aim from any distance.

slide-8
SLIDE 8

How do we make our AI less intelligent?

  • Limit the number of computations an AI is

allowed to perform.

○ If a chess program performs a billion calculations before deciding on a move make it choose a move in half that many.

  • Problems

○ This approach decreases the realism of the AI player, making incredibly stupid mistakes that no human player would make.

slide-9
SLIDE 9

How do we make our AI less intelligent?

  • Changing an AI's attributes.

○ Lowering accuracy, movement speed, cone of vision, or amount of damage it can deal.

  • Problems

○ This approach is better but not necessarily the best way to limit the games intelligence. ○ This can lead to random occurrences that have unintentional consequences, if the computer gets lucky it can seem like it's unfair or cheating.

slide-10
SLIDE 10

How do we make our AI less intelligent?

  • Have the AI make intentional mistakes

○ The AI must make mistakes that look natural, but result in it losing the game. ○ Deliberately make mistakes that the player can take advantage of, and then continue trying to win.

  • Problems

○ This approach is more complicated than the last two attempts, but leads to a more realistic gameplay.

slide-11
SLIDE 11

Conclusion

  • A perfect opponent isn't fun, however an

easy to defeat opponent is boring.

  • We need a game AI that allows the player

to win without feeling like the victory was given to them.

  • We need an AI that makes the "right" kind
  • f mistakes, those that an actual player

might make.

  • It's more difficult to write a "bad" game AI

than it is to write a good one.

slide-12
SLIDE 12

Machine Learning Overview

  • Define "Machine Learning"
  • Why should machines learn?
  • How do machines learn?
  • Methods
  • What does this mean for game

development?

slide-13
SLIDE 13

What is Machine Learning?

  • Machine Learning refers usually to AI
  • An agent that improves performance with

experience

  • Ability to discover relationships between

input and output

  • Learning configuration of mazes
slide-14
SLIDE 14

Why should machines learn?

  • Allow machine to operate with less human

interaction

  • Weather Prediction
  • Language Recognition
  • Spam Filtering
slide-15
SLIDE 15

How can machines learn?

  • A machine learns whenever it changes its

structure, program, or data

○ Changing input based on previous results ○ Classify input data ○ Updates to a database ○ Writing new code to run

slide-16
SLIDE 16

Supervised Learning

slide-17
SLIDE 17

Supervised Learning

slide-18
SLIDE 18

Reinforcement Learning

http://www.ise.pw.edu.pl/~cichosz/rl-java/ http://brain.cc.kogakuin.ac. jp/~kanamaru/NN/CPRL/

slide-19
SLIDE 19

In Games

  • Changing behavior of game based on player

interaction

  • Changing difficulty based on player progress

○ Assist less experienced players ○ Challenge more hardcore players

slide-20
SLIDE 20

Monte Carlo Overview

  • What are Monte Carlo Methods?
  • Monte Carlo approach to a game
  • Advantages
  • Disadvantages
  • Improvements
slide-21
SLIDE 21

Monte Carlo Methods

  • Repeated random

sampling

  • Coined by John Neumann,

Stanislaw Ulam, and Nicholas Metropolis

  • Used in physical and

mathematical system simulations.

  • http://en.wikipedia.
  • rg/wiki/File:Pi_30K.gif
slide-22
SLIDE 22

Monte Carlo approach to a game

  • 4 in a Row(Connect 4) example
  • Each turn run N random games.
  • Track only initial move.
  • Play rest of the game randomly.
  • Track how often each move produces a

victory.

  • Go with the best move.
  • http://beej.us/blog/data/monte-carlo-

method-game-ai/

slide-23
SLIDE 23

Advantages

  • Easy to program.
  • No high quality of domain knowledge

needed.

  • No cold starts.
  • Space complexity is constant.
slide-24
SLIDE 24

Disadvantages

  • Equal probability among choices.
  • Selection is strictly Exploitative.
slide-25
SLIDE 25

Improvements

  • MCTS(Monte Carlo Tree Search)
  • UCT(Upper Confidence bounds applied to

Trees)

slide-26
SLIDE 26

Bio-Inspired Algorithms

  • Nature has become inspiration for new

metaheuristic approaches

  • Bio-Inspired Algorithms mimic the efficiency
  • f biological systems
  • Bio-Inspired Algorithms generally consist of:

○ Evolutionary Algorithms ○ Swarm Intelligence ○ Bacterial Foraging Algorithms

slide-27
SLIDE 27

Swarm Intelligence

  • Collective behavior of decentralized, self-
  • rganized systems.
  • Comprised of simple agents, “boids”,

interacting with one another in an environment

slide-28
SLIDE 28

Why Swarm Intelligence?

  • Provides us with method to have boids

collaborate as a team

  • Improve quality of playing with/against AI
slide-29
SLIDE 29

Modeling Behaviors

  • Recent algorithms for Group AI are

typically modeled off of behaviors seen in nature.

  • Offer intuitive solutions to difficult

problems.

  • Some popular ones include: Ant Colony

Optimization, Firefly Algorithm, Krill Herd Algorithm, and others.

slide-30
SLIDE 30

Modeling Behaviors

  • Obviously, different algorithms are used

to accomplish different goals.

  • For example, in an RTS, must balance

utility of sending units to scout, forage for resources, and stay close enough to the group to stand decent chance of survival. Additionally, must organize offensive units to collaborate attacks on enemies.

slide-31
SLIDE 31

Ant Colony Optimization

  • Mimics the pheromone trail used by ants;

used to determine the most used path.

  • Boids model behavior of ants to follow the

most potent trail left by fellow boids.

slide-32
SLIDE 32

Firefly Algorithm

  • Mimics flashing behavior of fireflies; used

to subdivide into small groups.

  • Uses features of individual boids to attract

boids of a similar nature; results in ability to cluster into subgroups.

slide-33
SLIDE 33

Krill Herd Algorithm

  • Mimics the krill’s dependency on herd

density while attempting to forage for food.

  • Boids attempt to maximize friendly boid

density (increase odds of survival), while collecting resources (or some other form of utility)

slide-34
SLIDE 34

Krill in Action

slide-35
SLIDE 35

Swarm Intelligence - Summary

  • Swarm Intelligence

○ Nature inspired algorithms for group behaviors ○ Group Behaviors of boids > Individual Behaviors ○ Different Algorithms for Different Folks ■ Grouping/Clustering ■ Search Optimization (Foraging) ■ Self-preservation

  • Next Time!

○ In-depth look at the 3 Algorithms ○ Applications of the 3 Algorithms (games and IRL)

slide-36
SLIDE 36

Questions?

"What is 'No', Alex?"