Unit 1: Thinking Rationally
Unit 1: Thinking Rationally
Introduction
AI is the study of agents that exist in an environment and perceive and act.
AI attempts to understand intelligent entities.
Philosophy and Psychology also concerned with intelligence.
AI strives to build intelligent entities as well as understand them.
Building an Intelligent System – Expert Systems.
AI is the new discipline, formally initiated in 1956.
A student in physics might reasonably feel that all the good ideas have already been
taken by Galileo, Newton, Einstein, and the rest, and that it takes many years of study
before one can contribute new ideas.
AI, on the other hand, still has openings for a full-time Einstein.
Definitions of artificial intelligence:
o Thought Processes
o Reasoning
o Behavior
Definitions of AI are organized into four categories:
o Systems that think like humans.
o Systems that act like humans.
o Systems that think rationally.
o Systems that act rationally.
Acting humanly:
o Natural Language Processing.
o Knowledge Representation.
o Automated Reasoning.
o Machine Learning.
o Computer Vision.
o Robotics.
Thinking humanly:
o To get inside the actual working of human mind.
o Two ways to do this:
Through Introspection
Psychological Experiments
o Cognitive Science.
Is the combination of Computer Models from AI and Experimental Techniques from
Psychology.
Thinking rationally:
Logic systems are introduced
Acting rationally:
An agent is just something that perceives and acts.
- ability to represent knowledge and reason.
Foundations OF Artificial Intelligence
Philosophy
Philosophers made AI, by considering the ideas that the mind is in some ways like a
machine, that it operates on knowledge encoded in some internal language, and that
thought can be used to help arrive at the right actions to take.
Psychologists strengthened the idea that humans and other animals can be considered
information processing machines. Linguists showed that language use fits into this
model.
Mathematics
Mathematicians provided the tools to manipulate statements of logical certainty as
well as uncertain, probabilistic statements and created reasoning algorithms.
Computer engineering
Psychologists strengthened the idea that humans and other animals can be
considered information processing machines.
Linguistics
Linguists showed that language use fits into this model.
Al and establishes the cultural background, and its important points are,
In developing AI equipped systems, are you concerned with thinking or behavior?
Do you want to model humans, or work from an ideal standard?
Intelligence is concerned mainly with rational action.
An intelligent agent takes the best possible action in a situation.
The history of Al has had cycles of success, misplaced optimism, and resulting
cutbacks in enthusiasm and funding. There have also been cycles of introducing new
creative approaches and systematically refining the best ones.
"The field of computer science that studies how machines can be made to act
intelligently" (Jackson, 1986)
INTELLIGENT AGENTS
An agent is anything that can be viewed as perceiving its environment through sensors and
acting upon that environment through effectors/actuators.
4. Utility-based agents
- The basic environment simulator program. It gives each agent its percept, gets an
action from each agent, and then updates the environment.
An agent is something that perceives and acts in an environment. We split an agent into an
architecture and an agent program.
An ideal agent is one that always takes the action that is expected to maximize its
performance measure.
An agent is autonomous to the extent that its action choices depend on its own experience,
rather than on knowledge of the environment that has been built-in by the designer.
An agent program maps from a percept to an action, while updating an internal state.
Reflex agents respond immediately to percepts.
Goal-based agents act to accomplish their goals.
Utility-based agents try to maximize their own "happiness."
The process of making decisions by reasoning with knowledge is central to AI.
Developing Intelligent agents for the environments that are inaccessible, nondeterministic,
non-episodic, dynamic, and continuous are the most challenging.
PROBLEM-SOLVING
- Simple reflex agents are unable to plan ahead and their actions are determined only by
the current percept. They have no knowledge of what their actions do nor of what they
are trying to achieve.
- Goal based agents are called problem solving agents.
- Problem-solving agents decide what to do by finding sequences of actions that lead to
desirable states.
- Goal formulation: based on the current situation.
- Problem formulation: is the process of deciding what actions and states to consider
to frame a goal.
- Search Solution: The process of looking for such a sequence is called Search. A
search algorithm takes a problem as input and returns a solution in the form of an
action sequence.
- Execution: Once a solution is found, the actions it recommends can be carried out.
This is called the execution phase.
- A simple "formulate, search, execute" design for the agent.
FORMULATING PROBLEMS
- There are four essentially different types of problems.
o Single-state problems.
o Multiple-state problems.
o Contingency problems.
o Exploration problems.
PROBLEM
A problem is really a collection of information that the agent will use to decide what to do.
INITIAL STATE
Current percept of items, when the agent begins its production.
OPERATOR
The set of possible actions available to the agent.
SUCCESSOR FUNCTION
Identifying the next successful action available to perform in the sequence of actions.
STATE SPACE
The set of all states reachable from the initial state by any sequence of actions.
PATH
A path in the state space is simply any sequence of actions leading from one state to another.
GOAL TEST
The goal is specified by an abstract property.
- For example, in chess, the goal is to reach a state called "checkmate," where the
opponent's king can be captured on the next move no matter what the opponent does.
PATH COST
A path cost function is a function that assigns a cost to a path. (denoted by the symbol
together, the initial state, operator set, goal test, and path cost function define a problem.
SOLUTION
- A solution, that is, a path from the initial state to a state that satisfies the goal test.
STATE SET SPACE
- sets of states
Measuring problem-solving performance:
The effectiveness of a search can be measured in at least three ways.
1. Does it find a solution at all?
2. Is it a good solution (one with a low path cost)?
3. What is the search cost TOTAL COST associated with the time and memory
required to find a solution?
SEARCH COST
- Identifying an optimized solution based on a specific goal. (the time and memory
required for to find a solution)
TOTAL COST
- The total cost of the search is the sum of the path cost and the search cost.
EXAMPLE PROBLEMS
The nodes that are waiting to be expanded are called the fringe or frontier.
It is like a data structure called queue.
The operations on a queue are as follows:
- MAKE-Q\JEUE(Elements) creates a queue with the given elements.
- EMPTY?'(Queue) returns true only if there are no more elements in the queue.
- REMOVE-FRONT(Queue) removes the element at the front of the queue and returns
it.
- QUEUlNG-FN(Elements, Queue) inserts a set of elements into the queue. Different
varieties of the queuing function produce different varieties of the search algorithm.
-
SEARCH STRATEGIES
Finding the right search strategy for a problem is given in terms of four criteria:
1. Completeness: is the strategy guaranteed to find a solution when there is one?
2. Time complexity: how long does it take to find a solution?
3. Space complexity: how much memory does it need to perform the search?
4. Optimality: does the strategy find the highest-quality solution when there are several
different solutions?
Six Search Strategies are come under the heading of uninformed search.
1. Breadth-first search
2. Uniform cost search
3. Depth-first search
4. Depth-limited search
5. Iterative deepening search
6. Bidirectional search
Breadth-first search
- the root node is expanded first, then all the nodes generated by the root node are
expanded.
- all the nodes at depth d in the search tree are expanded before the nodes at depth d +
1.
- Breadth-first search can be implemented by calling the GENERAL-SEARCH
algorithm with a queuing function that puts the newly generated states at the end of
the queue.
- If there is a solution, breadth-first search is guaranteed to find it, and if there are
several solutions, breadth-first search will always find the shallowest goal state first.
- In terms of the four criteria, breadth-first search is complete, and it is optimal
provided the path cost is a non-decreasing function of the depth of the node.
- the memory requirements are a bigger problem for breadth-first search than the
execution time.
- the time requirements are still a major factor.
Depth-first search
- It always expands one of the nodes at the deepest level of the tree.
- This strategy can be implemented by GENERAL-SEARCH with a queuing function
that always puts the newly generated states at the front of the queue.
- The time complexity for depth-first search is O(bm).
- For problems that have very many solutions, depth-first may actually be faster than
breadth-first, because it has a good chance of finding a solution after exploring only a
small portion of the whole space.
Depth-limited search
- Depth-limited search avoids the pitfalls of depth-first search by imposing a cutoff on
the maximum depth of a path.
A constraint satisfaction problem (or CSP) is a special kind of problem that satisfies some
additional structural properties beyond the basic requirements for problems in general.