1 / 31

AI in RPGs

AI in RPGs. Topics. History of RPGs Problems with large worlds Problems with faction reputations Problems with scripted AI Summary Problems with what games teach us (if there is time). History. Stem from role plays such as improv comedy, war re-enactments

hisoki
Download Presentation

AI in RPGs

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. AI in RPGs

  2. Topics • History of RPGs • Problems with large worlds • Problems with faction reputations • Problems with scripted AI • Summary • Problems with what games teach us (if there is time)

  3. History • Stem from role plays such as improv comedy, war re-enactments • Migrated to a table top game, such as Dungeons and Dragons – obligatory video http://www.youtube.com/watch?v=XHdXG2gV01k • With advent of early computing, the games moved into the computer/console world, but lost the multiplayer element • With the internet, the social aspect has returned, but the dungeon master is nowhere to be found

  4. Early Examples • Text based games on Unix systems • Evolved to projects like Ultima, with richer graphics and interface improvements • RPGs as we know them borrow a lot from Ultima III and Dungeon Master (both 1987)

  5. Common Elements • Story driven gameplay • Character development and customization • Multiple character party • Top down view • Combat system which abstracts concrete details

  6. Combat Systems • Turn Based • Most console rpgs • Some variation in what can be done in a turn (Tactics) • Ex: Final Fantasy • Real Time • Most computer rpgs • Still abstract away the “skill” of combat – leave it to strategy • Some variants, especially in consoles (Secret of Mana, Mario RPG)

  7. Expansive Worlds • Early games not small due to lack of creativity – just resources • Cartridge capacity • Simplified AI • Current games are expected to be large and behave realistic, but is this an option?

  8. You Must Gather Your Party Before Venturing Fourth • CPU time limited • AI focused on “master area” • Players must stay together

  9. Taking a Page from the GPU • Relate processing effort to the distance away from player

  10. Continuous Distance Function • CPU time directly proportional to the distance to the nearest player character • Mathematically elegant • Not too efficient

  11. Discrete Level of Detail Function in NWN

  12. Example

  13. Splitting the CPU

  14. Trimming the Fat • LOD1, 2, 3 perform full pathfinding • LOD4 hops tile to tile • LOD5 teleports to destination • Do we even need them to walk? Perform damage calculations?

  15. Reputations in MMOGs • Used to simulate intelligent factions • Can be increased decreased, with a ripple effect • Provide non-linear gameply (have to choose sides) • Global and instant – is this realistic?

  16. Example

  17. Typical Event

  18. Where to put the events? • Could assign a copy to each NPC that was present • Waste of space • Solution – keep a master list • Only keep most severe events • Delete events no longer referenced • Have NPCs forget over time

  19. Working with Events • After an action, an EventAnnouncer adds the event to the master list • The announcer continues to broadcast the event to NPCs in a certain radius • NPCs may share events with each other, provided they are on speaking terms

  20. Updating Events • Each NPC tries to find if the event is new to them • We may already know of a more serious event, so we already have enough hate • We may need to replace less serious events with this one • An event can be committed by ‘unknown’; should we remember it?

  21. Declarative AI Design • Currently Imperative design is most common • It allows things to be scripted precisely, like a movie scene • Behavior is brittle outside of intended environment • This takes time/money to develop, and games are growing in size

  22. Imperative Design • Well known and used in the community • Allows for quick, simple scripts to address issues, much like band-aids. • Fits well with the typical scenario of a map with objects and actions

  23. Another Reason: Player Interaction with AI • Players discovering new ways of interacting with the NPCs or world systems • Players interacting with other players via markets and trading • Players creating new objects or services in the world via modding or UI add-ons • Players pushing the world rules system, including its AI

  24. Solution: Goals • Dictate NPC behavior based on constraints and goals • Constraints are the intrinsic rules of the game / map • Goals are typical behaviors that we previously had to solve ourselves and hardcode the solution for the NPC

  25. Example • “I want the assassin to leap out of the shadows from here and run over there, then to twist left and fire his gun.” • VS • Sun-tzu said in The Art of War that there are six types of ground: accessible, entangling, stalemated, narrow, steep, and expansive. If the enemy is unprepared on entangling ground, advance and defeat him.

  26. Usage in Age of Empires • Building rules • Resource gathering rules • Attack rules • Winning rules • Diplomatic rules • Research rules • Evacuation rules

  27. A Typical Rule from AoE // Rule to sell excess resources (defrule (wood-amount > 1500) (or (food-ammount < 1600) (or (gold-amount < 1200) (stone-amount < 650))) (can-sell-commodity wood) => (chat-local-to-self “excess wood”) (release-escrow wood) (sell-commodity wood))

  28. Benefits • Allows a uniform approach to dictating behavior (no more band aids) • Allows for more flexibility when it comes to learning algorithms • Will react to player behaviors not envisioned by the programmer • Development time not linearly related to the size of the game

  29. Summary – Full Circle • Games well defined before computers • Porting to computers removed social aspect • The internet brought it back • All that’s left is to improve the dungeon master.

  30. Bonus – What Games Really Teach • Chess • Appears to be about war, it has knights, castles etc • Really about controlling space, predicting opponent • GTA • Appears to be about shooting pedestrians and cops • Really about exploration and freedom • WoW – exploration and role playing? http://www.gamasutra.com/features/20060222/sirlin_01.shtml

  31. What WoW Really Teaches • Investing a lot of time into something is more valuable than actual skill • You “deserve it more” if you put in more time • Very relevant to the Honor System • Completely opposite in real life • Group is better than solo • Much better rewards for performing mundane tasks along with 39 other people than individual skill • Prevents exploration and exploitation of engine with soft rules (Larry Lessig disapproves -.-) • Uses TOS to ban behaviors otherwise allowable in game • As Comp Scis, we know this is never an option in the real world http://www.gamasutra.com/features/20060222/sirlin_01.shtml

More Related