210 likes | 331 Views
Character Artificial Intelligence CE00875-6. Introduction to Module Lecture 1. Module Team And Assessment. Teaching Team Bob Hobbs – K354 – r.g.hobbs@staffs.ac.uk Di Bishton – K229 – d.k.bishton@staffs.ac.uk Steve Foster – K215 – S.foster@staffs.ac.uk Assessment
E N D
Character Artificial IntelligenceCE00875-6 Introduction to Module Lecture 1
Module Team And Assessment • Teaching Team • Bob Hobbs – K354 – r.g.hobbs@staffs.ac.uk • Di Bishton – K229 – d.k.bishton@staffs.ac.uk • Steve Foster – K215 – S.foster@staffs.ac.uk • Assessment • 100% coursework • Partly from report, • Partly from small project
Computer Games, AI and AI in Games • Computer games today • What is AI, anyway? • The uses of AI in games • Brief history of AI in games • AI methodologies • Heroes of AI • What we want from AI • What we’ll do in this module See also http://www.aigamedev.com
Computer Games – Some Terms • Video games are any sort of game played primarily via a video display such as a monitor or television • Video games include:- computer games, ie software designed to run on PCs (egDoom, Sim City) - console games, which are software/firmware designed to work with proprietary boxes that typically plug into a television set such as Sony Playstation, Xbox etc. (egC.O.D, Heavenly Sword ) - games that work on mobile phones or PDAs (egTour of Duty) • Most of the games we will consider in this module are computer games
Computer Games – The Market • The world market was $24.5 billion in 2003, and is expected to grow every year by about 5% • What was once a small part of the software market has now become quite significant • Older purchasers (>30s) now play as much as teenagers • With increasing maturity and better technology comes increasing demands on the quality and sophistication of gameplay • This makes it increasingly difficult and expensive to deliver the required real-time performance
Computer Games – by Genre • Platform- player has to climb up and down, or jump from and to, platforms and ledges, while fighting enemies and collecting objects egDonkey Kong • First person shooter– player with gun hunts through a world, shooting enemies. POV is first person • Third person shooter– same as FPS, except that the view is outside of, and thought of as usually being behind, the main player character. • Adventure– player embarks on a mission or quest across an imaginary world of puzzles • Fighting/Action– player beats up other players, gets into car chases, sets off explosions, etc. • Real time strategy, god-games– player has a god like overview of a virtual world, and builds up communities, cities, colonies and observes or guides them through feast and famine, wars, natural disasters, etc. • Simulations– player operates or drives a simulated machine or event eg. an aircraft • Sports– player engages virtually in a real or imaginary sport • Role-playing game– any of a number of games in which player plays the role of a character and interacts with a world and other characters operated by the machine • Online versions MUDs, MMORPGs– evolutionary forms of role-playing games, in which many players go on-line and extend their communities, meet player in other places, battle for control, fall in love, trade, fight, etc.
Brief History of AI in Games • Artificial intelligence has a long and peculiar relationship with games • Chess was mentioned in some of the first published works on the subject • Traditionally, (from late1950s) board games were used as “toy worlds” – simplified, bite-sized problems which could be easily represented a data structures eg. checkers, chess, backgammon • After years of this, AI was criticised in the 80s as being insufficiently general and so applicable to real-world problems • The discipline then went in search of successes in industrial, commercial and scientific domains (application problems) • During the 90s, as computer games become more sophisticated and required more built-in intelligence, so various kinds of games again became one of its main applications
What is AI? • Intelligence is the ability to think and learn in order to deal with the world and solve problems • In order to do that, someone (or something) needs the a brain (or its equivalent) to do what is thought to be at least partially a sophisticated information processing task • The rise of the computer made it conceivable that a machine might be able to perform some of the mental processing formerly reserved for the brain • Artificial intelligence is an applied science, that combines· computer science,· cognitive science (esp. psychology)· philosophy (not a science) • More broadly: AI is a general investigation of the nature of intelligence and the principles and mechanisms required for understanding or replicating it.
The Uses of AI in Games • There is a certain skepticism about the value of AI methods among some designers. But some game makers have been forced to AI techniques, because they can be used to do things that can’t (easily) be done otherwise • For example, many role-playing games have Non-Player Characters (characters in the game but not controlled by a human player). Ideally, these would still act reasonably intelligently. AI can help achieve this • Even in games that do not include NPCs, AI techniques can be applied eg a rule-based system might be used to manage the physics of interaction between inanimate objects in the game • Two coming revolutions for game design: - technological revolution– application of AI methods to achieve standard design goals for gameplay, only faster and more efficiently - design revolution –building on the successes in AI-driven intelligent NPCs, new kinds of gameplay can be designed in
Game Development Method Informal view: • Analysis – figure out how the existing design and platform affect the general task, investigate possible restrictions and assumptions. • Understanding – precisely define the problem and decide high-level criteria for testing Formalisation: • Specification – define the interface between the AI stuff and the game engine • Research – find or invent AI techniques and express your problem in its terms to allow a solution Programming: • Development – actually implements the theory as an AI software module • Application – places the AI module into the game software to get it to solve the problem Testing Loop: • Experimentation – informally assess the prototype by trying it out on arbitrary problem cases • Testing –systematically evaluate the solution with a test bank derived from the high level criteria Post-production: • Optimisation –refine the actual implementation to make it “lean and mean”
What is AI? Traditionally, AI has divided into two competing camps: 1. Conventional Artificial Intelligence (“Good Old-Fashioned AI”) • Symbol manipulation according to logical rules • Algorithms and heuristics • Knowledge-based systems, expert systems, case-based reasoning • Logic-driven 2. Computational Intelligence (“Soft Computing”) • Brain-like machines inspired by biology of living creatures • Emphasis on learning and adaptation • Artificial Neural Networks • Fuzzy Set Theory / Fuzzy Logic • Evolutionary Computation / Genetic Algorithms • Data-driven • More recently a third camp, which emphasises embodied, active engagement with the world, situatedness and robotics has arisen. Our own approach combines parts of all of these camps in a very modern way.
What is AI, Anyway? People approach the subject in different ways, but we can pick out 3 main goals of AI research: • Empirical:Experimental modeling of existing intelligent systems - work done in collaboration with work in psychology, linguistics, philosophy etc. eg a computer model of human speech • Theoretical:Analysis and exploration of possible intelligent systems, towards theories helping our understanding of how intelligence workseg Brook’s subsumption architecture • Practical: Solving real problems in the light of the above two goals, namely: designing useful new intelligent or semi-intelligent machines eg experimental robot Cog • All this is quite hard, and still very much work in progress.
Heroes of AI #1 – Alan Turing • Significant early paper was“Computing Machinery and Intelligence”, by the British mathematicianAlan Turing (1950). In it he argues that philosophical questions such as • Is there thought without experience? • Is there language without living? • Is there intelligence without life?are all really variations on the fundamental new question of artificial intelligence: “Can a machine think?”. • He invented the Turing Imitation Game to help define artificial intelligence. One version of this game had a person conversing with an unseen computer via a teletype. If the person could not distinguish the computer from a person, the machine could be said to be exhibiting intelligence. Turing had defined intelligence in terms ofsymbol (word) manipulation. • Because Turing had already advanced the Church-Turing Thesis (‘any symbol manipulation process M that can be described, can be computed’) this meant that if intelligence could be described well enough, it could be done by a machine.
Brief History of AI in Games • Even before the beginning of AI in the 1950s, mathematicians had been interested in games • Developed game theory, which is a systematic way of analysing the logic of formal games, from chess to war – applications in planning for economics and military strategy • Games can have one or many players, one or more winners, different kinds of payoff, complete or incomplete information, alternating turns or concurrent play, one game or a tournament, etc. • One question is: given a set of rules and range of possible moves, what is a player’s next move to maximise the chances of success? • This kind of thinking led to some useful ideas which were eventually taken up once computers became available
Brief History of AI in Games • By analysing the nature of gameplay, theorists could come up with algorithms or heuristics which could govern the next move, such as the minimax principle • These could be applied on paper to a game, or (more fun) programmed into real machines that could play • By the end of the 1950’s Samuels had designed a computerised game of checkers which could improve by playing an early example of machine learning • People began programming chess games as soon as they could get access to a computer • Today, chess machines and software are cheap and commonly beat all but the best human players • And the really good ones can even do that...
AI Methods • Because AI is a relatively new science, there is still debate about how it should be done (rather than only what are the answers). • Neat vs Scruffy. Neat AI empasises mathematical formalisation, formal logic and proof by theorem. Scruffy AI emphasises purpose-built representations, experimentation with algorithms and heuristics and working programs as proof of concept. • Contribution from Cognitive Sciences Brain science and advances in psychology have made a real contribution to AI. But brain science has also benefited from the attempt to build artificial minds, at least historically. • Robotics Some argue that intelligence is not merely symbol manipulation, but has a physical element as well. They build robot machines to help collect, organise and deploy knowledge in the world by skilled action. • A-life Artificial life method involves simulating biology, and building up colonies of artificial living creatures (multiple interacting software creatures) into systems with interesting emergent behaviour. • nouvelle Game AI Most recent methodology, related to robotics and A-life. Lifelike non-player characters are embodied in a challenging environment, in which they can interact with the researcher or other non-player characters.
Image: Panther Books What We Want from AI • Characteristics of an intelligent system (a wish list) - exhibit adaptive, goal-oriented behaviour - learn from experience - use vast amounts of knowledge - interact with humans using language - tolerate error and ambiguity in communication - respond in real time • exhibit self awareness (do we need that?) • What would it mean (philosophically, to society) if the goals of AI were to be achieved? In what relationship would a truly intelligent machine stand to human beings?
What We’ll Do in this Module • We’ll try the nouvelle-game AI approach • To simplify writing of AI code, the environment and integrating the two, we will use a standard development platform, Unreal Development Kit UDK • Our main purpose will be to learn about AI techniques, not so much the games themselves. • We will place NPCs into game environments • The NPCs will look like enemy aliens or robots • We will write new brains for them, using AI techniques • We will then be able to observe AI at work, by going into the game world and observing how well the new brains enable the NPCs to survive and prosper in the game • We will also try out some other AI programs and demos
Summary • Video games, including computer games, are now an important part of the software industry. • There’s increasing demand from players for more sophisticated interaction and storylines • One way of meeting this need is to apply AI, the general investigation of the nature of intelligence - and the principles and mechanisms required for understanding or replicating it. • Pioneers like Alan Turing established the field of AI in the 1940s and 50s • AI has a historical association with games, since these were regarded as simple domains – ‘toy worlds’ which it would be easy to represent as data structures and easy to write algorithms that could manipulate them • AI has 3 basic goals: empirical, theoretical and practical • Since the popularity of computer games has increased, it has become an important application for AI, and has now formed the basis for a novel approach to AI • In this module we will try to use AI to control artificial non-player characters, or bots, in interactive first person shooters.