Genetic Algorithms by Hand: Selection, Crossover, Mutation & Fitness
Run a genetic algorithm cell by cell with given random numbers: encode solutions as bits, score them with penalties, spin the roulette wheel, hold tournaments, cross and mutate chromosomes, step a full generation and check convergence against the brute-force optimum.
- One-time payment
- 14-day money-back guarantee
- Secure checkout with Stripe
What you'll build
What you will be able to do
Each lab ends with a concrete result that you build yourself and the checker confirms, cell by cell.
- Decode 5-bit chromosomes into numbers x, score them with f(x) = x(40 − x), decode gene cells with place values and read the weight of two backpack chromosomes.
- Compute weight, value and excess weight of six backpack chromosomes, turn them into a penalised fitness and find the best pack.
- Turn six fitness values into slices of a roulette wheel, spin it six times with given random numbers, look up the winners with MATCH and draw the wheel as a pie chart.
- Run six 2-way tournaments with given random numbers: draw two entrants, compare their fitness, keep the winner and measure how much fitter the mating pool is than the population.
- Pick cut points from given random numbers, cross three pairs of 5-bit parents with LEFT and RIGHT, then cross two backpack parents gene by gene with IF and weigh the child.
- Mutate four 5-bit children with a given table of random numbers, decode the results, count the flips and compare them with the expected number and the chance of no change.
- Run one complete GA generation for four 5-bit chromosomes: roulette selection with MATCH, crossover with a partner slot, mutation with BITXOR masks, and the best and average fitness of the new generation.
- Chart how best and average fitness converge over 10 generations, enumerate all 32 values of x to find the true optimum, and check when the GA first reached it and how much work it needed.
About this course
Genetic algorithms solve hard optimisation problems by imitating evolution, and you can watch every step happen in a grid. A backpack-packing problem serves as the example. You encode solutions as bit strings and decode them, score fitness with a penalty for overweight packs, and select parents by roulette wheel using cumulative shares and by tournament. Single-point crossover combines two parents, and bit-flip mutation changes genes at random with a set probability. You then run one complete generation of selection, crossover, mutation and re-scoring, and track convergence over many generations compared with the true optimum found by brute force. For computer science and operations research students, developers and anyone curious about metaheuristics.
Curriculum
Course content
8 lessons · 8 labs · 2.1 h · final exam
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Final exam
Certificate
Finish with a certificate you can verify
Complete every lesson and pass the final exam to receive a certificate of completion for this course, with a unique credential ID and a public verification page.
- Names the course, your score and the date of issue
- A verification link for your CV or LinkedIn profile
- 12 questions, 75% to pass, unlimited retries.
A Tutorvo certificate confirms that you completed a course. It is not an official or professional qualification.
Before you buy
Questions about this course
Is this a subscription?
No. You pay $9.99 once for this course. There is no subscription and nothing renews automatically. Prices are in US dollars; taxes may be added where required.
What exactly do I get?
All lessons and labs of this course, the final exam and the certificate, including later updates to the course, for as long as Tutorvo offers it. Access is personal and tied to your account.
Can I get a refund?
Yes. If you are not satisfied, email hello@tutorvo.com within 14 days of buying and we refund the course in full via Stripe. The guarantee does not apply once a certificate for the course has been issued to you, or where there are signs of abuse.
When can I start?
Right after payment. Access starts immediately at your request; for consumers in the EU/EEA the statutory right of withdrawal therefore ends once access has begun, while our 14-day money-back guarantee applies regardless.
Do I need Excel or other software?
No. The labs run in a spreadsheet inside your browser on a laptop, tablet or phone. Function names and syntax follow Excel.
Is the certificate an official qualification?
No. It confirms that you completed all lessons of the course and passed its final exam. It is not an official, state-recognised or professional qualification. The name is taken from your profile when the certificate is issued.
Full details are in our Terms · hello@tutorvo.com
