Video summary
Lec 13 GA Operators
Main summary
Key takeaways
Main Ideas
The lecture explains three stochastic search methods: genetic algorithms (GAs), tabu search, and simulated annealing. It begins with the operators and design choices used in a GA, then describes the other two methods.
1. Genetic Algorithms
A simple GA works with a population of candidate solutions, initially represented as binary strings. Each generation is formed by selecting candidates, combining them, and sometimes changing individual bits.
Selection
Selection favors candidates with higher fitness, giving them a greater chance of contributing to the next generation. Lower-fitness candidates may disappear.
- Roulette-wheel selection: Each candidate receives a slice of the wheel proportional to its fitness. A candidate with a larger slice is more likely to be selected. Because selection is stochastic, a candidate may be selected more or fewer times than its expected share.
- Deterministic sampling: For each candidate, divide its fitness by the total population fitness and multiply by the population size. The integer part determines the number of copies assigned directly to the next generation. Fill the remaining places using the fractional remainders.
- Remainder stochastic sampling: Make the deterministic integer assignments, then fill the remaining places through stochastic selection based on the fractional remainders.
- Sampling with replacement: After selection, a candidate remains available for further selection.
- Sampling without replacement: A selected candidate’s subsequent chance of selection is reduced or removed. The lecture describes one version in which its fitness is reduced by 0.5 after selection.
- Stochastic tournament: Draw two candidates independently using roulette-wheel selection; the one with higher fitness wins a place in the next generation.
The lecture illustrates fitness-proportional selection with four candidates whose fitnesses are 36, 144, 81, and 9. Their shares of total fitness are approximately 13.3%, 53.3%, 30%, and 3.3%, respectively.
Crossover
Crossover combines two selected strings to create new candidates.
- Single-point crossover: Choose one position in both strings and swap the portions after that point.
- Multi-point crossover: Choose several positions, then alternate between leaving segments unchanged and swapping them between the two strings.
- Uniform crossover: Decide independently at each position whether to swap the two bits. The lecture describes this as a coin toss, with a 0.5 chance of swapping at each position.
- Crossover probability: Crossover is applied according to a probability that the lecture says is often high—roughly 0.6 to 0.9.
Crossover is intended to recombine useful parts of candidate solutions and explore new regions of the search space.
Mutation
Mutation changes a selected element of a candidate. In binary encoding, it flips a bit from 0 to 1 or from 1 to 0 according to a mutation probability.
Fitness and a GA Generation
Fitness measures the quality of a candidate and guides selection. The lecture’s example maximizes (x^2) for values from 0 to 31 encoded as binary strings. A simple generation proceeds as follows:
- Create a random population.
- Decode each string and evaluate its fitness.
- Select candidates for the next generation.
- Apply crossover to selected pairs.
- Apply mutation to some bits.
- Evaluate the resulting population and compare its total, average, and maximum fitness with those of the previous generation.
The example illustrates that the new population’s fitness can improve after selection, crossover, and mutation. It is an illustration, not a guarantee that every generation will improve.
Representations and Population Models
- Representation depends on the problem. Candidates may use integers or floating-point values as well as binary strings. Problems such as the traveling-salesman problem need a representation that encodes a valid tour, such as an ordering of cities without repetitions.
- Generational GA: Replaces the whole population each generation.
- Steady-state GA: Replaces only one or a few candidates at a time.
- Generation gap: Describes the fraction of the population replaced in a generation.
- Elitism: Copies the best candidate from one generation into the next, preserving it.
- Problem-informed initialization: When useful knowledge about the problem is available, it can be used to seed the initial population rather than relying entirely on random candidates.
The lecture names applications including control design, scheduling, robotics, signal processing, game playing, neural-network design, and improving classification systems.
2. Tabu Search
Tabu search works with one current solution at a time. It generates neighboring candidates, evaluates them, and moves to a good available neighbor. A tabu list records recent solutions or moves to discourage cycling back to them.
A high-level procedure is:
- Choose an initial current solution, evaluate it, and record it as the best solution found so far.
- Generate a set of trial neighbors and evaluate them.
- Order the neighbors by their objective value.
- Select the best neighbor that is not tabu.
- A tabu move may still be accepted if it satisfies the aspiration criterion—for example, if it improves on the best solution found so far.
- Update the current solution and add the departed solution or move to the tabu list.
- If the list exceeds its set size, remove the oldest entry.
- Repeat for the chosen number of iterations, then return the best solution encountered.
The tabu list helps prevent the search from revisiting recent configurations. The aspiration criterion allows an otherwise forbidden move when it is sufficiently promising.
3. Simulated Annealing
Simulated annealing also maintains one current solution, but it can sometimes accept a worse neighbor. This helps it escape local optima. The method is inspired by the gradual cooling of materials during annealing.
For a minimization problem:
- Start with an initial solution, a temperature (T), and a record of the best solution found.
- Generate a neighboring solution and calculate the change in objective value, (\Delta).
- If the neighbor is better ((\Delta < 0)), accept it.
- If it is worse, accept it with probability (e^{-\Delta/T}), by drawing a random number and comparing it with that probability.
- Repeat neighbor proposals at the current temperature for a chosen number of iterations.
- Lower the temperature according to a cooling schedule, then continue.
- Stop when the temperature falls below a specified final value and return the best solution found.
At high temperatures, worse solutions are more likely to be accepted. As the temperature falls, that probability decreases. Unlike a GA, simulated annealing does not maintain a population, so it stores comparatively little.
The lecture closes by noting that swarm intelligence will be covered later and genetic programming in the next session.
Speakers and Sources
- Speaker: An unnamed lecturer presenting the course material.
- Source: NPTEL, Indian Institute of Science, Bengaluru (the channel identified in the video metadata).
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.