cs 680 game ai
play

CS 680: GAME AI WEEK 7: PROCEDURAL CONTENT GENERATION 2/27/2012 - PowerPoint PPT Presentation

CS 680: GAME AI WEEK 7: PROCEDURAL CONTENT GENERATION 2/27/2012 Santiago Ontan santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2012/CS680/intro.html Reminders Progress self-check indicator: Your progress is good is


  1. CS 680: GAME AI WEEK 7: PROCEDURAL CONTENT GENERATION 2/27/2012 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2012/CS680/intro.html

  2. Reminders • Progress self-check indicator: • Your progress is good is you have: • Project 1 completed. • You have a working drama manager (or whatever is that you are building in project 2) (even if it’s not perfect) • Progress self-check indicator (next week): • Your progress is good is you have: • Project 1 completed. • Project 2 completed

  3. Outline • Student Presentation: “From Abstraction to Reality: Integrating Drama Management into a Playable Game Experience” • Student Presentation: “Computational Approaches to Storytelling and Creativity” • Student Presentation: “STORYEVAL: An Empirical Evaluation Framework for Narrative Generation” • Introduction to Procedural Content Generation • Constructive Methods for PCG • (Brief Introduction to Hill-Climbing algorithms) • Search-based PCG • Project 3 • Project Discussion

  4. Outline • Student Presentation: “From Abstraction to Reality: Integrating Drama Management into a Playable Game Experience” • Student Presentation: “Computational Approaches to Storytelling and Creativity” • Student Presentation: “STORYEVAL: An Empirical Evaluation Framework for Narrative Generation” • Introduction to Procedural Content Generation • Constructive Methods for PCG • (Brief Introduction to Hill-Climbing algorithms) • Search-based PCG • Project 3 • Project Discussion

  5. Procedural Content Generation • Procedural content generation (PCG): creation game content automatically , through algorithmic means. • Game content: • Maps • Items • Plot / story • Game play • Dialogue • etc.

  6. Procedural Content Generation • Procedural content generation (PCG): creation game content automatically , through algorithmic means. • Game content: • Maps • Items Next week • Plot / story • Game play • Dialogue • etc.

  7. Example: Maps in Civilization IV

  8. Why Procedural Content Generation? • In early games: space saving • Games using PCG do not have to save map data to disk • Early games ran in old computers with little memory to spare • In modern games: • Makes the creation of large worlds possible: • Skyrim / Starwars Galaxies, etc. would be impossible (prohibitive cost) without PCG • New gameplay possibilities based on PCG: • Roguelikes • Spore • Galactic Arms Race

  9. Star Wars Galaxies

  10. Skyrim (also Oblivion, Daggerfall)

  11. S.T.A.L.K.E.R.

  12. Spore

  13. Darwinia • http://www.introversion.co.uk/darwiniaplus/

  14. Murder!

  15. Nethack (and other roguelikes)

  16. Infinite Mario • http://www.supermariobrothers.org/infinite-mario.html

  17. Galactic Arms Race

  18. Procedural Content Generation • Expand content from a “ short description ” to an “ expanded description ” • E.g for Skyrim: • Short description: parameters that define a tree (size, amount of snow, type of leaves, color, health, etc.). A few bytes (1KByte at most) • Expanded description: tree mesh. Several MegaBytes. • Depending of the nature of the “short description”, or the procedure with which it is expanded, there are many families of PCG methods.

  19. Classification of PCG Techniques When is Degrees of PCG Content Determinism Technique control performed? Purely Online Optional Stochastic Constructive random Control Generate & Offline Necessary Deterministic vector Test Togelius, Yannakakis, Stanley, Browne (2011)

  20. Classification of PCG Techniques Executed during When is the game: Degrees of PCG Content Determinism Technique Must be fast and control performed? reliable Purely Online Optional Stochastic Constructive Executed during random game design: Maybe slower, and less need for strong Control Generate & Offline Necessary Deterministic reliability vector Test

  21. Classification of PCG Techniques Content generated is only an “add-on” When is of the game. Not Degrees of PCG Content Determinism Technique important if it’s control performed? flawed Purely Online Optional Stochastic Constructive random Content generated is the core of the game: main map, Control Generate & main plot, etc. Offline Necessary Deterministic vector Test Must be flawless

  22. Classification of PCG Techniques Only way to control When is Degrees of outcome is through PCG Content Determinism Technique control the random seed performed? (no “short description”) Purely Online Optional Stochastic Constructive random PCG expands a “short description” with which the Control Generate & Offline Necessary Deterministic game designer has vector Test control of the outcome

  23. Classification of PCG Techniques When is Degrees of PCG Content Determinism Technique control Outcome is performed? unpredictable Purely Online Optional Stochastic Constructive random Given same input, algorithm always Control Deterministi Generate & Offline Necessary provides the same vector c Test output

  24. Classification of PCG Techniques When is Degrees of Algorithm designed PCG Content Determinism Technique control in such a way that the performed? outcome always achieves the desired Purely effect Online Optional Stochastic Constructive random Given an “ evaluation Control Generate & function ”, the Offline Necessary Deterministic vector Test algorithm generates candidates until one satisfies the function

  25. Constructive vs Generate & Test • Constructive algorithms: • Task-specific • Typically, they are “tricks” • Require a lot of fine tuning • Generate & Test: • AI-like • Evaluation function defines what are we looking for • A search algorithm (e.g. Hill-climbing) used to search an individual satisfying (maximizing) the evaluation function • Generic

  26. Outline • Student Presentation: “From Abstraction to Reality: Integrating Drama Management into a Playable Game Experience” • Student Presentation: “Computational Approaches to Storytelling and Creativity” • Student Presentation: “STORYEVAL: An Empirical Evaluation Framework for Narrative Generation” • Introduction to Procedural Content Generation • Constructive Methods for PCG • (Brief Introduction to Hill-Climbing algorithms) • Search-based PCG • Project 3 • Project Discussion

  27. Constructive Approaches to PCG • Typically application specific • Most common are map-generation approaches • Some generic families of techniques that have been shown to work for many applications: • Statistical approaches • Simulation-based approaches • Grammar approaches

  28. Examples of Constructive Approaches • Application Specific • Statistical approaches • Simulation-based approaches

  29. Example: Application Specific Method • House-blueprint generation for Zelda-like games • Input parameters: • Size of the grid (e.g. 32x32) • Number of rooms of each tipe (bedrooms, living rooms, etc.) • Output: • Full floor plan of a house for direct use in a game • Assumptions: • Rooms are rectangles

  30. Example: Application Specific Method • Step 1: Generate random rectangles

  31. Example: Application Specific Method • Step 2: Push them away enough for avoiding collisions

  32. Example: Application Specific Method • Step 3: Assign the role of each one (at random) Living room Kitchen Bedroom Bedroom

  33. Example: Application Specific Method • Step 4: Make sure all rooms are reachable from a living room (create doors) Living room Kitchen Bedroom Bedroom

  34. Example: Application Specific Method • Step 5: Create one or several outside doors Living room Kitchen Bedroom Bedroom

  35. Example: Application Specific Method • Step 6: Add furniture (each room type has a different probability of have different pieces of furniture) Shelves Stove Living room Kitchen Table Bed Bed Bedroom Bedroom Chair

  36. Example: Application Specific Method • Step 7: Render the house

  37. Example: Application Specific Method • Step 7: Render the house

  38. Application Specific Methods • They work • They need a lot of fine tuning: • In the example: how many pieces of furniture per room • They do not generalize to any other application • Very common in games (because they work, and can be fine tuned to generate exactly what we want, and the way we want)

  39. Examples of Constructive Approaches • Application Specific • Statistical approaches • Simulation-based approaches

  40. Example: Statistical Approaches • Name generation • Application: large games with lots of NPCs/items require the game designer to give a name each of them. Time consuming. • Approach: • Model the statistical properties of a given language • Generate random words that have the same statistical properties as the given language

Recommend


More recommend