Top Banner
Random Boolean Networks
130

Random Boolean Networks

Jan 30, 2016

Download

Documents

Vicky

Random Boolean Networks. Random Boolean Networks. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Random Boolean Networks

Random Boolean Networks

Page 2: Random Boolean Networks

Random Boolean Networks

Page 3: Random Boolean Networks

Random Boolean Networks

Attractors

A Boolean network has 2^N possible states. Sooner or later it will reach a previously visited state, and thus, since

the dynamics are deterministic, fall into an attractor. If the attractor has only a single state it is called a point

attractor, and if the attractor consists of more than one state it is called a cycle attractor. The set of states that

lead to an attractor is called the basin of the attractor. States with no incoming connections are called garden-of-

Eden states and the dynamics of the network flow from these states towards attractors. The time it takes to reach

an attractor is called transient time. (Gershenson 2004)

Random Boolean networks (RBNs) are known as NK networks or Kauffman

networks (Dubrova 2005). An RBN is a system of N binary-state nodes

(representing genes) with K inputs to each node representing regulatory

mechanisms. The two states (on/off) represent respectively, the status of a

gene being active or inactive. The variable K is typically held constant, but it

can also be varied across all genes, making it a set of integers instead of a

single integer. In the simplest case each gene is assigned, at random, K

regulatory inputs from among the N genes, and one of the possibleBoolean

functions of K inputs. This gives a random sample of the possible

ensembles of the NKnetworks. The state of a network at any point in time is

given by the current states of all N genes. Thus the state space of any such

network is 2^N.

Page 4: Random Boolean Networks

Genetic Algorithms

Chapter 9, Complexity: A Guided Tour

Page 5: Random Boolean Networks

Evolution by Natural Selection

Charles Darwin

Page 6: Random Boolean Networks

Evolution by Natural Selection

Charles Darwin

• Organisms inherit traits from parents

Page 7: Random Boolean Networks

Evolution by Natural Selection

Charles Darwin

• Organisms inherit traits from parents

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

Page 8: Random Boolean Networks

Evolution by Natural Selection

Charles Darwin

• Organisms inherit traits from parents

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

• Due to competition for limited resources, the organisms best adapted to the environment tend to produce the most offspring.

Page 9: Random Boolean Networks

Evolution by Natural Selection

Charles Darwin

• Organisms inherit traits from parents

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

• Due to competition for limited resources, the organisms best adapted to the environment tend to produce the most offspring.

• This way traits producing adapted individuals spread in the population

Page 10: Random Boolean Networks

Evolution by Natural Selection

• Organisms inherit traits from parents

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

• Due to competition for limited resources, the organisms best adapted to the environment tend to produce the most offspring.

• This way traits producing adapted individuals spread in the population

in computers

Computer programs

Charles Darwin

Page 11: Random Boolean Networks

Evolution by Natural Selection

• Organisms inherit traits from parents

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

• Due to competition for limited resources, the organisms best adapted to the environment tend to produce the most offspring.

• This way traits producing adapted individuals spread in the population

in computers

Computer programs

Charles Darwin

John Holland

Page 12: Random Boolean Networks

Evolution by Natural Selection

• Organisms inherit traits from parents

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

• Due to competition for limited resources, the organisms best adapted to the environment tend to produce the most offspring.

• This way traits producing adapted individuals spread in the population

in computers

Computer (e.g., programs)

Charles Darwin

John Holland

Genetic Algorithms (GAs)

Page 13: Random Boolean Networks

Some real-world uses of genetic algorithms

Page 14: Random Boolean Networks

Some real-world uses of genetic algorithms

• Used by GE to automate parts of aircraft design

Page 15: Random Boolean Networks

Some real-world uses of genetic algorithms

• Used by GE to automate parts of aircraft design

• Used by pharmaceutical companies to discover new drugs

Page 16: Random Boolean Networks

Some real-world uses of genetic algorithms

• Used by GE to automate parts of aircraft design

• Used by pharmaceutical companies to discover new drugs

• Used by the London Stock Exchange to automatically detect fraudulent trades

Page 17: Random Boolean Networks

Some real-world uses of genetic algorithms

• Used by GE to automate parts of aircraft design

• Used by pharmaceutical companies to discover new drugs

• Used by the London Stock Exchange to automatically detect fraudulent trades

• Used to generate realistic computer animation in the movies Lord of the Rings: The Return of the King and Troy

Page 18: Random Boolean Networks

Some real-world uses of genetic algorithms

• Used by GE to automate parts of aircraft design

• Used by pharmaceutical companies to discover new drugs

• Used by the London Stock Exchange to automatically detect fraudulent trades

• Used to generate realistic computer animation in the movies Lord of the Rings: The Return of the King and Troy

• Used to model and understand evolution in nature!

Page 19: Random Boolean Networks

Robby the Robot

Page 20: Random Boolean Networks

Example: Evolving Strategies for Robby the Robot

Page 21: Random Boolean Networks

Example: Evolving Strategies for Robby the Robot

Input: Contents of N, S, E, W,

C(Current)

Page 22: Random Boolean Networks

Example: Evolving Strategies for Robby the Robot

Input: Contents of N, S, E, W,

C(Current)

Possible actions:Move N

Move S

Move E

Move W

Move random

Stay put

Try to pick up can

Page 23: Random Boolean Networks

Example: Evolving Strategies for Robby the Robot

Input: Contents of N, S, E, W,

C(Current)

Possible actions:Move N

Move S

Move E

Move W

Move random

Stay put

Try to pick up can

Rewards/Penalties (points): Picks up can: 10

Tries to pick up can on empty site: -1

Crashes into wall: -5

Page 24: Random Boolean Networks

Example Strategy

Page 25: Random Boolean Networks

Encoding a Strategy

Code: MoveNorth = 0MoveSouth = 1MoveEast = 2MoveWest = 3StayPut = 4PickUpCan = 5MoveRandom = 6

Page 26: Random Boolean Networks

Encoding a Strategy

Code: MoveNorth = 0MoveSouth = 1MoveEast = 2MoveWest = 3StayPut = 4PickUpCan = 5MoveRandom = 6

Page 27: Random Boolean Networks

Encoding a Strategy

0

Code: MoveNorth = 0MoveSouth = 1MoveEast = 2MoveWest = 3StayPut = 4PickUpCan = 5MoveRandom = 6

Page 28: Random Boolean Networks

Encoding a Strategy

0 2

Code: MoveNorth = 0MoveSouth = 1MoveEast = 2MoveWest = 3StayPut = 4PickUpCan = 5MoveRandom = 6

Page 29: Random Boolean Networks

Encoding a Strategy

0 2 6

Code: MoveNorth = 0MoveSouth = 1MoveEast = 2MoveWest = 3StayPut = 4PickUpCan = 5MoveRandom = 6

Page 30: Random Boolean Networks

Encoding a Strategy

0 2 6 5 . . . 3 . . . 4

Code: MoveNorth = 0MoveSouth = 1MoveEast = 2MoveWest = 3StayPut = 4PickUpCan = 5MoveRandom = 6

Page 31: Random Boolean Networks

Encoding a Strategy

0 2 6 5 . . . 3 . . . 4

243 values

Code: MoveNorth = 0MoveSouth = 1MoveEast = 2MoveWest = 3StayPut = 4PickUpCan = 5MoveRandom = 6

Page 32: Random Boolean Networks

Genetic algorithm for evolving strategies for Robby

Page 33: Random Boolean Networks

Genetic algorithm for evolving strategies for Robby

1. Generate 200 random strategies (i.e., programs for controlling Robby)

Page 34: Random Boolean Networks

Random Initial Population

Page 35: Random Boolean Networks

Genetic algorithm for evolving strategies for Robby

1. Generate 200 random strategies (i.e., programs for controlling Robby)

2. For each strategy, calculate fitness (average reward minus penalties earned on random environments)

Page 36: Random Boolean Networks

Genetic algorithm for evolving strategies for Robby

1. Generate 200 random strategies (i.e., programs for controlling Robby)

2. For each strategy, calculate fitness (average reward minus penalties earned on random environments)

3. The strategies pair up and create offspring via “sexual recombination” with random mutations ― the fitter the parents, the more offspring they create.

Page 37: Random Boolean Networks

Parent 1:

Parent 2:

Page 38: Random Boolean Networks

Parent 1:

Parent 2:

Page 39: Random Boolean Networks

Parent 1:

Parent 2:

Child:

Page 40: Random Boolean Networks

Genetic algorithm for evolving strategies for Robby

1. Generate 200 random strategies (i.e., programs for controlling Robby)

2. For each strategy, calculate fitness (average reward minus penalties earned on random environments)

3. The strategies pair up and create offspring via “sexual recombination” with random mutations ― the fitter the parents, the more offspring they create.

4. Keep going back to step 2 until a good-enough strategy is found!

Page 41: Random Boolean Networks

My hand-designed strategy:

Page 42: Random Boolean Networks

My hand-designed strategy:

“If there is a can in the current site, pick it up.”

Page 43: Random Boolean Networks

My hand-designed strategy:

“If there is a can in the current site, pick it up.”

“Otherwise, if there is a can in one of the adjacent

sites, move to that site.”

Page 44: Random Boolean Networks

My hand-designed strategy:

“If there is a can in the current site, pick it up.”

“Otherwise, if there is a can in one of the adjacent

sites, move to that site.”

“Otherwise, choose a random direction to move in.”

Page 45: Random Boolean Networks

My hand-designed strategy:

“If there is a can in the current site, pick it up.”

“Otherwise, if there is a can in one of the adjacent

sites, move to that site.”

“Otherwise, choose a random direction to move in.”

Average fitness of this strategy: 346

(out of max possible ≈500)

Page 46: Random Boolean Networks

My hand-designed strategy:

“If there is a can in the current site, pick it up.”

“Otherwise, if there is a can in one of the adjacent

sites, move to that site.”

“Otherwise, choose a random direction to move in.”

Average fitness of this strategy: 346

(out of max possible ≈500)

Average fitness of GA evolved strategy: 486

(out of max possible ≈500)

Page 47: Random Boolean Networks

My hand-designed strategy:

“If there is a can in the current site, pick it up.”

“Otherwise, if there is a can in one of the adjacent

sites, move to that site.”

“Otherwise, choose a random direction to move in.”

Average fitness of this strategy: 346

(out of max possible ≈500)

Average fitness of GA evolved strategy: 486

(out of max possible ≈500)???

Page 48: Random Boolean Networks

One Run of the Genetic AlgorithmB

est

fitne

ss in

pop

ulat

ion

Generation number

Page 49: Random Boolean Networks

Generation 1

Best average score = −81

Page 50: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 0 Score: 0

Page 51: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 1 Score: 0

Page 52: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 2 Score: −5

Page 53: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 2 Score: −5

Page 54: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 3 Score: −10

Page 55: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 3 Score: −10

Page 56: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 4 Score: −15

Page 57: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 4 Score: −15

Page 58: Random Boolean Networks

Generation 10

Best average score = 0

Page 59: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 0 Score: 0

Page 60: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 1 Score: 0

Page 61: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 2 Score: 0

Page 62: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 3 Score: 0

Page 63: Random Boolean Networks

Generation 200

Fitness = 240

Page 64: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 0 Score: 0

Page 65: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 1 Score: 0

Page 66: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 2 Score: 0

Page 67: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 3 Score: 10

Page 68: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 4 Score: 10

Page 69: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 5 Score: 20

Page 70: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 6 Score: 20

Page 71: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 7 Score: 20

Page 72: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 8 Score: 20

Page 73: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 9 Score: 20

Page 74: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 10 Score: 20

Page 75: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 11 Score: 20

Page 76: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 12 Score: 20

Page 77: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 13 Score: 20

Page 78: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 14 Score: 30

Page 79: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 15 Score: 30

Page 80: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 16 Score: 40

Page 81: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 17 Score: 40

Page 82: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 18 Score: 50

Page 83: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 19 Score: 50

Page 84: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 20 Score: 60

Page 85: Random Boolean Networks

Generation 1000

Fitness = 492

Page 86: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 0 Score: 0

Page 87: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 1 Score: 0

Page 88: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 2 Score: 10

Page 89: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 3 Score: 10

Page 90: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 4 Score: 20

Page 91: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 5 Score: 20

Page 92: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 6 Score: 20

Page 93: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 7 Score: 20

Page 94: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 8 Score: 20

Page 95: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 9 Score: 30

Page 96: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 10 Score: 30

Page 97: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 11 Score: 40

Page 98: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 12 Score: 40

Page 99: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 13 Score: 50

Page 100: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 14 Score: 50

Page 101: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 15 Score: 60

Page 102: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 16 Score: 60

Page 103: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 17 Score: 70

Page 104: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Time: 18 Score: 70

Page 105: Random Boolean Networks

Why Did The GA’s Strategy Outperform Mine?

Page 106: Random Boolean Networks

My Strategy

Page 107: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 108: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 109: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 110: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 111: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 112: Random Boolean Networks

The GA’s Evolved Strategy

Page 113: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 114: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 115: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 116: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 117: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 118: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 119: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 120: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 121: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 122: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 123: Random Boolean Networks

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7 8 9

Page 124: Random Boolean Networks

Principles of Evolution Seen in Genetic Algorithms

Page 125: Random Boolean Networks

Principles of Evolution Seen in Genetic Algorithms

• Natural selection works!

Page 126: Random Boolean Networks

Principles of Evolution Seen in Genetic Algorithms

• Natural selection works!

• Evolution proceeds via periods of stasis “punctuated” by periods of rapid innovation

Page 127: Random Boolean Networks

Principles of Evolution Seen in Genetic Algorithms

• Natural selection works!

• Evolution proceeds via periods of stasis “punctuated” by periods of rapid innovation

Bes

t fit

ness

in p

opul

atio

n

Generation number

Page 128: Random Boolean Networks

Principles of Evolution Seen in Genetic Algorithms

• Natural selection works!

• Evolution proceeds via periods of stasis “punctuated” by periods of rapid innovation

• Exaptation is common

Page 129: Random Boolean Networks

Principles of Evolution Seen in Genetic Algorithms

• Natural selection works!

• Evolution proceeds via periods of stasis “punctuated” by periods of rapid innovation

• Exaptation is common

• Co-evolution speeds up innovation

Page 130: Random Boolean Networks

Principles of Evolution Seen in Genetic Algorithms

• Natural selection works!

• Evolution proceeds via periods of stasis “punctuated” by periods of rapid innovation

• Exaptation is common

• Co-evolution speeds up innovation

• Dynamics and results of evolution are unpredictable and hard to analyze