1 / 15

AI Post Mortem

AI Post Mortem. Inside Sims Medieval. By David “Rez” Graham. What We’re Going to Talk About. Core Design Changes Quests Sim Types Profession Sims Role Sims Townies Schedules. Implementation Solutions Bouncer System Sim Scheduler. Meta Autonomy Which lot should I be on?

ophira
Download Presentation

AI Post Mortem

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 Post Mortem Inside Sims Medieval By David “Rez” Graham

  2. What We’re Going to Talk About Core Design Changes Quests Sim Types Profession Sims Role Sims Townies Schedules Implementation Solutions Bouncer System Sim Scheduler

  3. Meta Autonomy Which lot should I be on? Based on venue desire tuned by designers Schedules Local Autonomy What should I do on my current lot? Based on Utility provided for each interaction on each object Utility is based on Commodities, like hunger, energy, social, etc. Sims AI Crash Course

  4. Design Changes: Quests • The Problem: • The Witch is back! • Player must confront the witch in the town square • The player arrives just in time…. • .… to see the witch go home to make a sandwich

  5. Design Changes: Sim Types • Profession Sims • Created with Create-A-Sim • Playable • Townies • Background characters • Unplayable yet fully simulated • Role Sims • Townies with a purpose • Activated by event • On a schedule

  6. Why schedules? Quests: Remember the witch? Need to lock a Sim somewhere Work: No rabbit holes for work Need to send Sims to the right place at the right time Need to behave appropriately during business hours On Schedule: Special work motives & socials Schedule Lots Commodities can be frozen Meta & Local Autonomy can be disabled Off Schedule: Normal Behavior Design Changes: Schedules

  7. Gets Sims in and out of the world one at a time Handles prioritized Sim requests General Requests Generic request for N Sims Don’t care who gets assigned or when they respond Used to fill the world with Townies Specific Requests Filtered by age, gender, faith, or even SimDescription Sim is locked in request Implementation: The Bouncer

  8. Implementation: Specific Requests • Client inherits from ISimRequestor interface • Client calls CreateRequest() on Bouncer Singleton • Bouncer creates a request and returns an ISimRequest ptr • The ISimRequest ptr is used as proxy to send messages to the Bouncer regarding this request • Bouncer uses concrete request object to send messages to the client

  9. Implementation: ISimRequestor Requestor gets notified when a Sim is actually assigned to the request Bouncer notifies client when a higher priority request comes in and it’s up to the client to handle that appropriately Bouncer can ask the client about the Sim’s local/meta autonomy restrictions

  10. Implementation: ISimRequest Client must submit the request when it’s ready and withdraw the request when it’s done Client can update general requests to the bouncer Client controls when a Sim is unassigned from a request since it knows when this is safe

  11. Implementation: Schedules • Schedule client calls AddScheduleByTag() on SimDescription • SimDescription caches the schedule data from the SimScheduler singleton • SimDescription calls AddSim() on ScheduledSimManager singleton • ScheduledSimManager creates a ScheduledSim object • Each tick, ScheduledSimManager iterates over all ScheduledSim’s and submits low-priority bouncer requests for any who are on a schedule.

  12. Implementation: Schedules • Bouncer spawns the Sim • The Sim initializes his SimSchedulerState and sets the appropriate state based on time. • Every AI update, Autonomy will call RunScheduleAutonomy() • Submits a higher priority bouncer request • Reconciles all motives, freezes commodities if necessary, etc. • Sends the Sim to the appropriate lot.

  13. Roles: RoleSystem Singleton acts as Schedule Client Activated by Event Role sim is chosen from Townie Pool based on Filter Sim is modified for role (Traits, skills, Equip, etc.) Schedule is added to SimDescription Professions: ProfessionManager Singleton acts as the Schedule Client Sims are created through Create-A-Sim, which generates a SimDescription object When not controllable by the player, Profession Sims behave according to schedule Sims controlled by player have their schedule removed Implementation: Professions & Roles

  14. Summary • Remember the Witch? • The Witch is now just a role • The Role filters on Adult Female • When activated, she is put on a 24/7 schedule • Target Lot = Town Square • Commodities are frozen • When player confronts her, a new schedule is pushed

  15. Thank You! Email: rez@ea.com

More Related