Game Development:
Artificial Intelligence


Instructor: Steve Rabin

e-mail: steve.rabin@gmail.com

Download the class Syllabus

Announcements


Welcome to the class!

Class book.



Project Turn-in Instructions

Projects are due generally one or two weeks after they are assigned (check the due dates).
Late policy: Only one project can be turned in up to 4 days late.

Projects should be e-mailed directly to the instructor at steve.rabin@gmail.com. This account doesn't accept ".exe" files, so please rename them to ".ex_". Make the subject of your turn in "[Project#] FirstName LastName". For example, if Steve Rabin turned in project 3, it would have an e-mail subject line of:
[Project3] Steve Rabin

Please turn in:
  • Code, assets, and exe. (no .ncb file)
  • Note what completed and if you attempted the extra credit.
  • Note any special directions for the project (how to work it).
  • Note how long the project took to complete.
  • E-mail it to steve.rabin@gmail.com
  • Use the correct subject line.


    Class Schedule



    Week 1 (3/31/2011): Overview of Game AI (week01.ppt, UW_PreviousProjects.zip)
    Homework #1: (Due April 7th) Fill out HW1.doc.

  • Email to steve.rabin@gmail.com
  • Subject of email should be: "[HW1] Firstname Lastname"
  • Don't forget to attach HW1.doc

  • Week 2: AI Architecture (week02.zip)
    Project #1: State Machines (due week 4, April 21st). sample base code - reference only.
  • (80%) Have at least 4 NPCs doing something interesting. At least 3 state machines, with at least 15 states among them. Use at least 10 of the following (-5% for each missing, list in readme.txt the file and line number of each that you use to get credit!): Substates, a Global Message Response other than MSG_Reset or MSG_MouseClick, SendMsgDelayedToState, ChangeStateDelayed, PopState, ReplaceStateMachine, PushStateMachine, PopStateMachine, RequeueStateMachine, data passed in msg, MarkForDeletion, OnCCMsg, SendMsgBroadcastToList, SetTimer or OnPeriodicTimeInState, OnTimeInState, or a persistent state variable such as DeclareStateInt.
  • (20%) Draw a UML diagram of the state machines you create. (-5% for each missing: Proper starting state indicator, labeled transitions, labeled states) (-5% for each missing state, -10% for each missing state machine). Turn in hardcopy on paper.

  • (Extra Credit 10%, max 20%) Implement one of the following steering behaviors: Formations (not just leader following/queueing), Flocking, or Patrolling using queued state machines.
  • (Extra Credit 5%, no more than 15% per student) First to find a particular significant bug in the State Machine Language engine (not the entire project). E-mail me at steve.rabin@gmail.com.
  • (Extra Credit 10%) Answer the questions about persistent state variables (see PowerPoint lecture for details on questions).
    Reading
    Chapters 5 and 9

  • Week 3: Movement (week03.ppt, HierarchicalFlocking.zip, AdaptivePID.zip)
    (Optional) Extra Credit Assignment #1: (Due last day of class) Implement flocking
  • (30%) Have 10 or more objects moving as a group or as multiple groups (for example, birds flying over the landscape or fish swimming in a big open area).
  • (20%) Flocking demonstrates separation rule.
  • (20%) Flocking demonstrates alignment rule.
  • (20%) Flocking demonstrates cohesion rule.
  • (10%) Make your camera capable of viewing the flocking.
  • Flocking objects can be quads, spheres, boxes, etc.
    Reading
    Chapter 4

  • Week 4: Pathfinding (week04.ppt, pathdemo.exe, PathfindingProject_20110420.zip)
    Project Assignment #2a: (Due week 6 - May 5th) Implement A* in the PathfindingProject_20110420 code base (worth 20% of your final grade)
  • Absolute requirement: Draw the open list of quads as one color, the closed list of quads as another color, draw the final path, and have Tiny follow the path.
  • (20%) Draw one step of A* each frame (use toggle)
  • (20%) A path is always found if it exists (completeness)
  • (15%) The path is optimal with a heuristic weight of 1.0
  • (15%) The path is optimal with a heuristic weight of 0.0, and the search grows in a circular pattern
  • (5%) The path uses diagonals and doesn't run into corners
  • (5%) Calculate heuristic using both Euclidean and Octile methods (use toggle)
  • (10%) Rubberband final path where possible (use toggle)
  • (10%) Smooth using a Catmull-Rom spline (use toggle)
  • (-10%) If it crashes at any time
  • (extra 20%) Implement Floyd-Warshall algorithm (in addition to A*). Offer a toggle switch to turn it on/off. You can calculate the table each time the map is switched.
  • Project Assignment #2b: (Due week 7 - May 12th) Port A* to your codebase (worth 5% of your final grade)
  • (100%) Have each agent show its final A* path

  • Week 5: Pathfinding (week05.ppt, companyofheroes.ppt, Movies from Company of Heroes (57MB))
    Reading Assignment: no reading this week

    Week 6: Agents and Animation (week06.ppt)
    (Optional) Extra Credit Assignment #2: (Due last day of class) Implement agent awareness and coordinated behavior
  • Open ended assignment - Brainstorm ideas
  • Give your agents human sensing abilities
  • - Vision: Sight distance, sight angle, and walls block vision. (Use lines to show range and viewing angle. Point to targets your agent can see.)
  • - Simulate reaction times for the vision (1/4 to 1/2 a second using SendMsgDelayedToMe)

  • Make multiple agents cooperate toward a common goal (using any cooperation mechanism you want).
  • - Agents/managers run state machines and communicate to each other. (Via SendMsg or SendMsgBroadcastList.)
  • - Possibility: Use an invisible manager to coordinate agents (manager is a game object with a state machine that has no rendered body).
  • - Hint: Manager might add agents to broadcast list, then use SendMsgBroadcastList to communicate to everyone at once.
  • - Possibly use other coordination mechanisms (individual arbitration or simple blackboard).

    Reading Assignment: 6.1, 6.2, 6.3, 6.4

  • Week 7: Tactics and Terrain Analysis (week07.ppt, F.E.A.R. GDC 2006 Package (29MB))
    Project Assignment #3: (Due May 19th) Implement terrain analysis
  • (100%) Create at least 3 layers of grids and 1 combined layer that can be toggled through (with the "L" key).
  • Possible layers: Openness Layer, Visibility Layer, Occupancy Layer, Line-of-Fire Layer, Cover Area Layer, Area Search Layer, and Combat Desirability Layer.

    Extra Credit: (10%) Have the agents use the information to do something intelligent.

    Reading Assignment: No reading this week

  • Week 8: Learning (week08.ppt, RecombinatorWithTexts.zip)
    Project Assignment #4: Game Play Integration (Due Wed May 1st (day before class), 6PM <-Did you see this time of 6PM?)
  • Make actual gameplay where the player can win or lose
  • Improve the experience (feel of controls, fun factor, look of game, polish older project assignments)
  • Write up what you did.
  • Prepare for presentation (5-10 minutes long based on previous projects)
  • - Discuss code architecture, project implementations, surprises, failures
    Reading Assignment: No reading this week

  • Week 9: Learning, Gesture Recognition, & Randomness (week09.ppt, final_20110526.doc)
    Extra credit: (20%) Fill out the FINAL EXAM and turn it in on Week 10 for up to 20% based on correctness.