AI Basics PDF
AI Basics PDF
Basics
Alexander K. Seewald 1
[email protected] / alex.seewald.at
Spam Filtering
Problem
• Spam : Nonspam = 17 : 1; 200 spams/day
Alexander K. Seewald 2
[email protected] / alex.seewald.at
Stahlwerk Bous & Siemens
Alexander K. Seewald 4
[email protected] / alex.seewald.at
What is Artificial Intelligence?
Systems that think like humans Systems that think rationally
"The exciting new effort to make "The study of mental faculties
computers think... machines with through the use of computational
minds, in the full and literal sense" models" (Charniak and McDermott,
(Haugeland, 1985) 1985)
"[The automation of] activities that
we associate with human thinking, "The study of the computations that
activities such as decision-making, make it possible to perceive, reason
problem solving, learning..." and act" (Winston, 1992)
(Bellman, 1978)
Systems that act like humans Systems that act rationally
"The art of creating machines that "A field of study that seeks to
perform functions that require explain and emulate intelligent
intelligence when performed by behavior in terms of computational
people" (Kurzweil, 1990) processes" (Schalkoff, 1990)
Alexander K. Seewald
5
[email protected] /
Systems that act like humans
The Turing Test
Computing machinery and intelligence [Turing, 1950]
• "Can machines think?" ⇒ "Can machines behave
intelligently?"
• Operational test for intelligent behavior = Imitation Game
• Pred. 30% chance for machine to fool lay person for 5mins
• Anticipated all major arguments against AI(!)
• Suggested major components of AI: knowledge, reasoning,
language understanding, learning
Alexander K. Seewald 6
[email protected] / alex.seewald.at
Systems that think like humans
Cognitive Science
1960s Cognitive Revolution: information processing
psychology replaced prevailing orthodoxy of behaviourism
Both approaches are distinct from AI; but still share direction.
Alexander K. Seewald 7
[email protected] / alex.seewald.at
Systems that think rationally
Laws of Thought
• Normative (or prescriptive) rather than descriptive.
• Aristotle: what are correct arguments / thought processes?
• Several Greek schools developed various forms of logic =
notation and rules of derivation for thoughts; may or may
not have proceeded to the idea of mechanization.
Problems
• Not all intelligent behavior is related to logical deliberation
• The purpose of thinking = What thoughts should I have?
Alexander K. Seewald 8
[email protected] / alex.seewald.at
Systems that act rationally
Doing the right thing
• Rational behaviour: doing the right thing
• The right thing: which is expected to maximize goal
achievement given the available information
• Doesn't necessarily involve thinking, but thinking should
be in the service of rational action.
Alexander K. Seewald 9
[email protected] / alex.seewald.at
AI prehistory
Philosophy logic, methods of reasoning
mind as physical system
foundations of learning, language, rationality
Mathematics formal representation and proof
algorithms, computation, (un)decidability,
(in)tractability, probability
Psychology adaptation, phenomena of perception and
motor control, experimental techniques
Economics formal theory of rational decisions
Linguistics knowledge representation, grammar
Neuroscience plastic physical substract for mental activity
Control theory homeostatic systems, stability
simple optimal agent designs
Alexander K. Seewald 10
[email protected] / alex.seewald.at
History of AI
1943 McCulloch & Pitts: Boolean circuit model of brain
1950 Turing's Computing Machinery and Intelligence
1952-69 Look, Ma, no hands! - Phase
1950s Early AI programs: Samuel's checkers, Newell &
Simon's Logic Theorist; Winograd's Blocks World
1956 Dartmouth meeting: Artificial Intelligence adopted
1965 Robinsons complete logical reasoning algorithm
1966-74 AI discovers computational complexity
1969-79 Early development of knowledge-based systems
1980-88 Expert systems industry booms
1988-93 Expert systems industry busts: "AI Winter"
1988- Resurgence of probability; increase in technical depth
"Nouvelle AI": ALife, GAs, soft computing
1995- Agents metaphor
Alexander K. Seewald 11
[email protected] / alex.seewald.at
Agents and environments
An agent is everything that
perceives and acts.
The whole field of AI can
be viewed as being
concerned with design of
intelligent agents.
Agents include humans, robots, softbots, vacuums cleaners...
The agent function maps from percept histories to actions:
f: P* → A
For any given class of environments and tasks, we seek the
agent with the best performance. Computational limitations
make perfect rationality unachievable.
Alexander K. Seewald 12
[email protected] / alex.seewald.at
Types of agents
Four basic agent types in order of increasing generality:
• Simple reflex agent
• Reflex agent with state
• Goal-based agent
• Utility-based agent
Alexander K. Seewald 13
[email protected] / alex.seewald.at
Simple reflex agent
Alexander K. Seewald 14
[email protected] / alex.seewald.at
Example: Vacuum cleaner agent
Alexander K. Seewald 15
[email protected] / alex.seewald.at
Reflex agent with state
Alexander K. Seewald 16
[email protected] / alex.seewald.at
Example: Ant-based routing
[Di Caro & Dorigo, 1998] have shown that ant-based routing
outperforms other common routing methods. State is the
history of visited nodes; similar to pheromone tracks in
real ants.
Alexander K. Seewald 17
[email protected] / alex.seewald.at
Goal-based agent
Alexander K. Seewald 18
[email protected] / alex.seewald.at
Example: RoboCat
Alexander K. Seewald 19
[email protected] / alex.seewald.at
Utility-based agent
Alexander K. Seewald 20
[email protected] / alex.seewald.at
Example: Invisible Person
sources\IP_TTT.MPG
Alexander K. Seewald 21
[email protected] / alex.seewald.at
Simple Learning Agent (reflex-based)
Alexander K. Seewald 22
[email protected] / alex.seewald.at
Example: Stanley
Autonomous robot vehicle which won the DARPA Challenge
2005. Built at Stanford University in about 15 months by a
team of around 35 people. Uses Machine-Learned Laser
Perception and Speed Strategy.
Presenting Stanley
Alexander K. Seewald 23
[email protected] / alex.seewald.at
How can we build such agents?
• Learning
Alexander K. Seewald 24
[email protected] / alex.seewald.at
Search / Problem Solving
Search is a central theme in AI. The fastest path through a
city; VLSI layout; the correct interpretation of a given
sentence; and even general learning - all these can be
formulated as search problems.
Alexander K. Seewald 25
[email protected] / alex.seewald.at
Search / Problem Solving
A problem consists of: the initial state, a set of operators, a
goal test function, and a path cost function. The
environment of the problem is represented by a state
space.
Alexander K. Seewald 26
[email protected] / alex.seewald.at
Search / Problem Solving
A single general search algorithm can be used to solve any
problem. Search algorithms are judged on completeness,
optimality, time complexity and space complexity.
Complexity depends on b, the branching factor; and d, the
depth of the shallowest solution.
Alexander K. Seewald 27
[email protected] / alex.seewald.at
Search / Problem Solving
Depth-first search expands the deepest node in the search
tree first. It is neither complete nor optimal, and has time
complexity of O(bm) and space complexity of O(bm),
where m is the maximum depth.
Alexander K. Seewald 28
[email protected] / alex.seewald.at
Search / Problem Solving
Alexander K. Seewald 29
[email protected] / alex.seewald.at
Search / Problem Solving
A* search minimizes the current cost plus the estimated cost
to the goal. If the latter is never overestimated (admissible
heuristic) and we handle repeated states, A* is complete,
optimal, and optimally efficient among all optimal search
algorithms for a given admissible heuristic. Its space
complexity is still exponential in problem size.
Alexander K. Seewald 30
[email protected] / alex.seewald.at
Example: A* search
Alexander K. Seewald 31
[email protected] / alex.seewald.at
Search / Problem Solving
Alexander K. Seewald 32
[email protected] / alex.seewald.at
Example: Game as Search
Alexander K. Seewald 33
[email protected] / alex.seewald.at
Knowledge and Reasoning
Alexander K. Seewald 34
[email protected] / alex.seewald.at
Knowledge and Reasoning
Alexander K. Seewald 35
[email protected] / alex.seewald.at
Knowledge and Reasoning
Alexander K. Seewald 36
[email protected] / alex.seewald.at
Knowledge and Reasoning
Alexander K. Seewald 37
[email protected] / alex.seewald.at
Knowledge and Reasoning
Knowledge engineering is concerned with building a useful
knowledge base. Knowledge acquisition is the process by
which the knowledge engineer becomes educated about the
domain and elicits the required knowledge.
Alexander K. Seewald 38
[email protected] / alex.seewald.at
Knowledge and Reasoning
Alexander K. Seewald 39
[email protected] / alex.seewald.at
Example: VIE-PNN
• Knowledgebased
system for neo-
natal nutrition
• Rules derived
from expert
knowledge.
• HTML-based
interface.
• In clinical use
for >5 years at
AKH Vienna
Alexander K. Seewald 40
[email protected] / alex.seewald.at
Planning
Alexander K. Seewald 41
[email protected] / alex.seewald.at
Planning
STRIPS is too restricted for complex, realistic domains, but
can be extended in several ways; extensions of STRIPs are
still used in many realistic planning domains.
Alexander K. Seewald 42
[email protected] / alex.seewald.at
Planning
Alexander K. Seewald 43
[email protected] / alex.seewald.at
Planning
Execution monitoring is essential to ensure robustness.
Conditional planning takes failures into account when
planning; Replanning recomputes the whole plan on
failure. These are two points on a continuous spectrum.
Alexander K. Seewald 44
[email protected] / alex.seewald.at
Example: Shakey
Alexander K. Seewald 45
[email protected] / alex.seewald.at
Acting under Uncertainty
Uncertainty is inescapable in complex, dynamic or
inaccessible worlds; and means that many simplifications
that are possible with deductive inference are no longer
valid. Probability theory provides a way of summarizing
the uncertainty that comes from laziness and ignorance.
Alexander K. Seewald 46
[email protected] / alex.seewald.at
Acting under Uncertainty
Conditional independence information is a vital and robust
way to structure information about uncertain domains.
Alexander K. Seewald 47
[email protected] / alex.seewald.at
Example: Burglar alarm
Alexander K. Seewald 48
[email protected] / alex.seewald.at
Decision Theory
Simple decision problems can be solved by decision theory,
which relates what an agent wants (utility theory) to what
an agent should believe on the basis of evidence
(probability theory) Utility theory associates a utility
value to each state of the agent.
We can use decision theory to build a system that make
decisions by considering all possible actions and choosing
the one that leads to the best expected outcome. Such a
system is known as a rational agent.
Alexander K. Seewald 49
[email protected] / alex.seewald.at
Decision Theory
Alexander K. Seewald 50
[email protected] / alex.seewald.at
Question to the audience
What would you prefer?
A) 80% chance of winning 4000
B) 100% chance of winning 3000
[Allais, 1953] found that people strongly prefer B)
Alexander K. Seewald 51
[email protected] / alex.seewald.at
Communication
Agents need to communicate to each other and to the users.
Communication between learning agents is an active
research area which sheds light on the development of
language in humans.
In all these areas, there exist programs that are useful, but
there are no programs that do a throrough job in an open-
ended domain.
Alexander K. Seewald 52
[email protected] / alex.seewald.at
Shazam Entertainment
Alexander K. Seewald 53
[email protected] / alex.seewald.at
Agents as programming metaphor
• Procedural (classic) programming
• Declarative programming
• Object-oriented programming
• Constraint logic programming
• Event-oriented programming
• Knowledge-based software engineering
• Agent-based software engineering
...
Each of these gives an unique viewpoint on programming;
makes solving some problems easier and others harder. But
you still need a programmer!
For learning systems, you don't need a programmer. Most
of the work is done by learning systems.
Alexander K. Seewald 54
[email protected] / alex.seewald.at
Learning
Learning in intelligent agents is essential for dealing with
unknown environments; and for building agents without
prohibitive amount of work. All learning suffers from the
credit assignment problem = which steps are responsible
for a good or bad outcome?
Alexander K. Seewald 55
[email protected] / alex.seewald.at
Learning
Alexander K. Seewald 56
[email protected] / alex.seewald.at
Bias
"Bias refers to any criterion for choosing one generalization
over another other than strict consistency with the
observed training instances" (Mitchell, 1980)
Alexander K. Seewald 57
[email protected] / alex.seewald.at
Learning
A large variety of learning algorithms is
available, which can learn:
• A state evaluation function to play checkers
• A belief network to model sleep stages
• A function to predict steel quality in production
• A function to predict insurance risks
• Logic programs to determine cancerogenity
• Association rules in supermarket basket analysis
• Time-dependent models of speech
• Response models of mailable customers
...
Alexander K. Seewald 58
[email protected] / alex.seewald.at
But learning is still hard! Why?
Inductive learning is inherently risky
• There is no safe way to predict the future.
• Bias is essential, but may be wrongly chosen.
No Free Lunch!
• Theoretically, it is not possible to learn anything.
• Practically, the world shows an enormous variety
of patterns. Life has adapted over billions of
years to take advantage of these specific patterns.
Alexander K. Seewald 59
[email protected] / alex.seewald.at
Example problem: Response Model
Problem: Not enough capacity to mail all customers.
⇒ Improve effectiveness by learning a response
model: 30% higher volume with same cost.
Alexander K. Seewald 60
[email protected] / alex.seewald.at
Example problem: Churn
Alexander K. Seewald 61
[email protected] / alex.seewald.at
Rules for Churn (1)
(total_day_minutes >= 245) and (total_eve_minutes >= 225.2) and
(voice_mail_plan = no) and (total_night_minutes >= 170.6) =>
churn=True. (64.0/0.0)
(total_day_minutes >= 236.9) and (total_night_minutes >= 230.6) and
(voice_mail_plan = no) and (total_eve_minutes >= 197.7) =>
churn=True. (12.0/1.0)
(total_day_minutes >= 223.3) and (total_day_minutes >= 264.8) and
(voice_mail_plan = no) and (total_eve_minutes >= 188) and
(total_night_minutes >= 132.9) => churn=True. (52.0/1.0)
(total_day_minutes >= 222.3) and (total_day_minutes >= 286.2) and
(voice_mail_plan = no) and (total_eve_minutes >= 150.8) =>
churn=True. (17.0/2.0)
(total_day_minutes >= 221.9) and (total_eve_minutes >= 261.6) and
(voice_mail_plan = no) => churn=True. (41.0/7.0)
Alexander K. Seewald 62
[email protected] / alex.seewald.at
Rules for Churn (2)
(number_customer_service_calls >= 4) and
(total_day_minutes <= 160) and (total_eve_minutes <=
233.2) and (total_night_minutes <= 254.9) =>
churn=True. (69.0/0.0)
(number_customer_service_calls >= 4) and
(total_day_minutes <= 182.1) and (total_eve_minutes
<= 190.7) and (total_night_minutes <= 285) =>
churn=True. (22.0/0.0)
(number_customer_service_calls >= 4) and
(total_day_minutes <= 135.9) and (account_length >=
72) => churn=True. (14.0/0.0)
(number_customer_service_calls >= 4) and
(total_eve_minutes <= 135) => churn=True. (12.0/4.0)
Alexander K. Seewald 63
[email protected] / alex.seewald.at
Rules for Churn (3)
(international_plan = yes) and (total_intl_minutes >=
13.2) => churn=True. (54.0/0.0)
Alexander K. Seewald 64
[email protected] / alex.seewald.at
Demo
Alexander K. Seewald 65
[email protected] / alex.seewald.at
Past Projects
2000-2005 Employed at OFAI as junior researcher
2001 EEG data analysis (contributed by Brain Research institute, Vienna)
2000-2002 A New Modular Architecture for Data Mining (FWF)
2002 3DSearch (multi-document summarization, EU & uma AG)
2002-2003 Intelligent Go Board (embedded device to capture moves of
Japanese Go during play, presented at Innovation Workship in ' 05)
2003-2005 BioMinT (integrated system for biological text mining, EU FP5)
2004-2006 SA Train (Spam training methodology for SpamAssassin, Evaluation
of commercial and open-source spam filter systems)
2005 Digits (handwritten digit recognition: open source corpus and
preliminary experiments)
2006 Employed at GE Money Bank as CRM Analyst
2006-2007 IGO-2 (image mining on images of Go final board states)
2007 Websuit (image mining on GFP/DIC images contributed by Univ. of
Colorado at Boulder; related to my recent ERC Ideas proposal)
2007- Employed at Ikarus in R&D for spam filtering and virus detection
Alexander K. Seewald 66
[email protected] / alex.seewald.at