# Generowanie treści przez przeszukiwanie (ewolucyjne)

EN: **Search-based procedural content generation** · id `searchpcg` · aliases: search-based PCG, SBPCG, evolutionary level generation, ewolucyjne generowanie poziomów, generowanie przez optymalizację

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [AI w grach](https://aiatlasgraph.com/t/gameai.md) › [Proceduralne generowanie treści gier](https://aiatlasgraph.com/t/pcg.md) › Generowanie treści przez przeszukiwanie (ewolucyjne)

## Description

- PL: Generowanie treści gier metaheurystykami, głównie ewolucyjnymi, które przeszukują przestrzeń reprezentacji treści według funkcji oceny jakości.
- EN: Generating game content with metaheuristics, mostly evolutionary, which search a space of content representations guided by a quality evaluation function.

## In one sentence

- PL: Program tworzy wiele wersji poziomu, ocenia każdą i krzyżuje najlepsze, aż dostanie poziom, który dobrze się gra.
- EN: A program makes many versions of a level, scores each and breeds the best ones until it gets a level that plays well.

## Problem it solves

- PL: Proste generatory losowe dają poziomy niegrywalne albo nudne, a nikt nie ma czasu ręcznie przeglądać tysięcy wariantów.
- EN: Simple random generators produce levels that are unplayable or dull, and nobody has time to review thousands of variants by hand.

## What it does

- PL: Jak hodowca róż: krzyżuje najładniejsze okazy z każdego pokolenia i po wielu sezonach ma odmiany, jakich nikt nie zaprojektował.
- EN: Like a rose breeder crossing the finest plants of each generation until, after many seasons, varieties appear that nobody designed.

## Everyday example

- PL: Generator plansz do gry logicznej ocenia, czy każda plansza ma rozwiązanie i nie jest za łatwa, a przepuszcza tylko udane.
- EN: A puzzle-board generator checks that each board has a solution and is not too easy, and only lets the good ones through.

## This concerns you if you…

- PL: chcesz generować poziomy spełniające konkretne warunki
- PL: potrzebujesz wielu różnych, ale grywalnych map
- EN: want to generate levels that meet specific conditions
- EN: need many different but playable maps

## Keywords

search-based PCG · genetic algorithms · MAP-Elites · constrained novelty search · fitness function · simulation-based evaluation · illuminating level space

## How it works

- PL: Treść zapisuje się jako genotyp, np. listę elementów planszy, który przekłada się na poziom. Funkcja oceny mierzy cechy wprost, symulacją rozgrywki przez agenta albo modelem doświadczenia gracza. Algorytm ewolucyjny lub jakościowo-różnorodnościowy iteracyjnie mutuje i selekcjonuje kandydatów, zwracając najlepszy wariant albo całe ich archiwum.
- EN: Content is encoded as a genotype, such as a list of board elements, that maps to a level. The evaluation function measures features directly, through gameplay simulation by an agent, or with a player-experience model. An evolutionary or quality-diversity algorithm mutates and selects candidates, returning the best variant or a whole archive.

## Limits

- PL: Wynik zależy od funkcji oceny, a zmierzyć „zabawę” jest trudno. Symulowanie rozgrywki dla każdego kandydata jest wolne, więc metoda rzadko działa w czasie gry. Źle dobrana reprezentacja zawęża to, co da się wygenerować.
- EN: The result depends on the evaluation function, and 'fun' is hard to measure. Simulating gameplay for each candidate is slow, so the method rarely runs during play. A poor representation narrows what can be generated.

## Key terms

- PL: **genotyp**: Zakodowany opis treści, na którym działa mutacja i krzyżowanie.
- PL: **funkcja oceny**: Wzór lub symulacja dająca kandydatowi wynik jakości.
- PL: **ocena symulacyjna**: Agent rozgrywa poziom, a wynik gry staje się oceną.
- EN: **genotype**: An encoded content description that mutation and crossover act on.
- EN: **evaluation function**: A formula or simulation giving a candidate a quality score.
- EN: **simulation-based evaluation**: An agent plays the level and the outcome becomes its score.

## Know first

- [Algorytmy genetyczne (Genetic algorithms (GA))](https://aiatlasgraph.com/t/geneticalgorithms.md)
- [MAP-Elites: mapa najlepszych wariantów (MAP-Elites)](https://aiatlasgraph.com/t/mapelites.md)

## Related topics

Untyped, symmetric "see also" links.

- [MAP-Elites: mapa najlepszych wariantów (MAP-Elites)](https://aiatlasgraph.com/t/mapelites.md)

## Sources

- [Search-based Procedural Content Generation: A Taxonomy and Survey](<https://gpbib.cs.ucl.ac.uk/gp-html/Togelius_2011_TCIAIG.html>) `togelius-sbpcg-2011` · by Julian Togelius, Georgios N. Yannakakis, Kenneth O. Stanley, Cameron Browne

---

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