# Algorytmy genetyczne

EN: **Genetic algorithms (GA)** · id `geneticalgorithms` · aliases: GA, genetic algorithm, algorytm genetyczny, crossover, krzyżowanie

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Obliczenia ewolucyjne i inteligencja roju](https://aiatlasgraph.com/t/evolutionary.md) › [Klasyczne algorytmy ewolucyjne](https://aiatlasgraph.com/t/evoclassic.md) › Algorytmy genetyczne

## Description

- PL: Algorytm populacyjny kodujący rozwiązania jako chromosomy i tworzący potomstwo przez selekcję, krzyżowanie i mutację.
- EN: A population algorithm encoding solutions as chromosomes and creating offspring through selection, crossover and mutation.

## In one sentence

- PL: Program trzyma wiele rozwiązań zapisanych jak geny, łączy najlepsze w pary i wprowadza drobne losowe zmiany.
- EN: Software keeps many solutions written like genes, pairs up the best ones and adds small random changes.

## Problem it solves

- PL: Rozwiązanie składa się z wielu wyborów naraz i nie da się ich dobrać po kolei, jeden po drugim.
- EN: A solution is made of many choices at once, and they cannot be picked one at a time.

## What it does

- PL: Jak w hodowli roślin: dwie dobre odmiany dają potomka, który może odziedziczyć zalety obu, a przypadkowa zmiana czasem dodaje nową.
- EN: Like plant breeding: two good varieties produce offspring that may inherit both strengths, and a random change sometimes adds a new one.

## Everyday example

- PL: Szkoła układa plan lekcji; program krzyżuje dobre plany, zmienia pojedyncze godziny i zachowuje te, w których jest najmniej okienek.
- EN: A school builds its timetable; software crosses good timetables, shifts single lessons and keeps those with the fewest gaps.

## This concerns you if you…

- PL: układasz grafik, przydział lub kolejność wielu elementów
- PL: twoje rozwiązanie da się zapisać jako listę wyborów
- EN: arrange schedules, assignments or the order of many items
- EN: can write your solution as a list of choices

## Keywords

tournament selection · roulette-wheel selection · one-point crossover · SBX · polynomial mutation · elitism · BRKGA · DEAP · pymoo

## How it works

- PL: Rodzice są wybierani proporcjonalnie do przystosowania albo turniejowo, potem krzyżowanie wymienia fragmenty chromosomów, a mutacja z małym prawdopodobieństwem zmienia pojedyncze geny. Elityzm zachowuje najlepszych bez zmian. Dla zmiennych ciągłych stosuje się operatory rzeczywiste, np. symulowane krzyżowanie binarne.
- EN: Parents are chosen in proportion to fitness or by tournament; crossover then swaps chromosome segments and mutation changes single genes with low probability. Elitism keeps the best unchanged. Real-valued variables use real-coded operators such as simulated binary crossover.

## Limits

- PL: Łatwo o przedwczesną zbieżność, gdy populacja traci różnorodność. Ograniczenia problemu trzeba kodować karami lub naprawą rozwiązań, a wyniki są wrażliwe na rozmiar populacji i prawdopodobieństwa operatorów.
- EN: Premature convergence is common when the population loses diversity. Constraints need penalties or repair, and results are sensitive to population size and operator probabilities.

## Key terms

- PL: **chromosom**: Zakodowane rozwiązanie, np. ciąg bitów albo lista liczb.
- PL: **selekcja turniejowa**: Losujemy kilku kandydatów i bierzemy najlepszego z nich.
- PL: **elityzm**: Przenoszenie najlepszych rozwiązań do następnego pokolenia bez zmian.
- EN: **chromosome**: An encoded solution, such as a bit string or list of numbers.
- EN: **tournament selection**: Draw a few candidates at random and take the best.
- EN: **elitism**: Carrying the best solutions into the next generation unchanged.

## Know first

- [Przeszukiwanie lokalne (wspinaczka, wyżarzanie) (Local search (hill climbing, simulated annealing))](https://aiatlasgraph.com/t/localsearch.md)

## Subtopics (1 direct, 1 in total)

- [Model wyspowy (równoległe populacje z migracją) (Island model and parallel evolutionary algorithms)](https://aiatlasgraph.com/t/islandmodel.md): Coarse-grained parallel evolution: independent subpopulations exchanging individuals according to a migration topology and schedule.

## Sources

- [GECCO 2026 – program tracks (ACM SIGEVO)](<https://gecco-2026.sigevo.org/Tracks>) `gecco2026tracks` · by ACM SIGEVO
- [pymoo – Genetic Algorithm documentation and algorithm list](<https://pymoo.org/algorithms/soo/ga.html>) `pymoo-ga` · by Julian Blank, Kalyanmoy Deb (pymoo)

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/geneticalgorithms · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
