IB Computer Science HL · Year 2 · Lesson 53

Clustering, association rules, reinforcement learning and genetic algorithms

Use four different learning/optimization mechanisms, then apply adversarial-learning ideas to the GAN challenge.

Paper 150 minutesA4.3.4 · A4.3.5 · A4.3.6 · A4.3.7
Targets

What you need to be able to do

2 / 11
  • describe clustering from feature similarity;
  • describe association-rule discovery and interpret a scenario;
  • describe RL states, actions, rewards, policies, cumulative reward and exploration/exploitation;
  • describe GA population, fitness, selection, crossover, mutation, evaluation and termination.
A4.3.4A4.3.5A4.3.6A4.3.7
Learn + retrieve

Rapid Recall Deck

3 / 11

Attempt each card first. If a term is new, flip and study it, then answer it again without looking. Mark only secure recall as “Know it”.

A4.3.4–5

Unsupervised patterns

4 / 11

Clustering

A shop has spend, visits and discount-use features but no segment labels. What can clustering do?

Group customers with similar feature patterns into unlabeled clusters that analysts can later interpret as useful segments.

Association rule

High vandalism areas also often show theft. What has been discovered—and what has not?

An association/co-occurrence relationship has been discovered. It can support resource allocation/investigation but does not by itself prove vandalism causes theft.

A4.3.6 · Describe

Reinforcement learning interaction

5 / 11
state → choose action using policy → environment
  ↑                               ↓
  └──────── reward + next state ──┘

Robot navigation

+10 for goal, −5 collision, −0.1 per step. Explain state, action, reward, policy and cumulative reward.

State represents the robot's current situation; actions are movement choices; rewards evaluate consequences; the policy selects actions from states; learning aims to maximize cumulative long-term reward across the route.

RL trade-off

Explore vs exploit

6 / 11

Why explore?

Why try an action not currently believed best?

Exploration gathers evidence about less-known actions and can discover a better policy that pure exploitation would miss.

Why exploit?

Why not explore randomly forever?

The agent must use what it has learned to gain reward; endless exploration wastes performance on uncertain/poor actions.

A4.3.7 · Describe

Genetic algorithm cycle

7 / 11
population → fitness evaluation → selection
                       ↓
                 crossover + mutation
                       ↓
                  new population
                       ↓
             repeat until termination

Travelling-salesperson route

Explain what a candidate, fitness function, selection, crossover, mutation, evaluation and termination could mean.

A candidate encodes a route; fitness scores route quality such as distance; selection favours useful parents; crossover combines route information; mutation introduces variation; new routes are evaluated; iteration stops at a chosen fitness/convergence/generation condition.

Choose the mechanism

Match problem to learning signal

8 / 11

Four goals

Customer groups without labels; products bought together; robot navigation from rewards; optimize a route.

Clustering; association rules; reinforcement learning; genetic algorithm.

2027 Case Study — HL

GAN generator/discriminator balance

9 / 11
GANA generator transforms a D-dimensional noise vector into synthetic images. A discriminator compares generated images with real training images. They train together in an adversarial dynamic.

Explain the challenge

In the Visionary Studios GAN, a generator turns a D-dimensional noise vector into synthetic images while a discriminator judges real versus generated images. Explain how the adversarial dynamic works and why imbalance can cause training instability or mode collapse.

Generator objective
Discriminator objective
Adversarial dynamic
Training imbalance/instability
Mode collapse

The generator learns to fool the discriminator; the discriminator learns to distinguish real from fake. Their competition supplies the learning signal. If one becomes too dominant, useful feedback can weaken and training can become unstable. Mode collapse occurs when the generator produces a narrow range of similar outputs instead of dataset diversity.

Exam lens

Mechanism → suitability

10 / 11

Paper 1 mini-set

1. Describe exploration vs exploitation. 2. Describe selection, crossover and mutation. 3. Justify RL rather than supervised learning for sequential navigation learned from rewards.

Exploration learns uncertain actions; exploitation uses current knowledge. Selection chooses parents, crossover recombines, mutation varies. RL fits navigation because the agent learns from sequential state-action-reward interaction rather than receiving a correct labelled action for every state.

Homework

Finish the learning cycle

11 / 11

Case study / exam preparation

Deepen the GAN research note with generator/discriminator, adversarial dynamic, D-dimensional noise vector, instability and mode collapse.

Paper 1 — short practice

Reconstruct clustering, association, RL and every GA stage from memory.

Case-study checkpoint

Add one credible GAN-stabilization/mode-collapse mitigation source and explain why it could help.