Unit 4: Fuzzy systems and genetic algorithms
Artificial Intelligence & Soft Computing notes · PTU syllabus (PGCA1926)
On this page
- Unit summary
- Fuzzy set theory: fuzzy vs crisp sets
- Fuzzy set operations
- Fuzzy relations and max–min composition
- Fuzzification, fuzzy rules and defuzzification
- Fuzzy decision making and control
- Genetic algorithms: history and basics
- The genetic algorithm cycle
- Encoding and fitness functions
- GA operators: reproduction, crossover and mutation
- Convergence and hybrid systems
- Key terms
- Quick revision
- Important questions
Unit summary
Fuzzy logic reasons with degrees of truth, and genetic algorithms evolve solutions. This unit covers fuzzy set theory, fuzzy versus crisp sets, fuzzy relations, fuzzification, min–max composition, defuzzification, fuzzy rule-based systems, fuzzy decision making and control, the history of genetic algorithms, encoding, fitness functions, reproduction, crossover and mutation, convergence and hybrid systems.
After this unit you can
- Perform fuzzy set operations and max–min composition
- Fuzzify, apply rules and defuzzify
- Design fuzzy rule-based and control systems
- Apply genetic algorithm operators and explain hybrid systems
PTU syllabus topics
- Fuzzy set theory
- fuzzy vs crisp sets
- fuzzy relations
- fuzzification
- min-max composition
- defuzzification
- fuzzy logic and rule-based systems
- fuzzy decision making and control
- genetic algorithm history
- encoding methods
- fitness functions
- GA operators (reproduction, crossover, mutation)
- convergence
- introduction to hybrid systems
- 1. Initial population: Random encoded solutions
- 2. Fitness evaluation:
- 3. Selection: Fitter survive
- 4. Crossover: Combine parents
- 5. Mutation: Random changes
Topic 1
Fuzzy set theory: fuzzy vs crisp sets
In a classical (crisp) set, membership is 0 or 1. In a fuzzy set, membership is a degree between 0 and 1 — useful for vague ideas like "tall" or "hot".
Membership
0 or 1
Any value from 0 to 1
Example
Age ≥ 18 is adult
Height 175 cm is "tall" to degree 0.7
Used in
Classical logic
Washing machines, AC control, decision support
Topic 2
Fuzzy set operations
Union
μA∪B(x) = max(μA(x), μB(x))
Intersection
μA∩B(x) = min(μA(x), μB(x))
Complement
μA′(x) = 1 − μA(x)
Difference
μA−B(x) = min(μA(x), 1 − μB(x))
Example
A = {0.2/x1, 0.7/x2, 1/x3}, B = {0.5/x1, 0.4/x2, 0.6/x3}: A ∪ B = {0.5, 0.7, 1}; A ∩ B = {0.2, 0.4, 0.6}; A′ = {0.8, 0.3, 0}.
Topic 3
Fuzzy relations and max–min composition
- A fuzzy relation R on X × Y assigns each pair a membership grade; it is written as a matrix.
Definition
T = R ∘ S, with μT(x, z) = max over y of min(μR(x, y), μS(y, z))
Example
R = [0.6 0.3; 0.2 0.9] and S = [1 0.5; 0.8 0.4]: T11 = max(min(0.6, 1), min(0.3, 0.8)) = 0.6; T12 = max(min(0.6, 0.5), min(0.3, 0.4)) = 0.5; T21 = max(0.2, 0.8) = 0.8; T22 = max(0.2, 0.4) = 0.4. T = [0.6 0.5; 0.8 0.4].
Topic 4
Fuzzification, fuzzy rules and defuzzification
- 1Fuzzification
Convert crisp inputs to membership degrees using membership functions
- 2Rule evaluation
IF temperature is high AND humidity is high THEN fan speed is fast (AND = min)
- 3Aggregation
Combine rule outputs (max)
- 4Defuzzification
Convert the fuzzy output to a crisp value
Centroid (centre of gravity)
z = Σ μ(z) z ÷ Σ μ(z)
Most common; smooth
Mean of maximum
Average of z values with maximum membership
Simple
Max membership (height)
z with the highest membership
Fast; ignores shape
Weighted average
For symmetric output sets
Used in Sugeno systems
Example
Output fan speeds 20, 50, 80 with memberships 0.2, 0.6, 0.3: weighted average = (4 + 30 + 24) ÷ 1.1 ≈ 52.7.
- Membership functions: triangular, trapezoidal, Gaussian.
Topic 5
Fuzzy decision making and control
- Fuzzy decision making combines fuzzy goals and constraints (decision = goals ∩ constraints) and picks the alternative with the highest membership.
- Fuzzy control: controllers for washing machines (load and dirt → wash time), air conditioners, anti-lock brakes, metro trains (Sendai subway) and cameras — robust with simple rules from expert knowledge.
Topic 6
Genetic algorithms: history and basics
- Introduced by John Holland (1975) and popularised by David Goldberg (1989), inspired by natural selection: a population of candidate solutions evolves through selection, crossover and mutation.
Topic 7
The genetic algorithm cycle
- 1. Initial population: Random candidate solutions
- 2. Fitness evaluation:
- 3. Selection: Fitter individuals chosen
- 4. Crossover: Combine parents
- 5. Mutation: Small random changes
Genetic algorithms are used for optimisation problems where the search space is huge — scheduling, design and feature selection.
Topic 8
Encoding and fitness functions
Binary encoding
Bit strings — 01101
Numeric optimisation, knapsack
Value (real) encoding
Real numbers or symbols
Weights of neural networks
Permutation encoding
Orderings — 3 1 4 2
Travelling salesperson, scheduling
Tree encoding
Program trees
Genetic programming
- Fitness function: measures how good a solution is — e.g., f(x) = x² for maximisation, or total distance (to minimise) for a route.
Topic 9
GA operators: reproduction, crossover and mutation
- Roulette-wheel selection
- Probability proportional to fitness
- Tournament and rank selection
- Pick the best of a random group; select by rank
- Elitism
- Copy the best individuals unchanged
- Single-point crossover
- Swap tails after a random point
- Two-point and uniform crossover
- Swap middle segments or each bit with probability 0.5
- Bit-flip mutation
- Flip bits with a small probability (about 0.01)
- Swap mutation
- Exchange positions in permutations
Example
Maximise f(x) = x² for x in 0–31 (5-bit strings). Population 01101 (13, f = 169), 11000 (24, 576), 01000 (8, 64), 10011 (19, 361); total 1,170. Selection probabilities 0.14, 0.49, 0.05, 0.31. Crossing 01101 and 11000 after bit 4 gives 01100 and 11001 (25, f = 625) — the best improves from 576 to 625.
Topic 10
Convergence and hybrid systems
- Convergence: the population becomes similar and best fitness stops improving; stop after a fixed number of generations, a target fitness, or no improvement for several generations. Premature convergence to a local optimum is avoided by mutation, diversity and suitable selection pressure.
Neuro-fuzzy
Neural learning tunes fuzzy membership functions and rules
ANFIS
Genetic-fuzzy
GA optimises fuzzy rules and membership functions
Tuned controllers
Neuro-genetic
GA chooses network weights or architecture
Neuro-evolution
Key terms
- Fuzzification
- Converting crisp inputs into membership degrees
- Max–min composition
- Combining fuzzy relations by max of mins
- Defuzzification
- Converting a fuzzy output into a crisp value
- Crossover
- Combining parts of two parents to form offspring
- Hybrid system
- System combining two or more soft computing methods
Quick revision
- Crisp vs fuzzy; union max, intersection min, complement 1 − μ.
- Fuzzy relations; max–min composition.
- Fuzzification, rules, aggregation, defuzzification (centroid, mean of max, weighted average); fuzzy control.
- GA history; binary, value, permutation, tree encoding; fitness.
- Selection, crossover, mutation, elitism; convergence; neuro-fuzzy, genetic-fuzzy, neuro-genetic.
Important exam questions
Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).
Short-answer questions
- Q1.Distinguish crisp and fuzzy sets.
- Q2.Find the complement of {0.3/a, 0.9/b}.
- Q3.What is max–min composition?
- Q4.Name two defuzzification methods.
- Q5.What is roulette-wheel selection?
- Q6.What is premature convergence?
Long-answer questions
- Q1.Explain fuzzy set operations and fuzzy relations with examples.
- Q2.Explain a fuzzy inference system with fuzzification and defuzzification.
- Q3.Explain the genetic algorithm with encoding, fitness and operators.
- Q4.Solve a function maximisation problem using a genetic algorithm.
Stuck on this unit?
Message SBS on WhatsApp for help with Artificial Intelligence & Soft Computing, or to ask about studying M.Sc IT at Synetic.
