Genetic Algorithms: A stochastic evolutionary technique based on human genetics.
The Environment is “created” by defining the workspace i.e. the 2D min and max of the coordinates (x,y); there are 7 obstacles and path points labeled 0-15 i.e. 16 path points; Starting Position is 0 and End-Point is 15 (see figure).
Note that link points in table are 1 through 16 and in adjoining image they are from 0 to 15.
The “fitness” of a path is the inverse of the length of the path from starting point to end-point
Fitness(iPath) = 1.0/DistanceInPath(iPath)
No. of chromosomes: NC=20
For each iteration select 40% of these i.e. 8 chromosomes
No. of Bits NBITS = log NPTS /log 2 = log 16 / log 2 = 4
If there are 1024 points, then NBITS = log 1024/log 2 = 10
CHR_LEN=(NOBS+2)*NBITS = (7+2)*4 = 36 for 7 obstacles and 4 bits
CHR_LEN = (7+2)*10=900 for 7 obstacles and 10 bits
A Path is generated by selected points from a specified start-point to a specified end-point.
An optimal solution is obtained by generating an initial population of chromosomes (paths consisting of path points), computing their “fitness” to select “best” parents for producing the “next generation” of chromosomes by carrying out evolutionary procedures of cross-over and mutation. The procedure is continued until no further improvement is possible; this is called “convergence” which corresponds to an “optimal” solution.