Biologically Inspired AI (mostly GAs)

18
Biologically Inspired AI (mostly GAs)

description

Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation. Neural networks Evolutionary computation (e.g., genetic algorithms) Immune-system-inspired computer/network security Ant-colony optimization Swarm intelligence (e.g., decentralized robots) - PowerPoint PPT Presentation

Transcript of Biologically Inspired AI (mostly GAs)

Page 1: Biologically Inspired AI (mostly GAs)

Biologically Inspired AI

(mostly GAs)

Page 2: Biologically Inspired AI (mostly GAs)

Some Examples of Biologically Inspired Computation

• Neural networks

• Evolutionary computation (e.g., genetic algorithms)

• Immune-system-inspired computer/network security

• Ant-colony optimization

• Swarm intelligence (e.g., decentralized robots)

• Molecular (DNA) computation

Page 3: Biologically Inspired AI (mostly GAs)

Evolutionary Computation

• A population of candidate solutions evolves over time, with the fittest at each generation contributing the most offspring to the next generation

• Offspring are produced via crossover between parents, along with random mutations and other “genetic” operations.

A collection of computational methods inspired by

biological evolution:

Page 4: Biologically Inspired AI (mostly GAs)

Evolution made simple

Essentials of Darwinian evolution:– Organisms reproduce in

proportion to their fitness in the environment

– Offspring inherit traits from parents

– Traits are inherited with some variation, via mutation and sexual recombination

Charles Darwin1809–1882

Page 5: Biologically Inspired AI (mostly GAs)

Evolution made simple

Essentials of Darwinian evolution:– Organisms reproduce in

proportion to their fitness in the environment

– Offspring inherit traits from parents

– Traits are inherited with some variation, via mutation and sexual recombination

Essentials of evolutionary algorithms:– Computer “organisms” (e.g.,

programs) reproduce in proportion to their fitness in the environment (e.g., how well they perform a desired task)

– Offspring inherit traits from their parents

– Traits are inherited, with some variation, via mutation and “sexual recombination”

Page 6: Biologically Inspired AI (mostly GAs)

Appeal of ideas from evolution:

• Successful method of searching large spaces for good solutions (chromosomes / organisms)

• Massive parallelism

• Adaptation to environments, change

• Emergent complexity from simple rules

Page 7: Biologically Inspired AI (mostly GAs)

A Simple Genetic Algorithm

1. Start out with a randomly generated population of chromosomes (candidate solutions).

2. Calculate the fitness of each chromosome in the population.

3. Select pairs of parents with probability a function of fitness in the population.

4. Create new population: Cross over parents, mutate offspring, place in new population.

5. Go to step 2.

Page 8: Biologically Inspired AI (mostly GAs)

Create a random population of bit strings representing “candidate solutions” to a problem.

string 1: 0010001100010010111100010100110111000...string 2: 0001100110101011111111000011101001010...string 3: 1111100010010101000000011100010010101... . . .

string 100: 0010111010000001111100000101001011111...

Page 9: Biologically Inspired AI (mostly GAs)

string 1: 0010001100010010111100010100110111000... Fitness = 0.5string 2: 0001100110101011111111000011101001010... Fitness = 0.2string 3: 1111100010010101000000011100010010101... Fitness = 0.4

. . .

string 100:0010111010000001111100000101001011111... Fitness = 0.0

Calculate fitness of each individual in the population:

Page 10: Biologically Inspired AI (mostly GAs)

string 1: 0010001100010010111100010100110111000... string 3: 1111100010010101000000011100010010101...

Select parents with probability proportional to fitness:

Create new generation via crossover and mutation:

Page 11: Biologically Inspired AI (mostly GAs)

0010000010010101000000011100010010101... 1111100 100010010111100010100010111000...

Children:

mutate

string 1: 0010001 100010010111100010100110111000... string 3: 1111100 010010101000000011100010010101...

Page 12: Biologically Inspired AI (mostly GAs)

Some Applications of Genetic Algorithms

• Optimization and design– numerical optimization, circuit design, airplane design,

factory scheduling, drug design, network optimization

• Automatic programming– evolving computer programs (e.g., for image processing),

evolving cellular automata

• Machine learning and adaptive control– robot navigation, evolution of rules for solving “expert”

problems, evolution of neural networks, adaptive computer security, adaptive user interfaces

Page 13: Biologically Inspired AI (mostly GAs)

Some Applications of Genetic Algorithms

• Complex data analysis and time-series prediction– prediction of chaotic systems, financial-market

prediction, protein-structure prediction

• Scientific models of complex systems– economics, immunology, ecology, population genetics,

evolution, cancer

Page 14: Biologically Inspired AI (mostly GAs)

Genetic Programming

(John Koza, 1992)

• “Genetic Programming”: Evolve populations of programs (rather than bit strings).

Page 15: Biologically Inspired AI (mostly GAs)

Any computer

program can

be expressed as a

“parse tree”:

(* PI (* R R))

Page 16: Biologically Inspired AI (mostly GAs)

1. Choose a set of functions and terminals for the program, e.g.,

{+, -, *, /, sqrt, sin, cos, abs, pow, R, PI, D, C, rand()}

2. Generate an initial population of random programs (trees), each up to some maximum depth.

Koza’s genetic programming algorithm:

Page 17: Biologically Inspired AI (mostly GAs)
Page 18: Biologically Inspired AI (mostly GAs)

3. Run the GA:

– Fitness: Run each program on “training data”. Fitness is how many training cases the program gets right (or how close it gets to correct answer).

– Selection: Select parents probabilistically, based on fitness.

– Crossover: Exchange subtrees of parents.

– Mutation: Replace subtree with a random tree.

Koza’s genetic programming algorithm: