Docsity

Game Character AI with Genetic Algorithms: Evolutionary Approaches in Development, Thesis of Compilers

Partial preview of the text

Download Game Character AI with Genetic Algorithms: Evolutionary Approaches in Development and more Thesis Compilers in PDF only on Docsity!

Game Character AI Using

Genetic Algorithm

Presented By: Prinkle Shete

Under the guidance of:

Prof. Jubber S. Nadaf

Content  (^) Abstract  (^) Introduction  (^) General Approach  (^) Adaptive AI  (^) Genetic Algorithm

Introduction

 In the broadest sense, most games incorporate some form of

artificial intelligence (AI).

 For instance, developers have used AI for years to give

seemingly intelligent life to countless game characters, from the

ghosts in the classic arcade game Pac Man to the bots in the

first-person shooter Unreal, and many others in between.

 The huge variety of game genres and game characters

necessitates a rather broad interpretation as to what is

considered game AI.

General Approach  (^) Finite State Machine(FSM)  (^) Reinforcement Learning  (^) Artificial Neural Networks (ANN)  (^) Markov models  (^) Genetic Programming All the methods mentioned above are adaptive except FSM. This kind of approach is that at the early stages of the game, characters may have a very erratic behavior, needing a certain amount of time to develop into challenging players.

Evolutionary Approach  (^) Offline Development Of AI Character.  (^) Main Aim: Find Character Moves That Are Effective In Certain Environment Settings.  (^) Genetic algorithm (GA) approach is used to develop moves that respond to a certain game situation.  (^) The GA codifies a set of joint moves as a solution to a given scenario (opponent’s last move, distance, etc.).  (^) Solution Evolves By Playing For Several Generations.

Genetic Programming And Genetic Algorithm  (^) Population Based Evolutionary Algorithm.  (^) Able To Produce A Set Of Different Solutions.  (^) No Need To Explicitly Set Up Any Rule Or Strategy For The AI Character.

First, Some Biology  (^) How we survive as a species  (^) Reproduction  (^) DNA  (^) Chromosomes  (^) Genes  (^) Nucleotides: Thymine, Adenine, Cytosine, Guanine  (^) Genome = chromosomes + all other hereditary information

How We Evolve  (^) Natural Selection  (^) Strong members of a population survive to reproduce, passing on their ‘strong’ traits  (^) Crossover  (^) Some from parent A, some from parent B  (^) Mutation  (^) A strange flipped gene that cannot be traced back to a parent

The Basic Idea  (^) Start with a completely random genome pool  (^) Each of these decomposes to a (potential) solution to our problem.  (^) Gradually evolve our way to a solution

Fitness/Strength Heuristic  (^) Turns a binary string into a single floating point value based on how close to our desired result it is.  (^) Maps back to how well an organism can survive in an environment.  (^) 0.0f = terrible  (^) 1.0f = absolute solution

Simple Crossover Parents Children

Genome Selection  (^) We now know how to crossover, but which genomes do we select?  (^) Simplest way is random selection  (^) A better way is to weigh selection based on relative strength  (^) Roulette Wheel Selection  (^) Stochastic Universal Sampling (SUS)  (^) Tournament Selection

Pathfinding Example  (^) Break down binary string into movements across a 2D grid.  (^) 00 = up  (^) 01 = right  (^) 10 = down  (^) 11 = left

Pathfinding Example start Genome A: 01 10 01 10 01 00 01 00 01 = Right 10 = Down 01 = Right (Bump) 10 = Down 01 = Right 00 = Up (Bump) 01 = Right 00 = Up Fitness = 1 - (2 /

finish