rmi workshop genetic algorithms
Skip this Video
Download Presentation
RMI Workshop - Genetic Algorithms

Loading in 2 Seconds...

play fullscreen
1 / 41

RMI Workshop - Genetic Algorithms - PowerPoint PPT Presentation

  • Uploaded on

RMI Workshop - Genetic Algorithms. Genetic Algorithms and Related Optimization Techniques: Introduction and Applications. Kelly D. Crawford ARCO Crawford Software, Inc. Other Optimization Colleagues. Donald J. MacAllister ARCO Michael D. McCormack Richard F. Stoisits

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'RMI Workshop - Genetic Algorithms' - MikeCarlo

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
rmi workshop genetic algorithms
RMI Workshop - Genetic Algorithms

Genetic Algorithms and Related Optimization Techniques: Introduction and Applications

Kelly D. Crawford


Crawford Software, Inc.

other optimization colleagues
Other Optimization Colleagues

Donald J. MacAllister


Michael D. McCormack

Richard F. Stoisits

Optimization Associates, Inc.

a no hype introduction to genetic algorithms ga
A “no hype” introduction to genetic algorithms (GA)

What every “intro to GAs” talk begins with:

- Biology

- Evolution

- Survival of the fittest

What I am not going to talk about:

- Biology

- Evolution

- Survival of the fittest

- Exception: nomenclature/jargon

It’s not about biology - it’s about search!



Given a potential solution vector to some problem: x

Any set of constraints on x: Ax  b

And a means to assess the relative worth of that solution: f(x)

(which may be continuous or discrete)

Optimization describes the application of a set of proven techniques

that can find the optimal or near optimal solution to the problem.

Examples of optimization techniques:

Genetic algorithms, genetic programming, simulated annealing,

evolutionary programming, evolution strategies, classifier systems,

linear programming, nonlinear programming, integer programming,

pareto methods, discrete hill climbers, gradient techniques,

random search, brute force (exhaustive search), backtracking,

branch and bound, greedy techniques, etc...


Optimization Application Examples at ARCO

Gas lift optimization (Ashtart):

x: Amount of gas injected into each well

Ax  b: Max total gas available, max water produced

f(x): Total oil produced

Technique: Learning bit climber

Free Surface Multiple Suppression:

x: Inverse source wavelet

Ax  b: Min/max wavelet amplitudes

f(x): Total seismic energy after wavelet is applied

Technique: Genetic algorithm and learning bit climber


What to look for in an Optimization Technique

Convergent techniques:

continuous: Gradient search, linear programming

discrete: Integer programming, gradient estimators

Ok for search spaces with asingle peak/trough

Divergent techniques:

Random search, brute force (exhaustive search)

Ok for small search spaces

Hard problems (large search spaces, multiple peaks/troughs)

need both convergent and divergent behaviors

Genetic algorithms, simulated annealing, learning hill climbers, etc.

These techniques can exploit the peaks/troughs, as well as

intelligently explore the search space.


Convergent and Divergent Behaviors

Need a balanced combination of both

convergent ( ) and divergent ( )

behaviors to find solutions in

complicated search spaces.


Genetic Algorithms - A Sample Problem

  • Ashtart gaslift optimization
  • 24 wells - Offshore Tunisia
  • Given: A fixed amount of gas for injection
  • Question: What is the right amount of gas to inject into each well to maximize oil production?
lift gas optimization

Gathering Lines


Lift Gas

Production Well

Lift Gas Optimization

Lift Gas Curve

  • Objective
    • Maximize oil production rate.
    • No capital expenditures.

Total Oil


Total lift gas









Genetic Algorithms - Representing a Solution









Well 1

Well 12

Well 24


10 01010011

00 11011010



Genetic Algorithms - Crossover and Mutation

  • Genetic Operations on Chromosomes - Crossover



00 01010011

10 11011010

  • Genetic Operations on Chromosomes - Mutation

x = 1001010011010……0000101001111010011110……10011100101100

f(x) ==> 19020.234789

Genetic Algorithms - Evaluating a Solution’s Fitness

So just how good are you, kid…?

Total Daily Oil Production for the Field


















Genetic Algorithms - The Process





Crossover and Mutation






what are the necessary requirements for using a ga
What are the necessary requirements for using a GA?

When you need…

...some way to represent potential solutions to a problem

(representation: bit string, list of integers or floats,

permutation, combinations, etc).

...some way to evaluate a potential solution resulting in a

scalar. This will be used by the GA to rank the worth of

a solution. This fitness (or evaluation) function needs to

be very efficient, as it may need to be called thousands -

even millions - of times.

But you do not need...

...the final solution to be optimal.

...speed (this varies)

when should you not use a ga
When should you not use a GA?


...you absolutely must have the optimal solution

to a problem.

...an analytical or empirical method already exists

and works adequately (typically means the problem

is unimodal, having only a single “peak”).

...evaluating a potential solution to your problem

takes a long time to compute.

...there are so few potential solutions that you can

easily check all of them to find the optimum

(small search spaces).


Earth Model Showing Primary Reflections

Seismic Trace




Earth Model with Surface Multiple Reflections

Seismic Trace




What appears as reality, but isn’t!


Estimating the Inverse Source Wavelet
























Seismic Surface Multiple Attenuation Using a GA

Input Data

After Multiple Removal

another example kuparuk material balance
Another Example - Kuparuk Material Balance

Production Well

Injection Well

Injection Well

the material balance problem
The Material Balance Problem

Production Well

Injection Well

Each producer may get fluids from multiple patterns.

Each injector may put fluids into multiple patterns.

This is a diagram of a single pattern showing 16 allocation factors.

The entire field has between 3000 to 7000 allocation factors,

represented using 10 bits each.

normalized solution vectors
Normalized Solution Vectors

.01 .56

.22 .21

= 1

Several normalized


= 1

.33 .41


= 1

.18 .32

.25 .09


.01 .56

.22 .21

.33 .41


.18 .32

.25 .09


…combined into one chromosome

normalization example
Normalization Example

Actual Chromosome Before Normalization

.5 .8

.2 .3

.4 .3


Group 1

Group 2

.33 .53

.14 .16

.21 .16


Translated Chromosome After Normalization

initial solution attempt
Initial Solution Attempt
  • Simple floating-point genetic algorithm:
    • generational model
    • 1-point crossover
  • Worked ok for a 9 pattern simulated field (small)
  • Estimated time required for full field: 1 month on an SGI workstation; 10 months on 167 MHz PC.
  • Back to the drawing board...
  • When done the traditional way (by hand), this problem was already taking 10 man-months (spread out across a number of drill-site engineers)
formulating the problem as a string of bits
Formulating the problem as a string of bits

A potential solution to this problem consists of a list

containing both allocation factors and pressures, each

of which are floating point values

Any single allocation factor or pressure, x, has a range

of [0..1]. Assuming we need a resolution of ~ 0.01, we

can represent each x using 10 bits.

0.01 0.23 0.82 0.53 ...

0011011010 1010011011 1001101010 1010011010 ...

material balance second try
Material Balance - Second Try
  • Bit encoded genetic algorithm
    • Steady-state model
    • Uniform crossover
  • Much faster on this particular problem (10x)
  • Added gray coding
  • Gained additional performance (20x)
  • Everything we tried from this point on worked with varying degrees of performance.
some insights
Some Insights
  • Since we are normalizing subsets within the chromosome, crossover is a potentially destructive operation. What if we just used mutation instead.
  • In fact, what if we only used mutations that probabilistically tended to result in smaller changes to the chromosome, resulting in less disruption, and perhaps better convergence?
an example
An Example

Before normalization

After normalization


.4 .3



.21 .16


Current state


.4 .2



.22 .11


Small change


0 -.1



+.01 -.05




.4 .9



.16 .36


Large change


.0 +.7



-.06 +.25



material balance third and fourth try
Material Balance - Third and Fourth Try
  • Used a standard bit climber:
    • flip a bit
    • evaluate
    • if fitness is worse, unflip the bit
    • if we get stuck, scramble some number of bits and restart
  • Performed even better
  • Perhaps the problem is not as complex as we had once thought...?
  • Used a modified bit climber:
    • flip bits according to changing probabilities
  • 200x speedup over the original version
  • Project now feasible
gradient slope derivative
Gradient = Slope = Derivative

Continuous, Differentiable





gradient estimator
Gradient Estimator

Noncontinuous, Nondifferentiable,

but we can estimate the gradient

g(a-) vs g(a)





g(a) vs g(a+)






what are bit climbers
What are bit climbers?

Essentially a hill climber, but there is no analytical

information about what direction is “up” (i.e., no gradient,

or derivative). Instead, you sample neighboring points.

Bit Climber Algorithm:

Randomly generate a string of bits, X

Evaluate f(X)

Loop (until stopping criteria satisfied)

Randomly select a bit position, j, in X, and “flip” it

(i.e., if X(j) == 1, set to 0, and vice versa)

Evaluate the new f(X)

If fitness is worse, “unflip” X(j) (put it back like it was)

End Loop

keeping the changes to a minimum
Keeping the changes to a minimum

The bit climber does not attempt to avoid large changes to the chromosome (a single bit flip can result in a large overall change).

10010101 10010101 01010010



A simple heuristic: Assign high probabilities to the

low order bits, low probabilities to the high order bits.

the modified bit climber
The Modified Bit Climber
  • Generate and evaluate a random bit string
  • Do until stopping criteria satisfied:
    • Randomly select a bit position, k
    • Randomly generate p from 0..1
    • If p < probability of flipping bit k:
      • Flip the k’th bit
      • Evaluate the new string
      • If fitness is worse, unflip the bit
    • If count exceeds a threshhold, rerandomize the string
  • Avoids making large changes to the bit string
  • Worked much better than standard bit climber for this particular problem
don t backtrack
Don’t backtrack

10010101 10010101 01010010



Another simple heuristic: Multiply a bit’s flipping

probability by .25 (give or take) when we flip it.

This decreases the likelihood of ever flipping it again.

adding a bit of memory tabu search
Adding a bit of memory (Tabu Search?)
  • Generate and evaluate a random bit string
  • Do until stopping criteria satisfied:
    • Randomly select a bit position, k
    • Randomly generate p from 0..1
    • If p < probability of flipping bit k:
      • Flip the k’th bit
      • Evaluate the new string
      • If fitness is worse, unflip the bit
      • Else, decrease the probability for this bit
    • If count exceeds a threshhold, rerandomize the string
  • Avoids undoing changes to the bit string
  • Avoids making large changes to the bit string
  • Worked better than the modified bit climber for this particular problem
problem with the memory technique
Problem with the “memory” technique
  • It gets stuck when the probabilities get too low
  • But, based on the probabilities, we can compute a mean and standard deviation for each gene representing the most likely change that would occur if we kept looking for a bit that we could flip.
  • In other words, we can simulate the modified bit climber using a simple statistical analysis.
  • This leads us to a much simpler, much faster algorithm that never gets stuck - a floating point, “bit” climber!
a floating point bit climber
A floating point “Bit” climber
  • Randomly generate and evaluate a float string
  • Compute  and  based on each gene’s probabilities (a gene is a group of bits, say 10)
  • Until stopping criteria satisfied:
    • Select a single string position, i
    • Generate a mutation value as N(, )
    • Add mutation value to string(i)
    • Evaluate the new string
    • If fitness is worse, undo the mutation
    • Else, recompute  and  for that gene
    • If count exceeds a threshhold, rerandomize the string
  • 10x faster than other bit climbers tested (2000x faster than original solution)
  • ARCO has had many technical successes in the use of Genetic Algorithms and related technologies
  • The modified bit climber with memory has worked well in most, but not all, of the applications we’ve tried at ARCO: material balance, gaslift optimization (except one) and seismic multiple suppression.
  • ARCO will no longer exist, per se, after this year. The new name: BP Amoco
  • Could these events be related…nahhhhh!
ga oil related publications
GA/Oil-Related Publications
  • McCormack, Michael D., Donald J. MacAllister, Kelly D. Crawford, Richard J. Stoisits, “Maximizing Production from Hydrocarbon Reservoirs Using Genetic Algorithms”, The Leading Edge (SEG, Tulsa, OK, 1999).
  • Crawford, Kelly D., Michael D. McCormack, Donald J. MacAllister, “A Probabilistic, Learning Bit Climber for Normalized Solution Spaces”, GECCO 1999.
  • Stoisits, Richard J., Kelly D. Crawford, Donald J. MacAllister, Michael D. McCormack, A. S. Lawal, D. O. Ogbe. “Production Optimization at the Kuparuk River Field Utilizing Neural Networks and Genetic Algorithms”, SPE paper 52177 (OKC, OK, 1998).