AI Summary
AI Summary
Chapter 1 2
1. Acting humanly: The Turing test approach 3
2. Thinking humanly: The cognitive modeling approach 4
3. Thinking rationally: The “laws of thought” approach. 5
4. Acting rationally: The rational agent approach. 6
Summary from the book 7
Chapter 2 8
Good Behavior: The Concept of Rationality. 9
PEAS Examples 10
Properties of task environments / Environment Types 11
The Structure of Agents 12
1. Simple reflex agents 13
2. Model-based reflex agents 14
3. Goal-based agents 16
4. Utility-based agents 19
summary from the book 20
2
Chapter 1
The quest for “artificial flight” succeeded when engineers and inventors
stopped imitating birds and started using wind tunnels and learning
about aerodynamics.
)"(الهدف ليس التقليد وإنما فهم طريقة العمل"هذا االتجاه لم يطبق ذلك
4
To say that a program thinks like a human, we must know how humans
think. We can learn about human thought in three ways:
• Two refinements to this simple idea are needed: first, the ability of any
agent, human or otherwise, to choose rational actions is limited by the
computational intractability of doing so; second, the concept of a
machine that pursues a definite objective needs to be replaced with that
of a machine pursuing objectives to benefit humans, but uncertain as to
what those objectives are.
Chapter 2
PEAS Examples
Points:
agent architecture : agent = architecture + program.
agent architecture : design an agent program that implements the agent
function.
agent function : the mapping from percepts to actions.
- Agent programs
We describe the agent programs in the simple pseudocode language.
Can AI do for general intelligent behavior what Newton did for square
roots(the huge tables of square roots have now been replaced by a 5-line
program for Newton’s method)? We believe the answer is yes.
four basic kinds of agent programs that embody the principles underlying
almost all intelligent systems(can be reusable / Generic solution):
1.Simple reflex agents.
2.Model-based reflex agents.
3.Goal-based agents.
4.Utility-based agents.
13
2. case : Suppose that a simple reflex vacuum agent is deprived of its location
sensor and has only a dirt sensor. It can Suck in response to [Dirty]; what
should it do in response to [Clean]? ( Infinite loops).Escape from infinite loops
is possible if the agent can randomize its actions.
6. Figure :
14
2. case : if I got a state that is new for me I have two options to deal
with : random choice or choice based on similar states I have.
Uncertainty about the current state may be unavoidable, but the agent
still has to make a decision.
3. how it works :
First, we need some information about how the world changes over time
/ transition model of the world (how the world works. It describes how different
actions or events lead to changes in the state of the system or the environment.),
which can be divided roughly into two parts: the effects of the agent’s
actions (This involves knowing how the agent's actions influence the state of the
world.) and how the world evolves independently of the agent (This part of
knowledge pertains to the changes that occur in the world without any direct
influence from the agent).
Second, we need some information about how the state of the world is
reflected in the agent’s percepts (sensor model).
- sensor model : how the state of the world is reflected in the agent’s
percepts (translating sensory data into a meaningful representation of the
world).
Together, the transition model and sensor model allow an agent to keep
track of the state of the world—to the extent possible given the
limitations of the agent’s sensors.
15
4. pseudocode : (It keeps track of the current state of the world, using an
internal model. It then chooses an action in the same way as the reflex
agent.)
function MODEL-BASED-REFLEX-AGENT(percept) returns an action
persistent: state, the agent’s current conception of the world state
transition model, a description of how the next state depends on
the current state and action
sensor model, a description of how the current world state is
reflected in the agent’s percepts
rules, a set of condition–action rules
action, the most recent action, initially none
state←UPDATE-STATE(state, action, percept, transition model,sensor
model)
rule←RULE-MATCH(state,rules)
action←rule.ACTION
return action
5. Figure :
16
3. Goal-based agents
1. definition : as well as a current state description, the agent needs
some sort of goal information that describes situations that are desirable.
3. how it works : It keeps track of the world state as well as a set of goals
it is trying to achieve, and chooses an action that will (eventually) lead to
the achievement of its goals. Although the goal-based agent appears
less efficient, it is more flexible because the knowledge that supports its
decisions is represented explicitly and can be modified (means I can
modify the goal based on my needs).
4. pseudocode :
function GOAL-BASED-AGENT(percept) returns an action
persistent: state, the agent’s current conception of the world state
goals, a list of the agent's current goals
rules, a set of condition–action rules
state ← UPDATE-STATE(state, percept)
while goals are not achieved:
for each goal in goals:
if goal.is_achieved(state):
goals.remove(goal)
rule ← RULE-MATCH(state, goals, rules)
action ← rule.ACTION
return action
17
5. Figure :
18
4. Utility-based agents
1. definition : A more general performance measure should allow a
comparison of different world states according to exactly how happy they
would make the agent (Because “happy” does not sound very scientific,
computer scientists use the term utility instead).
4. pseudocode :
function UTILITY-BASED-AGENT(percept) returns an action
persistent: state, the agent’s current conception of the world state
utility function, a function that measures the desirability of a state
possible_actions, a list of all possible actions in the current state
action, the most recent action, initially none
best_action, the most best action, initially none
state ← UPDATE-STATE(state, percept)
possible_actions ← GENERATE-POSSIBLE-ACTIONS(state)
expected_utility ← CALCULATE-EXPECTED-UTILITY(action, state)
for each action in possible_actions:
if expected_utility > max_utility:
max_utility ← expected_utility
best_action ← action
return best_action
5. Figure :
20
This chapter has been something of a whirlwind tour of AI, which we have
conceived of as the science of agent design. The major points to recall are as
follows:
- An agent is something that perceives and acts in an environment. The
agent function for an agent specifies the action taken by the agent in
response to any percept sequence.
- The performance measure evaluates the behavior of the agent in an
environment. A rational agent acts so as to maximize the expected
value of the performance measure, given the percept sequence it has
seen so far.
- A task environment specification includes the performance measure,
the external environment, the actuators, and the sensors. In designing
an agent, the first step must always be to specify the task environment
as fully as possible.
- Task environments vary along several significant dimensions. They can
be fully or partially observable, single-agent or multiagent, deterministic
or nondeterministic, episodic or sequential, static or dynamic, discrete
or continuous, and known or unknown.
- In cases where the performance measure is unknown or hard to specify
correctly, there is a significant risk of the agent optimizing the wrong
objective. In such cases the agent design should reflect uncertainty
about the true objective.
- The agent program implements the agent function. There exists a
variety of basic agent program designs reflecting the kind of information
made explicit and used in the decision process. The designs vary in
efficiency, compactness, and flexibility. The appropriate design of the
agent program depends on the nature of the environment.
- Simple reflex agents respond directly to percepts, whereas
model-based reflex agents maintain internal state to track aspects of the
world that are not evident in the current percept. Goal-based agents act
to achieve their goals, and utility-based agents try to maximize their own
expected “happiness.”
- All agents can improve their performance through learning.