Tetris – Genetic Algorithm Presented by, Jeethan & Jun.

Slides:



Advertisements
Similar presentations
© Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems Introduction.
Advertisements

Biologically Inspired Computing: Operators for Evolutionary Algorithms
Student : Mateja Saković 3015/2011.  Genetic algorithms are based on evolution and natural selection  Evolution is any change across successive generations.
Tetris and Genetic Algorithms Math Club 5/30/2011.
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
Content Based Image Clustering and Image Retrieval Using Multiple Instance Learning Using Multiple Instance Learning Xin Chen Advisor: Chengcui Zhang Department.
Genetic Algorithms. Some Examples of Biologically Inspired AI Neural networks Evolutionary computation (e.g., genetic algorithms) Immune-system-inspired.
TEMPLATE DESIGN © Genetic Algorithm and Poker Rule Induction Wendy Wenjie Xu Supervised by Professor David Aldous, UC.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Introduction to Genetic Algorithms Yonatan Shichel.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Chapter 14 Genetic Algorithms.
Evolutionary Computation Application Peter Andras peter.andras/lectures.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Brandon Andrews.  What are genetic algorithms?  3 steps  Applications to Bioinformatics.
Pawel Drozdowski – November Introduction GA basics Solving simple problem GA more advanced topics Solving complex problem Question and Answers.
Evolutionary algorithms
Genetic Algorithm.
Efficient Model Selection for Support Vector Machines
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
A Comparison of Nature Inspired Intelligent Optimization Methods in Aerial Spray Deposition Management Lei Wu Master’s Thesis Artificial Intelligence Center.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic Algorithms Michael J. Watts
Design of a real time strategy game with a genetic AI By Bharat Ponnaluri.
Boltzmann Machine (BM) (§6.4) Hopfield model + hidden nodes + simulated annealing BM Architecture –a set of visible nodes: nodes can be accessed from outside.
Reinforcement Learning for the game of Tetris using Cross Entropy
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
EE459 I ntroduction to Artificial I ntelligence Genetic Algorithms Kasin Prakobwaitayakit Department of Electrical Engineering Chiangmai University.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
Learning by Simulating Evolution Artificial Intelligence CSMC February 21, 2002.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.
Tetris Agent Optimization Using Harmony Search Algorithm
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
Biologically inspired algorithms BY: Andy Garrett YE Ziyu.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
In the name of ALLAH Presented By : Mohsen Shahriari, the student of communication in Sajad institute for higher education.
N- Queens Solution with Genetic Algorithm By Mohammad A. Ismael.
1 Autonomic Computer Systems Evolutionary Computation Pascal Paysan.
Othello Artificial Intelligence With Machine Learning Computer Systems TJHSST Nick Sidawy.
Application of the GA-PSO with the Fuzzy controller to the robot soccer Department of Electrical Engineering, Southern Taiwan University, Tainan, R.O.C.
The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithm(GA)
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
March 1, 2016Introduction to Artificial Intelligence Lecture 11: Machine Evolution 1 Let’s look at… Machine Evolution.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
Genetic (Evolutionary) Algorithms CEE 6410 David Rosenberg “Natural Selection or the Survival of the Fittest.” -- Charles Darwin.
Genetic Algorithm (Knapsack Problem)
Chapter 14 Genetic Algorithms.
Selected Topics in CI I Genetic Programming Dr. Widodo Budiharto 2014.
Genetic Algorithms.
CS621: Artificial Intelligence
Introduction to Artificial Intelligence Lecture 11: Machine Evolution
Dr. Unnikrishnan P.C. Professor, EEE
Methods and Materials (cont.)
Boltzmann Machine (BM) (§6.4)
Searching for solutions: Genetic Algorithms
Presentation transcript:

Tetris – Genetic Algorithm Presented by, Jeethan & Jun

 Evolutionary Algorithm  A commonly used method by which solutions to problems that might otherwise be impossible to solve are solved.  Usually be used to find the near-optimal solution for the problems which have many candidate solutions by using the evolutionary principles and methods.  Can also be used to tackle problems that humans don't really know how to solve.  Widely used with other algorithms in engineering and other fields. Introduction

Tetris is a computer game invented by Alexey Pajitnov in Then it was widely played on many other devices such as game consoles. The game is played on a game-board, usually with a width of 10 and height of 20. There are seven distinct Tetrominoes, each of which occupies four grid cells of the game board. The Tetrominoes move downwards with a certain speed while the player can rotate them and move them horizontally. One Tetrominoes stops moving as soon as it hits the ground or previously placed Tetrominoes. Tetris Game Overview

 Each fully occupied horizontal line in the game-board is removed and all blocks above slip down by one line.  The game ends as soon as a new tetrominoes cannot enter the board. GOAL - The player has to clear as many lines as possible before the board is filled.

Types of Tetrominoes

 Blocks of four (tetrominoes) falling from the top of the board. The player moves and rotates the blocks and stacks them up: Rules

 black outline is one of the places you can put the shaped block. Rules

 How to design using AI ?  Using Genetic Algorithm - Determine which positions are good and which are bad  The AI is going to go through each position and choose the best possible one. Tetris AI - Outline

 Avoid Penalize height since when all the blocks are stacked up to the top, you lose: Strategies

 Penalize holes Blockades Strategies

Step 1 : Look at the current block and the next block and simulate ALL possible combinations (positions and rotations) of the two blocks. Step 2: Calculate a score for each of the positions. Step 3: Move the block to the position with the highest score and repeat. Algorithm for Tetris

 To get a score for a position : Score = A * Sum of Heights + B * Number of Clears + C * Number of Holes + D * Number of Blockades  For each edge touching, another block  the wall  the floor

Charles Darwin specifies four criteria for the process of natural selection to occur:  Variation: Organisms in a population must be slightly different from one another.  Inheritance: Traits of parent organisms must be passed onto their offspring.  Limited space: Only some of the offspring in any generation is able to survive and pass on its genes.  Competition: Individuals that are more fit are more likely to pass on their genes to the next generation. Implementing genetic algorithm

1.A chromosome which expresses a possible solution to the problem as a string. ( since there are a set of seven weights,chromosome is an array of seven doubles ) 2. A fitness function which takes a chromosome as input and returns a higher value for better solutions. Factors influencing Natural selection process

 The fitness function – the score is just the number of lines the AI runs for before it dies. Scoring system :  Nintendo’s original scoring system for Tetris — 40 points for one clear, 120 points for two simultaneous clears, 300 for three simultaneous clears, and 1200 for four simultaneous clears. Fitness Function

3. A population which is just a set of many chromosomes (sixteen chromosomes ; Initially the chromosomes are filled with randomly generated numbers. Each generation onwards, the population’s chromosomes are derived from the best candidates of the previous generation — but the population size stays the same)

 Tournament selection: Selection Method

A crossover operation which determines how parents combine to produce offspring Cross over is a process of taking more than one parent solutions and producing a child solution from them A mutation operation which determines how random deviations manifest themselves (We have a 10% chance of a mutation – a chromosome that is different from either parent’s) Crossover & Mutation

  Demo

Using Genetic Algorithm we can find the local optimum solution quickly but its very hard to achieve the global optimum solution – The best solution. Suggestion for better performance: Adjusting mutation rates with generations Instead of a simple weighted approach, add an intermediary intelligent system and optimize that system. E.g. weights of a neural network or parameters of a fuzzy logic system.logic Conclusion