Presentation is loading. Please wait.

Presentation is loading. Please wait.

Artificial Intelligence for Games Patrick Olivier & John Shearer

Similar presentations


Presentation on theme: "Artificial Intelligence for Games Patrick Olivier & John Shearer"— Presentation transcript:

1 Artificial Intelligence for Games Patrick Olivier & John Shearer p.l.olivier@ncl.ac.uk

2 What is (artificial) intelligence?

3 Perception Representing Reasoning Acting Collaborating Learning …we know it when we see it…

4 What is a game?

5 Serious games are interesting…

6 But what about really serious games?

7 Course structure Finite state machines Search Heuristic search (including path planning) Adversarial search Rule-based systems Multi-agent systems Learning Planning Knowledge Representation

8 Required reading S.J. Russell & P. Norvig “Artificial Intelligence: A Modern Approach” (International Edition) 2 nd or 3 rd edition, Prentice Hall.

9 Classes of game AI… Empirical: –hacked procedural (scripted) solutions Principled: –classic algorithms (e.g. A* for path planning) Real-time state-of-the-art: –newer algorithms (e.g. heuristic search planning) –newer approaches (e.g. cooperating agents)

10 Development context… Game AI is hard core computer science! Game AI is a “bounded optimality” problem Processing time is always in demand: –common for the AI < 10% CPU time) Efficient algorithms: –real-time –any time Efficient representations (especially on consoles)

11 Don’t reinvent the wheel! Over 80% of Game AI problems have been addressed in robotics or agent- based systems: –plan a path for a NPC within the game level –define behaviour for a NPC –define strategies and tactics in wargames –learn from an opponents behaviour –define collective behaviours for NPC

12 AI for Games in 30 minutes… Finite state machines Search & problem solving Path planning as heuristic search Adversarial search Multi-agent systems Machine learning …

13 FSM: current state of play...

14 Rule-based (expert) systems In 1970s expert systems dominated AI Rule-bases that captured “expertise” Rules base systems: –Data representation declarative –Data distinct from procedures for manipulation –Allows flexible description of behaviour Encode behaviour as IF-THEN-ELSE rules …and so…

15 Rule-based bots… IF enemy visible AND my health is < 20% OR his weapon >> my weapon THEN retreat

16 Search & problem solving State-based representation of the world Transform the world using operators Transform current state  desired state Search for the right sequence of operators –Exhaustively –Heuristically –Stochastically

17 Path planning as search A significant number of games involve moving in buildings, battlefields, etc. Choosing the best path within a determined space is a classic AI problem Algorithms have been developed that “construct” the best path by exploring possible directions using a heuristic

18 Path planning for NPCs Discretise the environment (state) Discretise the movement (operators) Formulate a heuristic Search algorithm (A*) Enhance performance: –Memory (IDA*) –Real-time (RTA*)

19 Adversarial search Killing is fun…but we still want to beat Kasparov! “Serious” games were the first Game AI problems Representation problem is easy But the search space is humungous! Need to search against an opponent –Minimax Need to optimise –Alpha-Beta pruning –Singular extensions How did Deep Blue do it?

20 Machine learning Being really intelligent means be able to learn (and become cleverer)… Learn to anticipate our opponent How can we learn? –Remembering (rote learning) –Learning by building rules –Learning by building models Game AI will learn more…

21 What about the programming? Programming AI (in Java) Two hour practical classes: –collaborate and learn –2 progressive programming coursworks –50% of the assessment for CSC3203 –1 week turnaround for feedback

22 What next? Write notes in the lectures Buy the textbook (e.g. amazon.co.uk) Start reading the textbook Go to the practical classess Program in your own time Sign-up for a project


Download ppt "Artificial Intelligence for Games Patrick Olivier & John Shearer"

Similar presentations


Ads by Google