L5 - Encoding / Representation Flashcards

1
Q

Define what is meant by encoding?

A

Encoding is the way in which we represent solutions such that they can be analysed, interpreted and evolved by algorithms.

We want to encode our solution as a number of genes or nodes within a certain length.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is encoding / representation considered one of the biggest issues in Evolutionary Computing?

A

There can be a huge variety of encodings of solutions to a problem. Thus, the choice of encoding determines the search space.

Also, a chosen encoding schema will generate a different fitness landscape than another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some types that we can encode our solutions with?

A

Integers, Real Numbers, Binary Strings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does it mean if we have a K-ary encoding of length L?

A

It means that for every element in the list, the gene can be a value between 0 and K.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Given the solution [A,B,C,D,E,F] in the TSP where K = A to F and the program contraint is only visiting each node once. Perform a single gene mutation such that the child is an invalid solution. Why is the child invalid?

A

[A,B,C,D,E,D]

We have visited gene D twice. Given the problem constraints of the TSP, this is not a viable solution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Given the solution [A,B,C,D,E,F] and K is the A to F, perform a swap gene mutation such that the child is a valid solution.

A

[A,B,F,D,E,C]

Swapped F and C to generate a mutated solution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When performing a Crossover mutation on 2 solutions, in what scenario would the child solutions be rendered invalid?

A

If in both solutions, we visit one of the genes multiple times, thus, not accounting for all the possible genes within K.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 2 solutions to a 1 point cross over generating invalid child solutions?

A
  • Implement a better crossover function.
  • Implement a crossover with a fix.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is meant by solution validity in regards to the problems constraints?

A

A problem will have constraints that the solutions must adhere to. For example, in the TSP, each node must be visited once and only once. Thus, any solution must contain all values of K once and only once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define the following mutation functions:
Single Mutation
Swap Mutation
Crossover Mutation

A

Single Mutation : Choose a gene at random and swap it for some random K.

Swap Mutation : Swap 2 genes within the solution.

Crossover : Given 2 parents, create 2 child solutions from swapping the tails of solutions at certain points. This can be 1-point, 2-point, or uniform using a binary mask.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define indirect encoding… Give an example of how indirect encoding would be used on generating a timetable for exams.

A

Indirect encoding defines a process of generating solutions based on a set of rules.

For example, when generating an exam timetable, we want exams of specific modules not to be on the same date or consecutive days. Thus, we define a process which generates solutions based on these rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define the difference between Direct and Indirect encoding?

A

Direct Encoding : Parameters / Genes of a solution are directly input in a one to one mapping. This direct approach is often used in simpler solutions.

Indirect Encoding : Solutions are generated and encoded based on a set of rules. This is a more abstract approach for more complex problems where we want to encode away from solutions with undesirable features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the pros and cons of direct and indirect encoding?

A

Direct:
- Fast interpretation, Simpler.

  • Doesn’t reduce search space area of interest.

Indirect:
- Cuts down size of search space, remove solutions with undesirable features.

  • Slow interpretation.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Give an example of a real world encoding problem…

A

The nozzle.

Split the nozzle into sections Z1 and Z2, such that L was Z1 + Z2. Each section could fluctuate in diameter between 0.1 and 2, thus K was 2.

From this, we can see how the real world object of a nozzle could be broken down into the core components of K and L of a genetic solution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly