aımnova
DashboardMy LearningCrash CoursesStudy Plan

Aimnova site navigation

Stay in the loop

Get the latest study resources and updates

New features, study tips and exam insights — straight to your inbox.

IB Diploma

  • IB Past Papers
  • IB Study Notes
  • IB Question Bank
  • IB Mock Exams
  • IB Revision

IB Subjects

  • IB Math AA
  • IB Math AI
  • IB Economics
  • IB Business Management
  • IB Physics
  • IB Biology
  • View all IB subjects→

IB Past Papers

  • IB Math AA HL Past Papers
  • IB Math AA SL Past Papers
  • IB Math AI HL Past Papers
  • IB Math AI SL Past Papers
  • IB Economics HL Past Papers
  • IB Economics SL Past Papers
  • IB ESS Past Papers
  • View all past papers→

Study Resources

  • Study Notes
  • Question Bank
  • Mock Exams
  • Crash Courses
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Teachers
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aımnova

IB study, practice and feedback built around the real exam.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.c1e448f

Aimnova is not affiliated with or endorsed by the International Baccalaureate Organization (IB).

NotesComputer Science HLTopic 4.3Genetic algorithms
Back to Computer Science HL Topics
4.3.75 min read

Genetic algorithms (Computer Science HL)

IB Computer Science · Unit 4

Smart study tools

Turn reading into results

Move beyond passive notes. Answer exam-style questions, get AI feedback, and build the skills that earn top marks.

Get Started Free

Contents

  1. 1Breeding a solution
  2. 2The cycle
  3. 3Getting it wrong
  4. 4Exam-style question
The big idea: A genetic algorithm searches for a good solution by imitating evolution.

The cycle

1

Population

Keep a population of candidates.

2

Score

Score them.

3

Combine

Let the best ones combine.

4

Mutate

Mutate a few.

5

Repeat

Go round again.

It does not solve the problem. It searches a space too large to check exhaustively.

Where it earns its place

  • The search space is far too large to try every option
  • There is no formula that gives the answer directly
  • But any candidate can be scored — you can tell a good one from a bad one
  • A good enough answer is acceptable; the perfect one is not required
  • Timetabling, route planning, aerial design, circuit layout

Free preview

This is the free notes preview

You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:

  • FlashcardsLock in vocabulary and key terms with spaced repetition.
  • Practice questionsAnswer exam-style questions and get instant AI marking.
  • Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
  • Personalised study planA daily plan built around your exam date and weak areas.
Start Studying Free Full access to Aimnova Pro · cancel anytime
1

Population

Start with many random candidate solutions, each encoded as a string of values — a chromosome.

2

Fitness

Score every candidate with a fitness function. This is the one piece you must design, and it decides everything.

3

Selection

Choose parents, weighted towards higher fitness — but not only the best, or the population loses variety and the search stalls.

4

Crossover

Combine two parents to make offspring, taking part of each. This is how good partial solutions get recombined.

5

Mutation

Randomly alter a small number of values. This is what introduces ideas not present in either parent, and what escapes a local optimum.

The cycle on a real problem: the travelling salesperson

StageFor a delivery van visiting 30 shops
PopulationMany random orders in which to visit the 30 shops; each order is a chromosome
Fitness functionTotal distance of the route: shorter is fitter
SelectionShorter routes are more likely to be chosen as parents
CrossoverTake part of one parent's order and fill in the rest from the other, keeping each shop exactly once
MutationOccasionally swap two shops in a route
EvaluationWork out the fitness (distance) of every new route
TerminationStop after a set number of generations, when a route is short enough, or when routes stop improving
Crossover and mutation do different jobs: Crossover recombines what the population already has — it explores between existing solutions.

Mutation introduces something genuinely new. Without it the population converges on a blend of its starting material and can never reach anything outside it.

Study smarter, not longer

Most students waste 40% of study time on topics they already know. Our AI tracks your progress and optimizes every minute.

Try Smart Study FreeYour first topic is free to keep • No credit card required
SettingToo lowToo high
Mutation rateConverges early on a local optimumBecomes a random search — good solutions are destroyed
Population sizeToo little variety to recombineEach generation is slow
Selection pressureGood solutions spread too slowlyThe population becomes clones and the search stalls
The fitness function is the whole design: The algorithm optimises the fitness function exactly — the same failure mode as a reinforcement reward.

Score a timetable only on "no clashes" and it may return one that puts every lesson at 8am. It satisfied what you asked for.
No guarantee of the best answer: A genetic algorithm returns a good solution, not a provably optimal one, and two runs can give different answers.

Saying that is usually worth a mark — it is the honest limitation.

How this is tested — you must name the five stages in order and justify the approach from the size of the search space. It comes up two ways:

Paper 1 Section A

  • Describe how a genetic algorithm works, 4-6 marks
  • Name the stages of the cycle
  • State the role of mutation

Paper 1 Section B — case study

  • Justify a genetic algorithm for a scenario
  • Explain a limitation of the result
The classic trap: Omitting mutation, or describing it as noise. Crossover only recombines what is already present — mutation is the only source of anything new, and the only escape from a local optimum.

One generation: score, select, cross over, mutate, repeat.

Interactive diagram

Explore the labelled diagram, charts and maps for this topic in full study mode.

Claim your free topic
IB-style questionDescribe[6 marks]

A school must build a timetable from thousands of possible arrangements. Describe how a genetic algorithm would approach this, and state one limitation.

Model answer plan

See the answer broken into clear points, with guidance on how each point earns marks.

Claim your free topic

Try an IB Exam Question — Free AI Feedback

Test yourself on Genetic algorithms. Write your answer and get instant AI feedback — just like a real IB examiner.

the role of mutation in a genetic algorithm. [2 marks]

Related Computer Science HL Topics

Continue learning with these related topics from the same unit:

4.1.1Types of machine learning4.1.2Hardware for machine learning4.2.1Data cleaning4.2.2Feature selection
View all Computer Science HL topics
Improve your exam techniqueCommand terms, paper structure, and mark-scheme tips for Computer Science HL
Previous4.3.6Reinforcement learningNextNeural networks4.3.8

3 exam-style questions ready for you

Students who practice on Aimnova improve their scores by 15% on average. Get instant feedback that shows exactly how to improve your answers.

Practice Now — FreeView All Computer Science HL Topics