1 / 19

Artificial Intelligence in Game Design

Artificial Intelligence in Game Design. Content Generation. Content Generation. Creating world for game Terrain for battle games Levels for shooters Tracks for racing games … Most expensive part of development! Goal: Generate content automatically Cheaper, faster

serge
Télécharger la présentation

Artificial Intelligence in Game Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Artificial Intelligence in Game Design Content Generation

  2. Content Generation • Creating world for game • Terrain for battle games • Levels for shooters • Tracks for racing games … • Most expensive part of development! • Goal: Generate content automatically • Cheaper, faster • Infinite replayability

  3. Terrain Maps • Most commonly applied to terrain maps in civilization games Goals (possibly contradictory): • “Realistic” appearing terrain • Continents, islands, mountains, beaches, deserts, etc. • “Fair” to all players • Equal amounts of resources, water, and flat areas for building cities near initial position for each player

  4. Land Mass Generation One method: • Grow “land clumps” from each player location • Initial “territory” each player given chance to expand into before running into other players

  5. Land Mass Generation • Each iteration grows clump by 1 tile • After given number of tiles, rest of map becomes “water” • Chosen randomly from tiles adjacent to existing clump • Must not be part of another player’s clump • Evaluated using “fitness” criteria • Nearness to initial player position • Number of adjacent tiles already part of player’s clump • Distance from other player’s clumps • If tile fails, choose another • Goal: avoid “peninsulas” P1 P1 P1 P1 P1 P1 P1 P1 P1 P1 P1

  6. Island Map Generation • Each player initially given separate island • Can be built like land clumps • Additional criteria: New land tiles for player not allowed within some distance of tiles for other players (keep islands separated) • Additional islands can be generated in empty spaces after player islands created

  7. Terrain Generation • Creating “realistic” looking map of land masses • Generally height based • Defining h(x, y) for points on the map • Low at beaches • High in mountains • Flat areas for city development • …

  8. Fractals • Shapes which appear the same at any scale (self-similar) • Based on some “variance” applied at each level of detail • Modify area by some variance v • Subdivide into sub areas • Higher v more “jagged” look

  9. Fractals • One dimensional example: • Start with line: • Vary height of center of line by random value between –v and v: • Vary height of center of each segment by –v/2 and v/2:

  10. Fractals • One dimensional example: • Vary height of center of each segment by –v/4 and v/4: • And so on, until have as much detail as necessary

  11. Fractals • Create “random” terrain by doing this in two dimensions

  12. Adding Detail • Smoothing used to level out terrain in areas that should be flat • Beaches at interface of land/water tiles • Flat areas designed to allow players to build cities, etc. • Done by averaging heights in “flat” areas

  13. Adding Detail • Create mountains in non-flat areas • Choose a location and increase its height • Use averaging to affect height of nearby locations (foothills) • Use wander behavior to create a mountain range over a certain distance

  14. Adding Details • Create rivers as paths from mountains to ocean • Choose random point on coast • Seek nearest point at base of a mountain • Add wander to avoid a straight line

  15. Resource Distribution • Must make sure resources are distributed fairly among all players • Gold, oil, uranium, etc. • Land on which structures can be built • Goals: • Each player should have same amount of resources available at any stage of game (depending on amount of territory captured) • Players should be encouraged to explore increasingly further from their initial position

  16. Resource Distribution • Generate rings around player initial position • Randomly place r resources within each ring • r increases with each ring R R R R R R R R R R P1 P2 R R R R R R R R R R

  17. Generate and Test • Generate level content in some random way • Evaluate that content • How playable/fun/challenging is it? • Is the level of difficulty appropriate for that point in game? • Modify that content • Change features that are not appropriate

  18. Track Generation • Track generated as sequence of randomly generated spline curves • AI driver used to evaluate the difficulty level track • Overall time to drive the track • Variation in speed needed to drive the track • Individual spline curvatures modified for track sections which vary from the rest of the level

  19. Mario Level Generation • Two-dimensional level generated • Pits, coins, enemies, etc. • Evaluated by human players • Fun: time moving right, enemies stomped, etc • Frustration: time standing still, falls into pits, etc.

More Related