You are on page 1of 57

Introduction to

Intelligent Systems and


Intelligent Agents
BY
PROF. HARSHAL DALVI
Introduction to AI
Artificial intelligence (AI) is the ability of machines to replicate or enhance human intellect,
such as reasoning and learning from experience.
“algorithms enabled by constraints, exposed by representations that support models targeted
at loops that tie thinking, perception and action together.”- Patrick Winston (Former MIT
professor )
AI is an interdisciplinary science with multiple approaches, but advancements in machine
learning and deep learning are creating a paradigm shift in virtually every sector of the tech
industry.
Categories of AI
AI generally falls under two broad categories
Narrow AI: Sometimes referred to as "Weak AI," this kind of AI operates within a limited
context and is a simulation of human intelligence

Artificial General Intelligence (AGI): AGI, sometimes referred to as “Strong AI,” is the kind of AI
we see in movies.
EXAMPLES OF AI: NARROW AI
Siri, Alexa and other smart assistants
Self-driving cars
Google search
Conversational bots
Email spam filters
Netflix's recommendations
Types of Artificial Intelligence
Reactive Machines: able to perceive and react to the world in front of it as it performs limited
tasks
Limited Memory: able to store past data and predictions to inform predictions of what may
come next
Theory of Mind: able to make decisions based on its perceptions of how others feel and make
decisions
Self-Awareness: able to operate with human-level consciousness and understand its own
existence
Reactive Machines
A reactive machine cannot store a memory and, as a result, cannot rely on past experiences to
inform decision making in real-time.
Perceiving the world directly means that reactive machines are desi
Deep Blue, which was designed by IBM in the 1990s as a chess-playing supercomputer
Limited Memory
Limited memory AI has the ability to store previous data and predictions
when gathering information and weighing potential decisions
Limited memory AI is created when a team continuously trains a model
in how to analyze and utilize new data or an AI environment is built so
models can be automatically trained and renewed.
three major ML models that utilize limited memory AI:
◦ Reinforcement learning, which learns to make better predictions through repeated trial-and-
error.
◦ Long short term memory (LSTM), which utilizes past data to help predict the next item in a
sequence. LTSMs view more recent information as most important when making predictions and
discounts data from further in the past, though still utilizing it to form conclusions
◦ Evolutionary generative adversarial networks (E-GAN), which evolve over time, growing
to explore slightly modified paths based off of previous experiences with every new decision
Theory of Mind
Theory of Mind is just that — theoretical. We have not yet achieved the technological and
scientific capabilities necessary to reach this next level of AI.
The concept is based on the psychological premise of understanding that other living things have
thoughts and emotions that affect the behavior of one’s self
Self-awareness
This kind of AI possesses human-level consciousness and understands its own existence in the
world, as well as the presence and emotional state of others.
It would be able to understand what others may need based on not just what they communicate
to them but how they communicate it.
Machine Learning
ML Terminologies
Types of Machine Learning
Supervised learning
A machine learning approach that’s defined by its use of labeled datasets.
These datasets are designed to train or “supervise” algorithms into classifying data or
predicting outcomes accurately.
Using labeled inputs and outputs, the model can measure its accuracy and learn over time.
Supervised learning can be separated into two types of problems when data mining:
◦ classification
◦ regression
Supervised Learning
Classification
Classification problems use an algorithm to accurately assign test data into specific categories.
Common types of classification algorithms,
◦ Linear classifiers,
◦ Support vector machines,
◦ Decision trees
◦ Random forest
Regression
Regression is another type of supervised learning method that uses an algorithm to
understand the relationship between dependent and independent variables.
Regression models are helpful for predicting numerical values based on different data points,
such as sales revenue projections for a given business.
Some popular regression algorithms are:
◦ linear regression,
◦ logistic regression,
◦ polynomial regression.
Classification and Regression
Supervised Machine Learning Applications

Predictive analytics (house prices, stock exchange prices, etc.)


Text recognition
Spam detection
Customer sentiment analysis
Object detection (e.g. face detection)
Unsupervised Learning
Unsupervised learning uses machine learning algorithms to analyze and cluster unlabeled data
sets.
These algorithms discover hidden patterns in data without the need for human intervention
(hence, they are “unsupervised”).
Unsupervised learning models are used for three main tasks:
◦ clustering,
◦ association
◦ dimensionality reduction
Clustering
Clustering is a data mining technique for grouping unlabeled data based on their similarities or
differences.
For example, K-means clustering algorithms assign similar data points into groups, where the K
value represents the size of the grouping and granularity.
This technique is helpful for market segmentation, image compression, etc.
Association
Association is another type of unsupervised learning method that uses different rules to find
relationships between variables in a given dataset.
These methods are frequently used for market basket analysis and recommendation engines,
along the lines of “Customers Who Bought This Item Also Bought” recommendations.
Dimensionality reduction
Dimensionality reduction is a learning technique used when the number of features (or
dimensions) in a given dataset is too high.
It reduces the number of data inputs to a manageable size while also preserving the data
integrity.
Often, this technique is used in the preprocessing data stage, such as when autoencoders
remove noise from visual data to improve picture quality
Supervised learning V/S unsupervised learning

Labeled datasets
Accuracy
Goals
Applications
Complexity
Drawbacks
Which is best for you?
AI Domains:
◦ ML
◦ NLP
◦ Deep Learning
◦ Data Science
◦ Cognitive Science
Problem-Solving
✓The basic crux of artificial intelligence is to solve problems just like
humans.
✓Problem-solving refers to artificial intelligence techniques,
including various techniques such as forming efficient algorithms,
heuristics, and performing root cause analysis to find desirable
solutions.
Steps to solve a problem
◦ Goal Formulation:
◦ This one is the first and simple step in problem-solving.
◦ It organizes finite steps to formulate a target/goals which require some action to achieve the goal.
◦ Today the formulation of the goal is based on AI agents.
◦ Problem formulation:
◦ It is one of the core steps of problem-solving which decides what action should be taken to achieve the
formulated goal.
◦ It is dependent upon software agent which consisted of the following components to formulate the
associated problem.
Components to formulate the associated problem:
◦ Initial State: This state requires an initial state for the problem which starts the AI
agent towards a specified goal.
◦ Action: This stage of problem formulation works with function with a specific class
taken from the initial state and all possible actions done in this stage.
◦ Transition: This stage of problem formulation integrates the actual action done by
the previous action stage and collects the final stage to forward it to their next stage.
◦ Goal test: This stage determines that the specified goal achieved by the integrated
transition model or not, whenever the goal achieves stop the action and forward into
the next stage to determines the cost to achieve the goal.
◦ Path costing: This component of problem-solving numerical assigned what will be
the cost to achieve the goal. It requires all hardware software and human working
cost.
Intelligent Agent
◦ An agent is anything that can be viewed as :
◦ perceiving its environment through sensors and
◦ acting upon that environment through actuators
◦ A rational agent could be anything that makes
decisions, as a person, firm, machine, or software.
◦ It carries out an action with the best outcome after
considering past and current percepts(agent’s
perceptual inputs at a given instance).
◦ An AI system is composed of an agent and its
environment.
◦ The agents act in their environment. The environment
may contain other agents.
Agents interact with environments through sensors and actuators.

• Percept to refer to the agent’s perceptual inputs at any given instant.


• An agent’s percept sequence is the complete history of everything the agent has ever perceived.
• an agent’s choice of action at any given instant can depend on the entire percept sequence observed to
date, but not on anything it hasn’t perceived.
• An agent’s behaviour is described by the agent function that maps any given percept sequence to an
action
• The agent function for an artificial agent will be implemented by an agent program.
Rationality
What is rational at any given time depends on four things:
• The performance measure that defines the criterion of success.
• The agent’s prior knowledge of the environment.
• The actions that the agent can perform.
• The agent’s percept sequence to date.

A rational agent should select an action that is expected to maximize its performance measure,
given the evidence provided by the percept sequence and whatever built-in knowledge the agent
has.
Types of Agents
Agents can be grouped into five classes based on their degree of perceived
intelligence and capability :

◦ Simple Reflex Agents


◦ Model-Based Reflex Agents
◦ Goal-Based Agents
◦ Utility-Based Agents
◦ Learning Agent
Problem-solving Agents
◦ Reflex agents vs. goal-based agents
◦ Reflex Agents must map states into actions and can’t map when storing and learning both
are bigger.
◦ Reflex agents cannot operate well in environments for which the state-action mapping is
hard to store and learn.
◦ Goal-based agents can succeed by considering future actions and the desirability of their
outcomes.

◦ Problem-solving agents
◦ They are a kind of goal-based agent.
◦ They decide what to do by finding sequences of actions that lead to desirable states.
Simple reflex agents
◦ These agents select actions on the basis of the current percept, ignoring the rest of the
percept history.
◦ condition–action rule, written as
if car-in-front-is-braking then initiate-braking.
Goal-based agents & Utility-based agents

◦ In addition to a current state description, the agent needs some sort of goal information that
describes situations that are desirable.
◦ 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.

◦ Goals alone are not enough to generate high-quality behavior in most environments.
◦ Goals just provide a crude binary distinction states. A more general performance measure should allow
a comparison of different world states.

◦ If the internal utility function and the external performance measure are in agreement, then an agent
that chooses actions to maximize its utility will be rational according to the external performance
measure.
A model-based, utility-based agent

• It uses a model of the world, along with a utility


function that measures its preferences among states of
the world.
• Then it chooses the action that leads to the best
expected utility, where expected utility is computed by
averaging over all possible outcome states, weighted
by the probability of the outcome.
A general learning agent .

• learning element, is responsible for making


improvements,
• performance element, is responsible for selecting
external actions.
• The learning element uses feedback from the critic on
how the agent is doing and determines how the
performance element should be modified to do better in
the future
• problem generator is responsible for suggesting
actions that will lead to new and informative
experiences
Problem-solving Agents
• An agent that tries to come up with a sequence of actions that will bring the environment into a
desired state.
• Problem-solving agent is a result-driven agent and always focuses on satisfying the goals.
Problems in Artificial Intelligence
some of the most common problems resolved by AI are

• Travelling Salesman Problem


• Tower of Hanoi Problem
• Water-Jug Problem
• N-Queen Problem
• Chess
• Sudoku
• Crypt-arithmetic Problems
• Magic Squares
• Logical Puzzles and so on.
General Problem Solving
• Problem solving definitions
• problem space,
• problem solving,
• state space,
• state change,
• structure of state space,
• problem solution,
• problem description;
• Examples of problem definition.
Problem definitions:
A problem is defined by its elements and their relations.
To provide a formal description of a problem, we need to do following:
a. Define a state space that contains all the possible configurations of the relevant objects, including
some impossible ones.
b. Specify one or more states, that describe possible situations, from which the problem-solving
process may start. These states are called initial states.
c. Specify one or more states that would be acceptable solution to the problem. These states are
called goal states.
d. Specify a set of rules that describe the actions (operators) available.

The problem can then be solved by using the rules, in combination with an appropriate control
strategy, to move through the problem space until a path from an initial state to a goal state is
found.
Problem Solving, Search and Control Strategies
Problem solving process is known as search.
◦ Search is fundamental to the problem-solving process.
◦ Search is a general mechanism that can be used when more direct method is
not known.
◦ Search provides the framework into which more direct methods for solving
subparts of a problem can be embedded.

A very large number of AI problems are formulated as search problems.


Problem Space
◦ A problem space is represented by directed graph, where nodes represent
search state and paths represent the operators applied to change the state.
◦ To simplify a search algorithms, it is often convenient to logically and
programmatically represent a problem space as a tree.
◦ A tree usually decreases the complexity of a search at a cost. Here, the cost is
due to duplicating some nodes on the tree that were linked numerous times in
the graph.
◦ A tree is a graph in which any two vertices are connected by exactly one path.
Alternatively, any connected graph with no cycles is a tree.
State Change: Successor Function
A Successor Function is needed for state change. The successor function moves one state to
another state.
Successor Function :
◦ Is a description of possible actions; a set of operators.
◦ Is a transformation function on a state representation, which converts that state into another
state.
◦ Defines a relation of accessibility among states.
◦ Represents the conditions of applicability of a state and corresponding transformation function
The process of Problem-Solving using Searching
• Define the problem
• Analyze the problem
• Identification of possible solutions
• Choosing the optimal solution
• Implementation
State & Search Space
◦ A state is a representation of problem elements at a given moment.

◦ A State space is the set of all states reachable from the initial state.
◦ A state space forms a graph in which the nodes are states and the arcs
between nodes are actions.

◦ State Space Search: It is a complete set of states including Start and


Goal states, where the solution of a problem is to be searched.

◦ The solution of a problem is part of the graph formed by the state space.
The Eight Puzzle Problem
3 8 1 1 2 3

6 2 5 8 4

4 7 7 6 5

States: Legal Moves:


Initial State: Path cost:
Goal State/s:
Properties of search algorithms
◦ Completeness
◦ Optimality
◦ Time complexity
◦ Space complexity

◦ These properties are used to compare the efficiency of the different


types of searching algorithms.
Search Strategies
◦ Uninformed search (blind search) strategies use only the information available in the problem
definition

◦ Strategies that know whether one non-goal state is better than another are called informed
search or heuristic search

◦ General uninformed search strategies:


◦ Breadth-first search
◦ Uniform-cost search
◦ Depth-first search
◦ Depth-limited search
◦ Iterative deepening search

You might also like