0% found this document useful (0 votes)
12 views65 pages

WID3009 Lecture 8 Slides Generating Content

The document discusses different methods for procedurally generating content in games, including search-based, solver-based, grammar-based, cellular automata, noise and fractals, and machine learning. It provides details and examples of each method.

Uploaded by

Ãh Jáçk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views65 pages

WID3009 Lecture 8 Slides Generating Content

The document discusses different methods for procedurally generating content in games, including search-based, solver-based, grammar-based, cellular automata, noise and fractals, and machine learning. It provides details and examples of each method.

Uploaded by

Ãh Jáçk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 65

Lecture 8: AI For Generating Content (I)

WID3009: Artificial Intelligence Game Programming


Generating Content with AI
• Introduction
• Procedural Content Generation (PCG) Taxonomy
• How to Generate Content
• Roles of PCG in Games
• What Can Be Generated
• Evaluating Content Generators
Generating Content with AI
• Introduction
• Procedural Content Generation (PCG) Taxonomy
• How to Generate Content
• Roles of PCG in Games
• What Can Be Generated
• Evaluating Content Generators
• Optional:
• Can be avoided or ignored.
• Ex: randomly-generated weapon combinations in FPS; outfits and skins
(MMO).

• Necessary:
• Needed to complete the game.
• Ex: keys to unlock next level;
• Constructive: generates the content once;
• Ex: using fractals or cellular automata to generate terrains or grammars to
generate levels

• Generative: generate and test;


• After a candidate is generated, test criteria (e.g., is there a path between the
entrance and exit of the dungeon)
• If fail, repeat until generated content fulfils criteria.
• Ex: search-based approach
Generating Content with AI
• Introduction
• Procedural Content Generation (PCG) Taxonomy
• How to Generate Content
• Roles of PCG in Games
• What Can Be Generated
• Evaluating Content Generators
PCG Methods
• Search-based
• Solver-based
• Grammar-based
• Cellular automata
• Noise and fractals
• Machine learning
PCG Methods
General content generation
Usage
Search- High, depending on fitness function
Flexibility
based High, depending on search space
Computation
PCG Moderate, depending on fitness function and
Stochasticity search space
Define fitness function and search space
Data Requirement
Genetic algorithms
Algorithms
Levels, items, NPCs
Content Example
Core Components of Search-based PCG
• Search Algorithm
• Complex vs Simple

• Content Representation

• Evaluation Function
• One or multiple criteria
• Direct, Simulation, Interaction
PCG Methods
• Search-based
• Solver-based
• Grammar-based
• Cellular automata
• Noise and fractals
• Machine learning
PCG Methods
Puzzles; highly-constrained problems
Usage
Solver- Medium, depending on constraints
Flexibility
based Computation High, depending on constraint complexity

PCG Stochasticity Low, must fulfil constraints

Define constraints and objectives


Data Requirement
SAT solvers, linear programming
Algorithms
Mazes, puzzles, logical structures
Content Example
Answer Set Programming
• Write the description of the problem:
• A set of rules
• If an evaluated rule is True, it will fire.

• Solutions to the problem are represented as sets.


Answer Set Programming
Example: Sudoku
• Encode squares with X,Y,N
• X,Y are coordinates, N is number.

• Guess what numbers are in each cell


• Cell(X,Y,1), Cell(X,Y,2), …, for Row(X), Column (Y)

• Discard bad combinations:


• Don’t put the same number N in a row.
• Don’t put the same number N in a column.
• Don’t put the same number N in a block.
https://cgi.cse.unsw.edu.au/~mit/Papers/ICLP09.pdf
PCG Methods
• Search-based
• Solver-based
• Grammar-based
• Cellular automata
• Noise and fractals
• Machine learning
PCG Methods
Structured content with clear rules
Grammar- Usage
based Flexibility Medium, restricted by grammar rules
PCG Low
Computation
Stochasticity Low, follow strict grammar rules

Data Requirement Define grammar rules

Algorithms L-systems

Content Example Dialog, narrative, structures


L-System example
• Given a set of rules:
• A -> AB
• B -> b

• Given with an axiom {A}:


• Step 1: {A} -> {AB}
• Step 2: {AB} -> {A}{B} -> {AB}{b}
• Step 3: {AB}{b} -> {A}{B}{b} -> {AB}{b}{b}
L-System example
PCG Methods
• Search-based
• Solver-based
• Grammar-based
• Cellular automata
• Noise and fractals
• Machine learning

You might also like