Answers to genetic algorithm questions

Question 1

Table 1 shows a population of strings. Assuming that the string represents a binary encoding of a number n, and that the fitness function is given by $F_{i}=\frac{100}{n}$ , fill in the rest of the table using a suitable procedure such as the roulette wheel algorithm to generate a mating pool. Having done this, complete Table 2 by randomly selecting mates and single crossover sites to generate a new population. Calculate Fi for each member of the new population. Is this an improvement? (E.g has the average population fitness improved? How do the best-performing members compare?)

Previous average population fitness = 9.93, new average population fitness = 12.82. Previous best performer had fitness 14.29, new best performer has fitness 20.0. Yes, this is an improvement. (1 mark - other marks given in the table captions.)


Table 1: Table for question 1. Column 6 (and hence also 7) is generated randomly and will vary, but should be broadly consistent with the probabilities calculated in column 5. These numbers are for demonstration. 1 mark for filling in each column correctly.
String no. String n Fi $\frac{F_{i}}{\Sigma{}F_{i}}$ No. surviving Mating pool
1 10111 23 4.35 0.109 0 00111
2 00111 7 14.29 0.359 2 00111
3 01001 9 11.11 0.279 2 01001
4 01010 9 10.0 0.252 0 01001


Table 2: Table for question 1. These numbers are generated randomly and will vary. As long as everything makes sense, 1 mark each for filling in columns 2, 3, 4 and 6 correctly (i.e. not the mating pool or n).
Mating pool Mate Crossover site New population n New Fi
00111 3 1 01001 9 11.11
00111 4 3 01001 9 11.11
01001 1 1 00101 5 20.0
01001 2 3 01011 11 9.09

Question 2

A Bayesian neural network has been trained for the yield stress σy of stainless steel. The inputs to the neural network are listed in Table 3.

  1. Write down a suitable chromosome for the optimisation of this model.
  2. Assume a target yield stress σy,target is desired, with low uncertainty. Write down a suitable fitness function Fi.
  3. Draw up a flowchart showing the steps a genetic algorithm optimisation would take for this network model.

Remember to include some way of preventing non-physical values, and a suitable termination condition.

  1. Chromosome could be {Cr, Ni, Mo, Mn, Si, Nb, Ti, V, Cu, N, C, Theat, theat, Ttest}. Ratio and ln(theat) should not be included, as they are derived from other inputs and can be generated during decoding of the chromosome. Including them would lead to a non-physical input set after crossover and mutation. (2 marks)
  2. $F_{i}=\frac{1}{\sigma_{i}}$ where $\sigma_{i}^{2}=\frac{1}{L}\sum_{l}\sigma_{y,i}^{(l)^{2}}+(\sigma_{y,\mathrm{target}}-f_{i})^{2}$ would do (L is the number of models in the predicting committee, $\sigma_{y}^{(l)}$ is the uncertainty associated with the prediction of each committee member l, t is the target output for the optimisation, and fi is the committee prediction). This includes the target value and the uncertainties. Also possible would be a variation that includes penalties for non-physical input values such as C=-0.1, or similar. (2 marks for including both uncertainty and target in a suitable way)
  3. See diagram. Important points are that:

A suitable termination condition might be the satisfaction of the target, or a set period of time/number of cycles, whichever comes first. Satisfaction of the target alone gets no marks; the algorithm might run forever. (2 marks)


Table 3: Inputs to the neural network for question 2.
Input Definition
Cr Chromium (wt %)
Ni Nickel (wt %)
Mo Molybdenum (wt %)
Mn Manganese (wt %)
Si Silicon (wt %)
Nb Niobium (wt %)
Ti Titanium (wt %)
V Vanadium (wt %)
Cu Copper (wt %)
N Nitrogen (wt %)
C Carbon (wt %)
Ratio Ti and Nb stabilisation ratio $\frac{(\mathrm{Ti}/4)+(\mathrm{Nb}/8)}{\mathrm{C}+\mathrm{N}}$
Theat Heat treatment temperature (K)
theat Heat treatment time (hr)
ln(theat) Natural log of theat
Ttest Tensile test temperature (K)

Figure 1: Genetic algorithm flowchart.
Flow chart

Connections

Return to the questions page.

To return the the Genetic Algorithms page click here.

Acknowledgements

The creation of this document was supported by the Higher Education Funding Council for England, via the U.K. Centre for Materials Education.


June 5th 2006



Superalloys Titanium Bainite Martensite Widmanstätten ferrite
Cast iron Welding Allotriomorphic ferrite Movies Slides
Neural Networks Creep Mechanicallly Alloyed Theses

PT Group Home Materials Algorithms Any Valid CSS!