0% found this document useful (0 votes)
39 views3 pages

SC - DPT - Answer Key

The document discusses chromosome encoding schemes used in genetic algorithms. It describes several encoding schemes such as binary, octal, hexadecimal, permutation, value and tree encoding. Each encoding scheme represents solutions to optimization problems in a different way, such as using strings of 1s and 0s in binary encoding or real numbers to represent weights in value encoding. The key is to choose an encoding that closely matches the natural representation of the problem being solved.

Uploaded by

Mohamed Shaaheen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views3 pages

SC - DPT - Answer Key

The document discusses chromosome encoding schemes used in genetic algorithms. It describes several encoding schemes such as binary, octal, hexadecimal, permutation, value and tree encoding. Each encoding scheme represents solutions to optimization problems in a different way, such as using strings of 1s and 0s in binary encoding or real numbers to represent weights in value encoding. The key is to choose an encoding that closely matches the natural representation of the problem being solved.

Uploaded by

Mohamed Shaaheen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Soft Computing

DPT Answer Key

1. Define optimization

Optimization is the process of making something better. Optimization refers to


finding the values of inputs in such a way that we get the “best” output values. The
definition of “best” varies from problem to problem, but in mathematical terms, it
refers to maximizing or minimizing one or more objective functions, by varying
the input parameters.
2. List five phases in Genetic Algorithm.

Five phases are considered in a genetic algorithm.


1. Initial population
2. Fitness function
3. Selection
4. Crossover
5. Mutation

3. Explain in detail about chromosome encoding schemes?

Chromosome Encoding Schemes:

Encoding of chromosomes is the first step in solving the problem and it depends
entirely on the problem heavily.

The process of representing the solution in the form of a string of bits that
conveys the necessary information. just as in a chromosome, each gene controls
particular characteristics of the individual, similarly, each bit in the string
represents characteristics of the solution.

 Encoding is the process of representing the solution in the form of a string that
conveys the necessary information. It is a process of representing individual genes.
The process can be performed using bits, numbers, trees, array or any other
objects.

 Just as in a chromosome, each gene controls a particular characteristic of the


individual; similarly, each bit in the string represents a characteristic of the
solution.

 When choosing an encoding method rely on the following key ideas:


1. Use a data structure as close as possible to the natural representation.
2. Write appropriate genetic operators as needed.
3. If possible, ensure that all genotypes correspond to feasible solutions.
4. If possible, ensure that genetic operators preserve feasibility

Binary Encoding

 Most common method of encoding. Chromosomes are strings of 1s and 0s and


each position in the chromosome represents a particular characteristic of the
problem. The length of the string is usually determined according to the desired
solution accuracy.

Chromosome A 110100011010
Chromosome B 011111111100

 Octal encoding : This encoding uses string made up of octal numbers 0 to 7.


Chromosome A 03467216
Chromosome B 15723314

 Hexadecimal encoding : This encoding uses string made up of hexadecimal


numbers 0 to 9 and A to F.
Chromosome A 9CE7
Chromosome B 3DBA

Permutation Encoding
 Useful in ordering problems such as the Traveling Salesman Problem (TSP).
Example : In TSP, every chromosome is a string of numbers, each of which
represents a city to be visited.

 Permutation encoding is used in scheduling and ordering problems. Every


chromosome is a string of numbers, which represents numbers in a sequence. The
kind of encoding usually needs to make some corrections after the crossover and
mutation operating procedures because any transformation might create an illegal
situation.

Chromosome A 1 5 3 2 6 4 7 9 8
Chromosome B 8 5 6 7 2 3 1 4 9

 Example of problem : Traveling Salesman Problem (TSP).

 The problem : There are cities and given distances between them. Traveling
salesman has to visit all of them, but he does not to travel very much. Find a
sequence of cities to minimize traveled distance.
Encoding : Chromosome says order of cities, in which salesman will visit them.

Value Encoding

 Used in problems where complicated values, such as real numbers, are used and
where binary encoding would not sufficient. It is good for some problems, but
often necessary to develop some specific crossover and mutation techniques for
these chromosomes.

 Example of problem : Finding weights for neural network.

 The problem : There is some neural network with given architecture. Find
weights for inputs of neurons to train the network for wanted output.

 Encoding : Real values in chromosomes represent corresponding weights for


inputs.

Chromosome A 1.2324 5.3243 0.4556 2.3293 2.4545


Chromosome B ABDJEIFJDHDIERJFDLDFLFEGT
Chromosome C (back), (back), (right), (forward), (left)

Tree Encoding

 In tree encoding every chromosome is a tree of some objects, such as functions


or commands in programming language. It is used in genetic programming.
 Example of problem : Finding a function from given values.
 The problem : Some input and output values are given. Task is to find a
function, which will give the best (closest to wanted) output to all inputs.
 Encoding : Chromosome is functions represented in a tree.

You might also like