290 likes | 640 Views
Video Game AI 9-24-2008 Prof. Janice T. Searleman jets@clarkson.edu , jetsza CS451/CS551/EE565 ARTIFICIAL INTELLIGENCE Outline Video Game AI Agents Knowledge-Based Agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic HW#4 due: Friday 10/03
E N D
Video Game AI 9-24-2008 Prof. Janice T. Searleman jets@clarkson.edu, jetsza CS451/CS551/EE565ARTIFICIAL INTELLIGENCE
Outline • Video Game AI Agents • Knowledge-Based Agents • Wumpus world • Logic in general - models and entailment • Propositional (Boolean) logic HW#4 due: Friday 10/03 Exam#1 – tentatively October 7th, 7:00 pm Reading: AIMA Chapter 7 plus the handout on Video Game AI
Video Game AI • Video game AI agent • both challenging & also enjoyable to play • have very limited resources • Navigation & Path-finding
Finite State Machine (FSM) • FSM for a sentry NPC • If the Player is in sight, the NPC attacks; otherwise it marches between location X and location Y
Layered Behavior Architecture Rodney Brooks’ Subsumption Architecture Brooks, R.A., "How to build complete creatures rather than isolated cognitive simulators," in K. VanLehn (ed.), Architectures for Intelligence, pp. 225-239, Lawrence Erlbaum Assosiates, Hillsdale, NJ, 1991.
Rule-Based Systems • Called a Production System • Useful for real-time strategy AI • Working memory contains percepts on the current situation • Relevant rules are “triggered” • One rule is selected to “fire” (conflict resolution
Production Rules • R1: if the human opponent creates an expansion (nexus/hatchery/command_center) AND you possess sufficient military units then Attack the expansion • R2: if the map is a relatively small land map AND the location of the opponent is known AND your race is zerg then execute the four pool strategy Four pool strategy: make a spawning pool with your fourth drone and make another drone, and when the spawning pool is completed create as many zerglings as your crystals/larvae will allow, and attack your opponent with the zerglings.
Knowledge bases • Knowledge base = set of sentences in a formal language • Declarative approach to building an agent (or other system): Tell it what it needs to know • Then it can Ask itself what to do - answers should follow from the KB • Agents can be viewed at the knowledge level i.e., what they know, regardless of how implemented • Or at the implementation level i.e., data structures in KB and algorithms that manipulate them
A simple knowledge-based agent • The agent must be able to: • Represent states, actions, etc. • Incorporate new percepts • Update internal representations of the world • Deduce hidden properties of the world • Deduce appropriate actions
Performance measure gold +1000, death -1000 -1 per step, -10 for using the arrow Environment Squares adjacent to wumpus are smelly Squares adjacent to pit are breezy Glitter iff gold is in the same square Shooting kills wumpus if you are facing it Shooting uses up the only arrow Grabbing picks up gold if in same square Releasing drops the gold in same square Sensors: Stench, Breeze, Glitter, Bump, Scream Actuators: Left turn, Right turn, Forward, Grab, Release, Shoot Wumpus World PEAS description
Wumpus world characterization • Fully Observable No – only local perception • DeterministicYes – outcomes exactly specified • Episodic No – sequential at the level of actions • Static Yes – Wumpus and Pits do not move • Discrete Yes • Single-agent? Yes – Wumpus is essentially a natural feature