ai in rpgs

Click here to load reader

Upload: hisoki

Post on 24-Feb-2016

45 views

Category:

Documents


0 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

AI in RPGs

AI in RPGsTopicsHistory of RPGsProblems with large worldsProblems with faction reputationsProblems with scripted AISummaryProblems with what games teach us (if there is time)History

Stem from role plays such as improv comedy, war re-enactmentsMigrated to a table top game, such as Dungeons and Dragons obligatory video http://www.youtube.com/watch?v=XHdXG2gV01kWith advent of early computing, the games moved into the computer/console world, but lost the multiplayer elementWith the internet, the social aspect has returned, but the dungeon master is nowhere to be foundEarly ExamplesText based games on Unix systemsEvolved to projects like Ultima, with richer graphics and interface improvementsRPGs as we know them borrow a lot from Ultima III and Dungeon Master (both 1987)

Common ElementsStory driven gameplayCharacter development and customizationMultiple character partyTop down viewCombat system which abstracts concrete details

Combat SystemsTurn BasedMost console rpgsSome variation in what can be done in a turn (Tactics)Ex: Final FantasyReal TimeMost computer rpgsStill abstract away the skill of combat leave it to strategySome variants, especially in consoles (Secret of Mana, Mario RPG)

Expansive WorldsEarly games not small due to lack of creativity just resourcesCartridge capacitySimplified AI

Current games are expected to be large and behave realistic, but is this an option?You Must Gather Your Party Before Venturing FourthCPU time limitedAI focused on master areaPlayers must stay together

Taking a Page from the GPURelate processing effort to the distance away from player

Continuous Distance FunctionCPU time directly proportional to the distance to the nearest player characterMathematically elegantNot too efficient

Discrete Level of Detail Function in NWNLODClassification1Player Characters (your party)2Creatures fighting or interacting with a PC3Creatures within 50 meters of PC4Creatures in the same large scale area as the PC5Creatures in areas without a PCExample

Splitting the CPUCPU TimeLevel of Detail60%LOD1: Player Characters24%LOD2: Creatures interacting with PCs10%LOD3: Creatures in proximity of PCs4%LOD4: Creatures in an area of a PC2%LOD5: Creatures not in an area with a PCTrimming the FatLOD1, 2, 3 perform full pathfindingLOD4 hops tile to tileLOD5 teleports to destination

Do we even need them to walk? Perform damage calculations?Reputations in MMOGsUsed to simulate intelligent factionsCan be increased decreased, with a ripple effectProvide non-linear gameply (have to choose sides)Global and instant is this realistic?

Example

Typical EventSubject GroupPlayerVerbDidViolenceToObject GroupBanditObject IndividualJoeMagnitude75 (Killed)Where50,20,138 (in front of saloon)WhenHigh NoonTemplateKilledBanditTemplateReference CountKnown by 11 NPCsReputation EffectsBandits hate player moreLawmen like player moreFarmers like player moreWhere to put the events?Could assign a copy to each NPC that was presentWaste of spaceSolution keep a master listOnly keep most severe eventsDelete events no longer referencedHave NPCs forget over timeWorking with EventsAfter an action, an EventAnnouncer adds the event to the master listThe announcer continues to broadcast the event to NPCs in a certain radiusNPCs may share events with each other, provided they are on speaking terms

Updating EventsEach NPC tries to find if the event is new to themWe may already know of a more serious event, so we already have enough hateWe may need to replace less serious events with this oneAn event can be committed by unknown; should we remember it?Declarative AI DesignCurrently Imperative design is most commonIt allows things to be scripted precisely, like a movie sceneBehavior is brittle outside of intended environmentThis takes time/money to develop, and games are growing in sizeImperative Design

Well known and used in the communityAllows for quick, simple scripts to address issues, much like band-aids.Fits well with the typical scenario of a map with objects and actionsAnother Reason: Player Interaction with AIPlayers discovering new ways of interacting with the NPCs or world systemsPlayers interacting with other players via markets and tradingPlayers creating new objects or services in the world via modding or UI add-onsPlayers pushing the world rules system, including its AI23Imperative design cant defend against unpredictable behaviorSolution: GoalsDictate NPC behavior based on constraints and goalsConstraints are the intrinsic rules of the game / mapGoals are typical behaviors that we previously had to solve ourselves and hardcode the solution for the NPCExampleI want the assassin to leap out of the shadows from here and run over there, then to twist left and fire his gun.VSSun-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.Usage in Age of EmpiresBuilding rulesResource gathering rulesAttack rulesWinning rulesDiplomatic rulesResearch rulesEvacuation rulesA 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))

BenefitsAllows a uniform approach to dictating behavior (no more band aids)Allows for more flexibility when it comes to learning algorithmsWill react to player behaviors not envisioned by the programmerDevelopment time not linearly related to the size of the gameSummary Full CircleGames well defined before computersPorting to computers removed social aspectThe internet brought it backAll thats left is to improve the dungeon master.

Bonus What Games Really TeachChessAppears to be about war, it has knights, castles etcReally about controlling space, predicting opponentGTAAppears to be about shooting pedestrians and copsReally about exploration and freedomWoW exploration and role playing?http://www.gamasutra.com/features/20060222/sirlin_01.shtmlWhat WoW Really TeachesInvesting a lot of time into something is more valuable than actual skillYou deserve it more if you put in more timeVery relevant to the Honor SystemCompletely opposite in real lifeGroup is better than soloMuch better rewards for performing mundane tasks along with 39 other people than individual skillPrevents exploration and exploitation of engine with soft rules (Larry Lessig disapproves -.-)Uses TOS to ban behaviors otherwise allowable in gameAs Comp Scis, we know this is never an option in the real worldhttp://www.gamasutra.com/features/20060222/sirlin_01.shtml