Design of a real time strategy game with a genetic AI By Bharat Ponnaluri.

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

Artificial Intelligence Presentation
Genetic Algorithms (Evolutionary Computing) Genetic Algorithms are used to try to “evolve” the solution to a problem Generate prototype solutions called.
Using Parallel Genetic Algorithm in a Predictive Job Scheduling
Tetris – Genetic Algorithm Presented by, Jeethan & Jun.
Tetris and Genetic Algorithms Math Club 5/30/2011.
Case Study: Genetic Algorithms GAs are an area of AI research –used to solve search problems with potentially better performance than traditional search.
Playing Evolution Games in the Classroom Colin Garvey GK-12 Fellow.
An Introduction to... Evolutionary Game Theory
Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
On the Genetic Evolution of a Perfect Tic-Tac-Toe Strategy
The Implementation of Artificial Intelligence and Temporal Difference Learning Algorithms in a Computerized Chess Programme By James Mannion Computer Systems.
Chess AI’s, How do they work? Math Club 10/03/2011.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.
Artificial Intelligence in Game Design
21-May-15 Genetic Algorithms. 2 Evolution Here’s a very oversimplified description of how evolution works in biology Organisms (animals or plants) produce.
Evolutionary Computing A Practical Introduction Presented by Ben Paechter Napier University with thanks to the EvoNet Training Committee and its “Flying.
Game Playing CSC361 AI CSC361: Game Playing.
Data Mining CS 341, Spring 2007 Genetic Algorithm.
Nature’s Algorithms David C. Uhrig Tiffany Sharrard CS 477R – Fall 2007 Dr. George Bebis.
Introduction to Genetic Algorithms Yonatan Shichel.
Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni.
Evolutionary Computation Application Peter Andras peter.andras/lectures.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
Pawel Drozdowski – November Introduction GA basics Solving simple problem GA more advanced topics Solving complex problem Question and Answers.
Prepared by Barış GÖKÇE 1.  Search Methods  Evolutionary Algorithms (EA)  Characteristics of EAs  Genetic Programming (GP)  Evolutionary Programming.
Evolutionary algorithms
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Cristian Urs and Ben Riveira. Introduction The article we chose focuses on improving the performance of Genetic Algorithms by: Use of predictive models.
An Introduction to Artificial Intelligence and Knowledge Engineering N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering,
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Genetic Algorithms Michael J. Watts
Design of a real time strategy game with a genetic AI By Bharat Ponnaluri.
Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project.
G ENETIC A LGORITHMS Steve Foster. I NTRODUCTION Genetic Algorithms are based on the principals of evolutionary biology in order to find solutions to.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
EE459 I ntroduction to Artificial I ntelligence Genetic Algorithms Kasin Prakobwaitayakit Department of Electrical Engineering Chiangmai University.
GENETIC ALGORITHMS.  Genetic algorithms are a form of local search that use methods based on evolution to make small changes to a popula- tion of chromosomes.
Machine Learning for an Artificial Intelligence Playing Tic-Tac-Toe Computer Systems Lab 2005 By Rachel Miller.
Evolutionary Art with Multiple Expression Programming By Quentin Freeman.
A New Evolutionary Approach for the Optimal Communication Spanning Tree Problem Sang-Moon Soak Speaker: 洪嘉涓、陳麗徽、李振宇、黃怡靜.
Algorithms and their Applications CS2004 ( ) 13.1 Further Evolutionary Computation.
Evolution Programs (insert catchy subtitle here).
 Based on observed functioning of human brain.  (Artificial Neural Networks (ANN)  Our view of neural networks is very simplistic.  We view a neural.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Evolving Reactive NPCs for the Real-Time Simulation Game.
1. Genetic Algorithms: An Overview  Objectives - Studying basic principle of GA - Understanding applications in prisoner’s dilemma & sorting network.
Pac-Man AI using GA. Why Machine Learning in Video Games? Better player experience Agents can adapt to player Increased variety of agent behaviors Ever-changing.
Optimization Problems
Artificial Intelligence in Game Design Influence Maps and Decision Making.
GENETIC ALGORITHM Basic Algorithm begin set time t = 0;
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals.
Genetic Search Algorithms Matt Herbster. Why Another Search?  Designed in the 1950s, heavily implemented under John Holland (1970s)  Genetic search.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
An application of the genetic programming technique to strategy development Presented By PREMKUMAR.B M.Tech(CSE) PONDICHERRY UNIVERSITY.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
An Evolutionary Algorithm for Neural Network Learning using Direct Encoding Paul Batchis Department of Computer Science Rutgers University.
Genetic Algorithm(GA)
George Yauneridge.  Machine learning basics  Types of learning algorithms  Genetic algorithm basics  Applications and the future of genetic algorithms.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Intelligent Exploration for Genetic Algorithms Using Self-Organizing.
Design of a real time strategy game with a genetic AI By Bharat Ponnaluri.
Selected Topics in CI I Genetic Programming Dr. Widodo Budiharto 2014.
CS621: Artificial Intelligence
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
Presentation transcript:

Design of a real time strategy game with a genetic AI By Bharat Ponnaluri

Abstract Current strategy game AI Involved combinations of heuristics and constants. The combinations need to be optimized for the AI to be effective Too many possible constants&combinations-->difficult optimization Chess heuristic evaluations Moves available Is the king safe Pawn structure Material balance Genetic AI Can produce constants and combinations of heuristic algorithms quickly by eliminating suboptimal combinations.

Introduction Design of a simple real time strategy game –Build troops and try to take over cities –Like Risk in real time –Goal is to have an intelligent AI optimized with genetic algorithms AI design –Coding of simple building block heuristic evaluation functions –Addition of constants(Agressiveness,stinginess) that determine behaviour –Chromosomes will be random combinations of Heuristic evalution functions –Used to evaluate the quality of a possible course of action based on game data

Personality Traits Goal: To make the AI more interesting and humanlike Traits –Agressiveness –Paranoia –Stinginess –Vengence –Trustworthiness

Observation AI will take advantage of other players' behavior Examples –Assertivness The AI will keep track of when a player retreats The AI will attack a player which retreats a lot –Attacking game leader One player is threatening to win AI will track who tries to stop that player Then the AI will let that player do the work

Game Theory Advantages –Not very complicated –Easily understandable by AI –Good model of human behavior

Game Theory: War of attrition Two players fighting over city Backing down=loss in percieved assertiveness Fighting=massive loss in strength t=time that conflict lasts Don't FightFight Don't Fight(0,0,0)(-t+1,-t,0) Fight(t,-t+1,0)(-t,-t,2*t)

Sample chromosome Chromosome enemyStrength()/2*myStrength()-3*fooA()/ power() Possible genes public int fooA().... public int enemyStrength().... public int myStrength()

Heuristic evaluation functions –Used to evaluate the quality of a possible course of action based on game data Example: –Public int getTrafficJamFactor() Return ( 1.001^(number of cars))/roadSize

Game Theory Advantages –Easy to understand –Representes humanlike behavior –Simple for computer to follow

How do genetic algorithms work Replicate evolution Steps 1.Determine random combinations of heuristics and constants(chromosomes) 2.Test chromosomes 3.Remove suboptimal chromosomes 4.Mutate surviving chromosomes 5.Swap data between surviving chromosomes 6.If chromosomes are optimal,end algorithm 7.Otherwise, repeat steps 1-7

Advantages and Disadvantages Advantages o Can function without user input o Can optimize a large number of constants o Usually is very good at optimizing stuff o Can determine unknown solutions Possible disadvantages o Genetic algorithms are complicated o Take a significant amount of computing power o Networking will increase complexity

Evolutionary Stable Strategies(ESS) Gene pool of defectors means cooperating players will lose Advantages –Diverse AI personalities Disadvantages –May lead to suboptimal/boring AI's CooperateDefect Cooperate1,1-10,3 Defect3,-10-5,-5

ESS: Example Population of turtling AI's AI's only counterattack or attack weak players A more balanced AI will lose Playing against a group of turtling AI's is boring

Degree-Constrained Spanning Trees Degree constrained spanning tree –All verticies are nodes –Maximum number of leaves per node Genetic algorithm –Optimized weights for a heuristic evaluation function

Tiddlywinks Fit largest possible circle that does not overlap discs Genetic algorithm –Generates random circles –Keeps the larger circles

Generating a target number using a mathematical expression –Combination of numbers(1-9) and mathematical operators(-,+,*,/) adding up to a target number –Each number=4 bits –Chromosome *4/2 +1 –Suboptimal chromosomes-->result far from target number –Can be scaled for large numbers &decimals –No attempting to use brute force to test out random combinations.

New Heurstics Find Targets() –Average proximity –Income power factor –Troop power factor –Potential borders

Testing results Numbers greater than 1 are not good From last working version(before new heurstics) Number of Troops On Map Rendering Time Update TimeAI

Conclusion Speed is an issue Debugging was unexpectedly difficult