On the Genetic Evolution of a Perfect Tic-Tac-Toe Strategy

Slides:



Advertisements
Similar presentations
Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
Advertisements

Biologically Inspired Computing: Operators for Evolutionary Algorithms
Genetic Algorithms (Evolutionary Computing) Genetic Algorithms are used to try to “evolve” the solution to a problem Generate prototype solutions called.
CS6800 Advanced Theory of Computation
Content Based Image Clustering and Image Retrieval Using Multiple Instance Learning Using Multiple Instance Learning Xin Chen Advisor: Chengcui Zhang Department.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Introduction to Genetic Algorithms Yonatan Shichel.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Evolutionary Computation Application Peter Andras peter.andras/lectures.
7/2/2015Intelligent Systems and Soft Computing1 Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Genetic Algorithm What is a genetic algorithm? “Genetic Algorithms are defined as global optimization procedures that use an analogy of genetic evolution.
Genetic Programming.
Genetic Algorithm.
Evolutionary Intelligence
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
Cristian Urs and Ben Riveira. Introduction The article we chose focuses on improving the performance of Genetic Algorithms by: Use of predictive models.
Othello Artificial Intelligence With Machine Learning
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
CS 484 – Artificial Intelligence1 Announcements Lab 3 due Tuesday, November 6 Homework 6 due Tuesday, November 6 Lab 4 due Thursday, November 8 Current.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic Algorithms Michael J. Watts
Boltzmann Machine (BM) (§6.4) Hopfield model + hidden nodes + simulated annealing BM Architecture –a set of visible nodes: nodes can be accessed from outside.
Presenter: Chih-Yuan Chou GA-BASED ALGORITHMS FOR FINDING EQUILIBRIUM 1.
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 Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
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.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
Learning by Simulating Evolution Artificial Intelligence CSMC February 21, 2002.
Automated Patch Generation Adapted from Tevfik Bultan’s Lecture.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
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.
An evolutionary approach for improving the quality of automatic summaries Constantin Orasan Research Group in Computational Linguistics School of Humanities,
Othello Artificial Intelligence With Machine Learning Computer Systems TJHSST Nick Sidawy.
Neural Networks And Its Applications By Dr. Surya Chitra.
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.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Agenda  INTRODUCTION  GENETIC ALGORITHMS  GENETIC ALGORITHMS FOR EXPLORING QUERY SPACE  SYSTEM ARCHITECTURE  THE EFFECT OF DIFFERENT MUTATION RATES.
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.
Breeding Swarms: A GA/PSO Hybrid 簡明昌 Author and Source Author: Matthew Settles and Terence Soule Source: GECCO 2005, p How to get: (\\nclab.csie.nctu.edu.tw\Repository\Journals-
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.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Intelligent Exploration for Genetic Algorithms Using Self-Organizing.
Chapter 14 Genetic Algorithms.
Genetic Algorithms.
Example: Applying EC to the TSP Problem
CS621: Artificial Intelligence
Basics of Genetic Algorithms (MidTerm – only in RED material)
Example: Applying EC to the TSP Problem
Introduction to Artificial Intelligence Lecture 11: Machine Evolution
Basics of Genetic Algorithms
Methods and Materials (cont.)
Boltzmann Machine (BM) (§6.4)
Searching for solutions: Genetic Algorithms
Presentation transcript:

On the Genetic Evolution of a Perfect Tic-Tac-Toe Strategy By MEHWISH AKHTAR

OBJECTIVE This paper demonstrates how a genetic algorithm can be used to evolve a perfect tic-tac-toe strategy, which never loses a game it plays.

Tic-Tac-Toe Games and Situations The size of the strategy space is therefore defined by the number of all possible game situations, which follows from to the question of how many distinct matches can be played. The total number of all possible game situations, i.e intermediate game stages, is given by 39 (19,683), representing one of three assignments (“X”, “O”, Empty), to all 9 . Both of these factors combined lead to a drastic reduction in the number of unique situations which a strategist can encounter. While the number of unique situations is in fact only 827. This number was found empirically by exhaustively constructing all possible situations and reducing the valid ones to their base cases.

Strategy Encoding Whenever an individual is asked to respond to a situation, the following process extracts the move encoded by its strategy mapping. Consider the situation: The situation with the lowest equivalent is considered the base case situation for its group (thus, there are 827 such base cases in the problem space). The base case then corresponds to an entry within the individual’s mapping table; it returns a number M between 1 and n, where n is the highest index to represent a possible move in the situation:

Applying the inverse of the transformation that was used to produce the base case, M is translated back into the context of the original situation in order to make the move:

GENETIC OPERATIONS Based on its performance, each individual is assigned a fitness measure; the higher its measure, the more likely it is that an individual will participate in reproduction and pass on its features to the next generation. Once the parent generation is determined, the construction of offspring occurs by means of three opera-tors: basic replication or mutation of a single individual, and crossover between two of them.

Fitness Evaluation In the context of this Tic-Tac-Toe implementation, the fitness measure was computed by letting each chromosome play an exhaustive set of all possible matches and measuring its performance in terms of wins, losses, and ties.

Replication, Mutation, and Crossover Replication and mutation were included as two basic operators to ensure general variety in the reproductive process over time. The first merely copies one individual with probability Preplication into the next generation without modification. Mutation can occur at each gene of an individual with probability Pmutate, by a new random allele value is chosen to replace the current one. In the implementation of this problem, the number of cross sites is variable: a probability Pcrossover is evaluated at each gene; genes are copied from Parent A until Pcrossover occurs, at which point, genes continue to be copied from Parent B. The next time P crossover occurs, the process flips back to Parent A, and so on. An example of this operation is given in Figure 5:

Results and Observations FIRST METHOD: Trials in the first set failed to find optimal individuals and continually remained at local maxima. The best individuals they produced were close to a perfect strategy but continued to lose small fractions of their matches (on the average 3 to 5 percent). This stagnation occurred when using the first version of the fitness measure, which evaluated individuals based on point values assigned to different match outcomes.However, this measure failed to give priority to individuals who lost fewer games than others.

Second Method: The measure was revised and dismissed the point system. With the updated version, an individual’s fitness was given by the fraction of games not lost and using this improvement, the second iteration of trials surprisingly succeeded on the first run. With the new evaluation method in place however, already the first run was successful. A population size of 500 individuals was sufficient given a maximum running time of at most 500 generations; an optimal individual was found after 1688 seconds (28 minutes), in generation 373.

Using the new fitness measure, additional experimentation was done to determine if different population sizes and probabilities would notably affect the performance of the optimal individuals found (more games, more games tied, etc.). As it turned out, a second run with 1000 individuals did not perform better or faster; in fact its optimal individual only appeared in generation 457 (65 minutes). One more experiment varied the crossover probability to 0.3 with different population sizes. Only one out of several runs produced a perfect strategy, and only at a very late stage: using 1000 individuals, an optimum appeared in generation 692. All other runs however showed no optimal individual after even 1000 generations, although their best individuals were close to being perfect (1 or 2 games lost out of 300 on average). Nevertheless, the higher crossover probability was likely to cause excessive mutation in the offspring and may therefore have prevented the populations from reaching optimality in the end.

CONCLUSION As a result, immediately the first run of the updated algorithm produced an optimum strategy after 373 generations. Despite the large genome of length 827, only 500 individuals were required. A series of additional runs confirmed this finding, and the individuals they produced did not lose a single game out of all possible matches they could ever play. Variations in population size did not show any improvement in the fitness of the final optimal individual; and experimentations with different parameters, such as a higher cross-over rate, only resulted in longer runs or no optimum at all.

FUTURE WORK Evolutionary programming should be applied to games of far greater complexity for example the evolution of intelligent chess players by means of these concepts is certainly a motivating task to consider.