Selected Topics in CI I Genetic Programming Dr. Widodo Budiharto 2014.

Slides:



Advertisements
Similar presentations
CS6800 Advanced Theory of Computation
Advertisements

Using Parallel Genetic Algorithm in a Predictive Job Scheduling
Tetris – Genetic Algorithm Presented by, Jeethan & Jun.
Student : Mateja Saković 3015/2011.  Genetic algorithms are based on evolution and natural selection  Evolution is any change across successive generations.
GP Applications Two main areas of research Testing genetic programming in areas other techniques have been applied to. Applying genetic programming to.
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
Genetic Algorithms. Some Examples of Biologically Inspired AI Neural networks Evolutionary computation (e.g., genetic algorithms) Immune-system-inspired.
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.
A new crossover technique in Genetic Programming Janet Clegg Intelligent Systems Group Electronics Department.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Chapter 14 Genetic Algorithms.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
D Nagesh Kumar, IIScOptimization Methods: M1L4 1 Introduction and Basic Concepts Classical and Advanced Techniques for Optimization.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Programming.
Slides are based on Negnevitsky, Pearson Education, Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming n Evolution.
Genetic Algorithm.
Evolutionary Intelligence
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
Problems Premature Convergence Lack of genetic diversity Selection noise or variance Destructive effects of genetic operators Cloning Introns and Bloat.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Evolution Strategies Evolutionary Programming Genetic Programming Michael J. Watts
© Negnevitsky, Pearson Education, Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming Evolution strategies Evolution.
Genetic algorithms Prof Kang Li
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
What is Genetic Programming? Genetic programming is a model of programming which uses the ideas (and some of the terminology) of biological evolution to.
Introduction to Evolutionary Algorithms Session 4 Jim Smith University of the West of England, UK May/June 2012.
1 Chapter 14 Genetic Algorithms. 2 Chapter 14 Contents (1) l Representation l The Algorithm l Fitness l Crossover l Mutation l Termination Criteria l.
Evolutionary Computation Dean F. Hougen w/ contributions from Pedro Diaz-Gomez & Brent Eskridge Robotics, Evolution, Adaptation, and Learning Laboratory.
G ENETIC P ROGRAMMING Ranga Rodrigo March 17,
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Artificial Intelligence Chapter 4. Machine Evolution.
Algorithms and their Applications CS2004 ( ) 13.1 Further Evolutionary Computation.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
2101INT – Principles of Intelligent Systems Lecture 11.
Automated discovery in math Machine learning techniques (GP, ILP, etc.) have been successfully applied in science Machine learning techniques (GP, ILP,
Alice E. Smith and Mehmet Gulsen Department of Industrial Engineering
Introduction Genetic programming falls into the category of evolutionary algorithms. Genetic algorithms vs. genetic programming. Concept developed by John.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Overview Last two weeks we looked at evolutionary algorithms.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Genetic Algorithm (Knapsack Problem)
Introduction to Genetic Algorithms
Chapter 14 Genetic Algorithms.
Genetic Algorithms.
Optimization Of Robot Motion Planning Using Genetic Algorithm
An Evolutionary Approach
Introduction Genetic programming falls into the category of evolutionary algorithms. Genetic algorithms vs. genetic programming. Concept developed by John.
Evolution Strategies Evolutionary Programming
Artificial Intelligence Methods (AIM)
Evolution strategies and genetic programming
School of Computer Science & Engineering
Genetic Algorithms, Search Algorithms
Advanced Artificial Intelligence Evolutionary Search Algorithm
Artificial Intelligence Chapter 4. Machine Evolution
Introduction to Artificial Intelligence Lecture 11: Machine Evolution
Basics of Genetic Algorithms
Methods and Materials (cont.)
Artificial Intelligence Chapter 4. Machine Evolution
EE368 Soft Computing Genetic Algorithms.
Searching for solutions: Genetic Algorithms
A Gentle introduction Richard P. Simpson
Beyond Classical Search
Presentation transcript:

Selected Topics in CI I Genetic Programming Dr. Widodo Budiharto 2014

Agenda Introduction to Genetic Programming Tree-Based Representation Bina Nusantara University

introduction Genetic programming (GP) is one of the most useful, general-purpose problem solving techniques available to developers. It has been used to solve a wide range of problems, such as symbolic regression, data mining, optimization, and emergent behavior in biological communities. GP is one instance of the class of techniques called evolutionary algorithms, which are based on insights from the study of natural selection and evolution. Evolutionary algorithms solve problems not by explicit design and analysis, but by a process akin to natural selection. Bina Nusantara University

introduction An evolutionary algorithm solves a problem by first generating a large number of random problem solvers (programs). Each problem solver is executed and rated according to a fitness metric defined by the developer. In the same way that evolution in nature results from natural selection, an evolutionary algorithm selects the best problem solvers in each generation and breeds them. Bina Nusantara University

introduction Genetic programming and genetic algorithms are two different evolutionary algorithms. Genetic algorithms involve encoded strings that represent particular problem solutions. These encoded strings are run through a simulator and the best strings are mixed to form a new generation. Genetic programming, follows a different approach. Instead of encoding a representation of a solution, GP breeds executable computer programs. Bina Nusantara University

introduction Bina Nusantara University

Introduction Originally, GP was developed by Koza to evolve computer programs in1980s A specialization of GAs, where tree-based representations are used Originally developed to evolve computer programs As part of the fitness function, each program is executed to determine its outcomes Bina Nusantara University

Tree-based representations have a number of implications that the reader should be aware of: • Adaptive individuals: Contrary to GAs where the size of individuals are usually fixed, a GP population will usually have individuals of different size, shape and complexity. Domain-specific grammar: A grammar needs to be defined that accurately reflects the problem to be solved. It should be possible to represent any possible solution using the defined grammar. Bina Nusantara University

grammar a grammar forms an important part of chromosome representation. As part of the grammar, a terminal set, function set, and semantic rules need to be defined. The terminal set specifies all the variables and constants, while the function set contains all the functions that can be applied to the elements of the terminal set. Bina Nusantara University

example Bina Nusantara University

For this problem, the function set is defined as {AND,OR,NOT}, and Two examples are given next to illustrate GP representations. One of the first applications of GP was to evolve Boolean expressions. Consider the expression For this problem, the function set is defined as {AND,OR,NOT}, and the terminal set is {x1, x2} where x1, x2 ∈ {0, 1}. Bina Nusantara University

Bina Nusantara University

Bina Nusantara University

y:=x*ln(a)+sin(z)/exp(-x)-3.4; The next example considers the problem of evolving a mathematical expression. Consider the task of evolving the program, y:=x*ln(a)+sin(z)/exp(-x)-3.4; The terminal set is specified as {a, x, z, 3.4} with a, x, z ∈ R. The minimal function set is given as {−,+, ∗, /, sin, exp, ln}. The global optimum is illustrated in Figure. Bina Nusantara University

example The problem is to develop an artificial ant that will efficiently walk a grid that has a weaving trail of food on it. The objective is to breed the ant that will gather the maximum amount of food in the minimum number of steps. Bina Nusantara University

example Develop an intelligent strategy to be used by a simple artificial ant. The ant moves on a 32x32 grid, and if it moves off one side it returns on the other side. The grid has a winding trail of food on it. The trail begins at the [0,0] origin, which is also the starting position of the ant. Each grid location in the trail can be empty, contain food, or contain an indicator that it is a gap between food locations. The trail must be continuous from the origin. All food must be adjacent to at least one point that has food or a marked gap. Bina Nusantara University

example The ant has two elements that fully describe its state. The first is its current location on the grid. The second is the direction it is facing, which is either left, right, up, or down. The ant has three possible things it can do. It can turn left, turn right, or move to the square that it is facing. It has only one sensor for its environment: a function called FacingFood which will tell it if there is food in the square that it is facing. When an ant moves to a square that contains food, it removes the food from the grid and increments the total food it has gathered. When it moves or turns, it increments the number of steps it has taken to gather its food. Bina Nusantara University

example Generations The algorithm will stop after this number of generations is produced. Population This is the number of ants each generation will have. The population will be a mixture of the most efficient ants from the previous generation, together with their children. Max Tree Depth The algorithm begins by generating random ants. This setting controls how deep their expression trees can be. Food Goal and Step Goal We'd like to breed an ant that will gather this much food in these few steps. By default, these will reflect the food and gap counts in the active grid. However, the computed Step Goal doesn't reflect the turn operations that an ant will need to make when the trail changes direction. Bina Nusantara University

problem The problem is to create an ant that will make an intelligent series of moves and turns based on its FacingFood function. An example would be: if (FacingFood()) { Move(); } else { TurnRight(); Move(); } Bina Nusantara University

Bina Nusantara University

Run it Bina Nusantara University

Bina Nusantara University

The GP algorithm begins by generating a population of random expressions. One parameter that controls the algorithm is population size. These expressions are then executed and evaluated, using a fitness measure. I want to select efficient ants, those that gather a lot of food with few steps, so the fitness measure weighs both food gathered and the number of steps used. In my implementation, I subtract the steps from the food gathered and add 1000, so that fitness is always positive. Hence an ant with a higher fitness measure is going to be more successful than an ant with a lower measure. Bina Nusantara University

When the initial, random first generation is completed, the real work of GP begins. The first step is selection, which is choosing the best ants and copying them to the next generation. Subsequent generations begin with the pool of parents that were replicated from the prior generation. Parents are selected according to fitness. In general, fitter parents are more likely to be selected to breed. The crossover algorithm (see Figure 5) is used to breed a pair of children from a pair of parents. Bina Nusantara University

Bina Nusantara University

Most GP algorithms also implement mutation Most GP algorithms also implement mutation. This involves making a random change in a small number of offspring in order to maintain diversity in the population. Mutation is essential because otherwise the population becomes completely dominated by a few good bloodlines, which makes it difficult to continue progress beyond a certain point. This implementation performs a simple mutation step during the crossover operation to introduce randomness. When a terminal node is copied, a random terminal is substituted two percent of the time. Bina Nusantara University

Ant Class An Ant is initialized by passing it a reference to a grid, integers that specify the food goal, and the maximum number of steps: public Void Init(Cell[,] grid, int StepLimit, int FoodGoal) Bina Nusantara University

experiment Start the application, press the Get Grid button, and open the code file (called AlternateGrid.xml in the download). The winding trail has 76 pieces of food, with many gaps of one or two spaces. Change the number of generations to 20 and click the Generate button. When execution completes, the generation summary will show a clear increase in average fitness. Select Generation 20, and then select its best ant. Since the Generator works off of a Random instance with a fixed seed, the best ant in this generation will have gathered 65 items of food in 400 steps Bina Nusantara University

Bina Nusantara University

exercise Create a report of program using Excel : Bina Nusantara University