Download Week 1 - School of Engineering and Information Technology

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Intelligence explosion wikipedia , lookup

Ethics of artificial intelligence wikipedia , lookup

Existential risk from artificial general intelligence wikipedia , lookup

Computer Go wikipedia , lookup

History of artificial intelligence wikipedia , lookup

Philosophy of artificial intelligence wikipedia , lookup

Artificial intelligence in video games wikipedia , lookup

Transcript
Welcome to ICT219
Intelligent Systems
Administrative Stuff...
• Unit Coordinator and Lecturer
Dr. Graham Mann
ECL 2.061 Phone (9360 7270)
[email protected]
ICT219
1
Things to Do (to get set up)
Sign up for a 1 hour practical lab (soon)
Labs are in ECL2.005. Go there and sign your name up
for one (only) of the labs on the lab sheets
Start going there from Week 2. Meet your tutor there.
ICT219
2
More Things to Do
• Get the Unit Information handout. !Read carefully!
• Have a look at the website; there’s plenty there
http://wwwit.murdoch.edu.au/units/ICT219/
• Get the textbook. Read the textbook. The sections for
each week will be given out in the lectures.
• Keep an eye on your enrolment paperwork. If you
plan to withdraw, do it early.
• If you plan to work on your home machine, install
Quake II, FEAR, and the other software soon.
ICT219
3
Topic 1
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 unit
Reading: Champandard (2003) Chapters 1 and 2
See also http://www.aigamedev.com
ICT219
4
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 (eg
Doom, 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. (eg Grabbed by the
Ghoulies, State of Emergency 2)
- games that work on mobile phones or PDAs (eg Tour of Duty)
• Most of the games we will learn about in this unit are computer
games
ICT219
5
Computer Games – The Market
• The world market was $24.5 billion in 2003, and is expected to be
$28.4 billion by 2007*
• 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
* Source: Entertainment and Leisure Software Publishers Association. Converted from US dollars at Feb,
2006 rate.
ICT219
6
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 eg Donkey 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.
ICT219
7
ICT219
8
ICT219
9
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
ICT219
10
What is AI, anyway?
• 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.
ICT219
11
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
• Champandard speaks of 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
ICT219
12
Champandard’s Game Development
Method
This is an attempt to formalise something that is actually a bit messy, but...
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”
ICT219
13
What is AI, Anyway?
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.
ICT219
14
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 works
eg 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.
ICT219
15
Heroes of AI #1 – Alan Turing
• Significant early paper was “Computing Machinery and Intelligence”, by the
British mathematician Alan 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 of
symbol (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.
ICT219
16
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
ICT219
17
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 canICT219
even do that...
Image: MS Encarta Encylopedia 2000
18
Image: Darrin Mossor
Image: MS Encarta Encylopedia 2000
ICT219
19
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.
ICT219
20
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?)
Image: Panther Books
•
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?
ICT219
21
What We’ll Do in this Unit
• We’ll try the nouvelle-game AI approach
• Our main purpose will be to learn about AI techniques, not so much
the games themselves.
• We will place NPCs into game environments (Quake II, Guntactyx)
• The NPCs (also called ‘animats’) 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
ICT219
22
Compiling an Animat
• Take a demo animat from the AIGameDev website
• Or write your own animat by generating your own XLM
template and writing C++ code (usually called Brain)
• Unless you are an expert it is better to modify an existing
animat than make a new one completely from scratch
• Compile the animat using the MS Visual Studio 6.0
• Check that it has compiled, debug as necessary
ICT219
23
customise an
XML template
and/or...
use/modify an
existing animat
build using
Visual Studio
C++ compiler
modules
(FEAR) Server
animats
(FEAR) Server
sv add <name>
FEAR/Quake2
ICT219
24
Running the Animat
• Run the FEAR/Quake 2 server with a command line
prompt by double clicking (FEAR) Server. Force the
animat under test in by typing
sv add <name of animate directory>
====== Quake2 Initialized ======
==== InitGame ====
------- Server Initialization ------49 entities inhibited
0 teams with 0 entities
-------- FEAR Initialisation -------obituaries disabled
acceleration disabled
0 bots requested
------------------------------------sv add 05-Dr.Spin
Dr. Spin connected
Dr. Spin entered the game.
bots = 1
• To observe the animat’s behaviour, enter the game as a
human player clicking (FEAR) Player.
ICT219
25
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 unit we will use AI to control artificial non-player characters, or
animats, in interactive first person shooters, Quake 2 and Guntactyx