AI in RPGs. Topics History of RPGs Problems with large worlds Problems with faction reputations...

Click here to load reader

download AI in RPGs. Topics History of RPGs Problems with large worlds Problems with faction reputations Problems with scripted AI Summary Problems with what games.

of 31

Transcript of AI in RPGs. Topics History of RPGs Problems with large worlds Problems with faction reputations...

  • Slide 1
  • AI in RPGs
  • Slide 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)
  • Slide 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 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
  • Slide 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)
  • Slide 5
  • Common Elements Story driven gameplay Character development and customization Multiple character party Top down view Combat system which abstracts concrete details
  • Slide 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)
  • Slide 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?
  • Slide 8
  • You Must Gather Your Party Before Venturing Fourth CPU time limited AI focused on master area Players must stay together
  • Slide 9
  • Taking a Page from the GPU Relate processing effort to the distance away from player
  • Slide 10
  • Continuous Distance Function CPU time directly proportional to the distance to the nearest player character Mathematically elegant Not too efficient
  • Slide 11
  • Discrete Level of Detail Function in NWN LODClassification 1Player Characters (your party) 2Creatures fighting or interacting with a PC 3Creatures within 50 meters of PC 4Creatures in the same large scale area as the PC 5Creatures in areas without a PC
  • Slide 12
  • Example
  • Slide 13
  • Splitting the CPU CPU TimeLevel of Detail 60%LOD1: Player Characters 24%LOD2: Creatures interacting with PCs 10%LOD3: Creatures in proximity of PCs 4%LOD4: Creatures in an area of a PC 2%LOD5: Creatures not in an area with a PC
  • Slide 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?
  • Slide 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?
  • Slide 16
  • Example
  • Slide 17
  • Typical Event Subject GroupPlayer VerbDidViolenceTo Object GroupBandit Object IndividualJoe Magnitude75 (Killed) Where50,20,138 (in front of saloon) WhenHigh Noon TemplateKilledBanditTemplate Reference CountKnown by 11 NPCs Reputation EffectsBandits hate player more Lawmen like player more Farmers like player more
  • Slide 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
  • Slide 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
  • Slide 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?
  • Slide 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
  • Slide 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
  • Slide 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
  • Slide 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
  • Slide 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.
  • Slide 26
  • Usage in Age of Empires Building rules Resource gathering rules Attack rules Winning rules Diplomatic rules Research rules Evacuation rules
  • Slide 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))
  • Slide 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
  • Slide 29
  • Summary Full Circle Games well defined before computers Porting to computers removed social aspect The internet brought it back All thats left is to improve the dungeon master.
  • Slide 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
  • Slide 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