Artificial intelligence
Introduction
• The field of artificial intelligence, or AI, is concerned with not just
understanding but also building intelligent entities
• machines that can compute how to act effectively and safely in a wide variety of
novel situations.
• AI subfields:
• the general
• (learning, reasoning, perception, and so on)
• the specific,
• playing chess, proving mathematical theorems, writing poetry, driving a car, or diagnosing
diseases.
• AI is relevant to any intellectual task;
• it is truly a universal field.
2
• Researchers have pursued several different versions of AI
• human performance, and rationality (doing the “right thing)
• thought processes (internal) and reasoning, and intelligent behavior (external)
• From these two dimensions—human vs. rational and thought vs.
behavior—there are four possible combinations…
• Machine learning is a subfield of AI that studies the ability to improve
performance based on experience.
3
Four Definitions of AI
1. Thinking Humanly (Cognitive modeling)
2. Acting Humanly (Turing Test)
3. Thinking Rationally (Laws of thought)
4. Acting Rationally (Rational agents)
4
1.1.1 Acting humanly: The Turing test
approach
• “Can a machine think?”
• A computer passes the test if a human interrogator, after posing some written
questions, cannot tell whether the written responses come from a person or from a
computer.
• The computer would need the following capabilities:
• natural language processing
• to communicate successfully in a human language
• knowledge representation
• to store what it knows or hears
• automated reasoning
• to answer questions and to draw new conclusions
• machine learning
• to adapt to new circumstances and to detect and extrapolate patterns
5
… Acting humanly: The Turing test approach
• To pass the total Turing test, a robot will need:
• Computer vision and speech recognition
• to perceive the world
• Robotics
• to manipulate objects and move about.
• These six disciplines compose most of AI
• it is more important to study the underlying principles of intelligence
6
1.1.2 Thinking humanly: The cognitive
modeling approach
• We can learn about human thought in three ways:
• Introspection (the examination or observation of one's own mental and
emotional processes.) التأمل الذاتي
• trying to catch our own thoughts as they go by
• psychological experiments
• observing a person in action
• brain imaging
• observing the brain in action
• Once we have a sufficiently precise theory of the mind, it becomes
possible to express the theory as a computer program.
7
… Thinking humanly: The cognitive modeling
approach
• The interdisciplinary field of cognitive science brings together:
• computer models from AI
• and experimental techniques from psychology
• to construct precise and testable theories of the human mind
• Example: recently, the combination of neuroimaging methods with
machine learning techniques has led to the beginnings of a capability
to “read minds”
• that is, to discover the semantic content of a person’s inner thoughts.
8
1.1.3 Thinking rationally: The “laws of
thought” approach
• Aristotle syllogisms ( )القياسات المنطقيةprovided patterns for argument
structures that always yielded correct conclusions when given correct
premises
• The canonical example starts with Socrates is a man and all men are mortal
and concludes that Socrates is mortal
• These laws of thought were supposed to govern the operation of the
mind
• their study initiated the field called logic
• The theory of probability allows rigorous ( ( صارمreasoning with
uncertain information
• it allows the construction of a comprehensive model of rational thought
9
1.1.4 Acting rationally: The rational agent
approach
• An agent is just something that acts
• Of course, all computer programs do something, but computer agents
are expected to do more: operate autonomously, perceive their
environment, persist over a prolonged time period, adapt to change,
and create and pursue goals.
• A rational agent is one that acts to achieve the best outcome
• or, when there is uncertainty, the best expected outcome
• AI has focused on the study and construction of agents that do the
right thing
• What counts as the right thing is defined by the objective that we provide to the agent
10
… Acting rationally: The rational agent
approach
• Perfect rationality—always taking the exactly optimal action—is not
feasible in complex environments.
• The computational demands are just too high.
• Chapters 6 and 16 deal with the issue of limited rationality—
• acting appropriately when there is not enough time to do all the
computations one might like.
• However, perfect rationality often remains a good starting point for
theoretical analysis. ( bench mark?)
11
1.1.5 Beneficial machines
Goal:
• Develop machines that are beneficial to humans by aligning their
objectives with human values
• The problem of achieving agreement between our true preferences and
the objective we put into the machine is called the value alignment
problem
• the values or objectives put into the machine must be aligned with those of the
human
• Machines must pursue our objectives, not just their programmed ones.
• Challenge:
• We cannot perfectly specify human preferences in the machine.
• It is impossible to anticipate all the ways in which a machine pursuing a fixed
objective
12
… Beneficial machines
• If we cannot transfer those objectives perfectly to the machine, then
we need a new formulation—
• one in which the machine is pursuing our objectives, but is necessarily
uncertain as to what they are.
• When a machine knows that it doesn’t know the complete objective,
• it has an incentive to act cautiously,
• to ask permission,
• to learn more about our preferences through observation,
• and to defer to human control.
• Ultimately, we want agents that are provably beneficial to humans.
13
• The final element in the philosophical picture of the mind is the
connection between knowledge and action.
• This question is vital to AI because intelligence requires action as well as
reasoning.
• Moreover, only by understanding how actions are justified can we understand
how to build an agent whose actions are justifiable (or rational).
• Aristotle’s algorithm was implemented 2300 years later by Newell and
Simon in their General Problem Solver program.
14
… Philosophy
• Thinking purely in terms of actions achieving goals is often useful but
sometimes inapplicable.
• For example, if there are several different ways to achieve a goal, there needs
to be some way to choose among them.
• More importantly, it may not be possible to achieve a goal with certainty, but
some action must still be taken.
• The modern idea of rational decision making under uncertainty
involves maximizing expected utility, as explained in Chapter 15.
• In matters of ethics and public policy, a decision maker must consider
the interests of multiple individuals.
15
1.2.2 Mathematics
• Philosophers draw some of the fundamental ideas of AI, but the jump
to a formal science required the mathematization of logic and
probability and the introduction of a new branch of mathematics:
computation.
• The theory of probability can be seen as generalizing logic to
situations with uncertain information—a consideration of great
importance for AI.
• Bayes’ rule is a crucial tool for AI systems.
• The formalization of probability, combined with the availability of
data, led to the emergence of statistics as a field.
16
1.2.3 Economics
• Economics is no longer the study of money;
• rather it is the study of desires and preferences.
• Decision theory provides a formal and complete framework for
individual decisions (economic or otherwise) made under uncertainty.
• Since the 1990s, there has been a resurgence of interest in decision
theoretic techniques for AI.
17
1.2.4 Neuroscience
• Neuroscience is the study of the nervous system, particularly the
brain.
• The brain consists largely of nerve cells, or neurons.
• A collection of simple cells can lead to thought, action, and
consciousness.
• We now have some data on the mapping between areas of the brain
and the parts of the body that they control or from which they
receive sensory input.
18
… Neuroscience
19
… Neuroscience
• The development of functional magnetic resonance imaging (fMRI) is
giving neuroscientists unprecedentedly detailed images of brain
activity,
• enabling measurements that correspond in interesting ways to ongoing
cognitive processes.
• The development of brain–machine interfaces for both sensing and
motor control not only promises to restore function to disabled
individuals, but also sheds light on many aspects of neural systems.
• Brain can adjust itself to interface successfully with an external device,
treating it in effect like another sensory organ or limb.
20
… Neuroscience
21
1.2.5 Psychology
• Cognitive psychology views the brain as an information-processing
device.
• Kenneth Craik (1943) specified the three key steps of a knowledge-
based agent:
• (1) the stimulus must be translated into an internal representation,
• (2) the representation is manipulated by cognitive processes to derive new
internal representations,
• (3) these are in turn retranslated back into action.
• The development of computer modeling led to the creation of the
field of cognitive science.
22