Thursday, August 7, 2008

Evalation of a GA-string

  • In order to use GA’s to solve the above problem, variables xi’s are first coded in some string structures.I used a binary coded GA.
eg: 11101 11100 corresponding to x1 and x2.

  • Then we could find the values of x(i) using the linear mapping rule as follows:

x(i) = x(l) + [ ( ( x(u) - x(l) ) / ( 2^l - 1 ) ) *dv(s)].

where dv(s) is the decoded decimal value of the string.

  • substitute the values of x(i) in the respective f(x).
  • CALCULATE FITNESS FUNCTION
F(X) = 1/1+f(X)
  • CALCULATE A = ACTUAL FITNESS/AVERAGE FITNESS(EXPECTED COUNT)
  • CALCULATE PROBABILITY OF SELECTION (B) = EXPECTED COUNT/TOTAL NO OF CHROMOSOMES
  • CALCULATE CUMULATIVE PROBABILITY (C).
  • GENERATE RANDOM NO BETWEEN 0 AND 1 (D)
  • DETERMINE THE INTERVAL WHERE THE RANDOM NUMBER
LIES E=l2.

  • TRUE COUNT OF STRINGS TO BE
IN MATING POOL (F)

No comments: