# Class 38: Genetic Algorithms

Back to Neural Networks. On to AI Experiments.

Held Tuesday, April 11, 2000

Overview

Today we investigate techniques of genetic programming and consider whether any of these techniques may be applicable to the problems of artificial intelligence.

Question 38 for discussion today: How might you use genetic algorithms to produce a form of intelligent program? Do you expect this to be a fruitful road to AI?

Question 39 for discussion tomorrow: Find a Web site with an illustrative example of genetic programming or neural networks. Report on the success or failure of the technique to solve the problem described therein.

Notes

• Today's questions is a little bit different; let me know if you find it confusing.
• I'll do my best to find an appropriate genetic algorithm or neural network simulator for tomorrow so that we can see how well both ``learn''.

Contents

Summary

• Genetic Programming
• Evolving solutions
• Evolving algorithms
• Are these appropriate techniques?

## Genetic Algorithms

• Disclaimer: Although I've classified this technique within our AI discussions, it is not necessarily an AI technique.
• In the field of genetic algorithms, researchers apply techniques of genetics to the development of algorithms.
• There are two basic models of genetic programming
• In the simpler one, you evolve a solution to a particular problem
• In the more complex one, you evolve an algorithm that can solve provlems
• In both cases, you need to be able to represent something (the potential solutions or the potential algorithms) as a sequence of discrete and range-limited values.
• Similarly, every sequence of values represents either a potential solution or a potential algorithm.
• These sequences are the ``DNA'' of evolution

### The Basic Technique

• In each round
• Assign a fitness to each sequence (based on its success at answering the question)
• Determine the base population for the next generation. Fitter individuals are more likely to reproduce or survive.
• ``Cross-breed'' sequences to generate new sequences
• ``Mutate'' sequences to generate new sequences
• Keep doing this until the population stabilizes or an acceptable solution arises.

### Variations

• Population size
• How to mutate
• How to breed
• How many copies of each genomre to keep
• ...

### Successes

• Genetic algorithms have come up with some good solutions to approximation problems, and much faster than ``standard''. algorithms can. The prototypical example is the travelling salesperson problem.
• Some interesting algorithms have been genetically derived.

## Neural Networks and Genetic Programming

• Can we apply them to the same kinds of problems?
• What are similarities/differences?
• Can we apply genetic programming to neural networks?
• Do you consider one more amenable to problems of AI than another? Why or why not?

### Concerns

• Both of these techniques differ from traditional algorithm development in that a solution ``grows'' rather than being designed by someone.
• This typically means that we can't necessarily understand the solution that the process generates. How do we know that a neural network or genetically evolved algorithm is correct?
• Should we be concerned? (Or how much should we be concerned?)

## History

Saturday, 22 January 2000

• Created as a blank outline.

Tuesday, 11 April 2000

• Filled in the details.

Back to Neural Networks. On to AI Experiments.

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.