- Asked 2/12
- 2071 Magh · 2+8 marks
- 2072 Magh · 2+6+2 marks
Machine learning, GA, operators, areas
Short answer
Machine learning is a field where systems improve performance from data without explicit programming. A genetic algorithm is a search and optimization technique that evolves a population of candidate solutions using selection (favoring fitter individuals), crossover (combining parents), and mutation (random changes). Applications include optimization, scheduling, engineering design, and machine learning model tuning.
What is machine learning? Explain genetic algorithm (GA) along with different GA operators. List some areas where GA can be applied.
Machine learning
Machine learning is the field of AI in which a system improves its performance on a task from experience (data), without being explicitly programmed for every case. Types: supervised, unsupervised and reinforcement learning.
Genetic algorithm
A genetic algorithm (GA) is a search and optimisation technique based on natural selection and genetics (John Holland). It evolves a population of candidate solutions (chromosomes) over generations; fitter individuals are more likely to survive and reproduce, so the population improves towards an optimum.
Terms
- Chromosome / individual: one encoded solution (e.g. a bit string 01101).
- Gene: one position in the chromosome.
- Population: the set of chromosomes.
- Fitness function: measures how good a solution is.
Steps (block diagram)
+-------------------------------+
| 1. Initial random population |
+---------------+---------------+
|
v
+-------------------------------+
| 2. Evaluate fitness |<-------------+
+---------------+---------------+ |
| |
v |
< Stop condition? >--No--+ |
| | |
Yes v |
| +--------------------+ |
| | 3. Selection | |
| | 4. Crossover | |
| | 5. Mutation | |
| | 6. New generation |--+
| +--------------------+
v
Best solution
- Initialisation: generate a random population of N chromosomes.
- Fitness evaluation: compute the fitness of each.
- Selection: choose parents with probability proportional to fitness (roulette wheel, tournament, rank).
- Crossover: combine two parents to make offspring.
- Mutation: randomly flip genes with a small probability.
- Replacement: form the new generation; repeat from step 2 until the stop condition (fixed number of generations, target fitness, or no improvement).
Genetic operators and their importance
| Operator | Action | Importance |
|---|---|---|
| Selection (reproduction) | Copies fitter strings more often | Pushes the population towards better solutions |
| Crossover | Swaps parts of two parents at a crossover point, e.g. 01/101 x 11/000 (cut at /) gives 01000 and 11101 | Mixes good building blocks; explores new combinations |
| Mutation | Flips a bit with probability about 0.001-0.01, e.g. 11000 gives 11010 | Maintains diversity; prevents premature convergence and recovers lost genes |
Example: maximise f(x) = x² for x in 0..31 (5-bit strings)
Initial population (N = 4):
| String | x | f(x) | Probability | Expected copies |
|---|---|---|---|---|
| 01101 | 13 | 169 | 0.144 | 0.58 |
| 11000 | 24 | 576 | 0.492 | 1.97 |
| 01000 | 8 | 64 | 0.055 | 0.22 |
| 10011 | 19 | 361 | 0.309 | 1.23 |
| Sum / average | 1170 / 292.5 |
Selection gives 01101, 11000, 11000, 10011. Crossover of 01101 x 11000 after bit 4 gives 01100 (12) and 11001 (25); crossover of 11000 x 10011 after bit 2 gives 11011 (27) and 10000 (16).
New fitness: 144, 625, 729, 256; sum 1754, average 438.5 (up from 292.5), best 729 (up from 576). Repeating the cycle moves the population towards 11111 (x = 31, f = 961).
Areas where GA can be applied
- Optimisation problems: function optimisation, scheduling and timetabling, travelling salesman problem.
- Machine learning: evolving neural-network weights and structure, feature selection, rule learning.
- Engineering design: circuit layout, antenna and structural design.
- Robotics and path planning, game playing.
- Image processing and pattern recognition; data mining.
- Finance (portfolio optimisation) and bioinformatics.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Genetic algorithm and operators · Artificial Intelligence, chapter 6 · asked 4×
- GA vs fuzzy based learning · Artificial Intelligence, chapter 6
- Machine learning; Boltzmann machines · Artificial Intelligence, chapter 6
- Short note: Genetic algorithm · Data Mining, chapter 3
- Crossover and mutation in GA · Data Mining, chapter 3