AI- notes
AI- notes
UNIT - 1
Introduction
• Creating some system which can exhibit intelligent behavior, learn new things by itself,
demonstrate, explain, and can advise to its user.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
Many AI algorithms, particularly deep learning models, are often considered "black
boxes" because it's difficult to understand how they arrive at their decisions.
AI systems can have significant societal impacts, raising ethical questions about privacy,
fairness, and job displacement.
AI systems are susceptible to adversarial attacks, where minor changes to input data can
lead to incorrect or unintended outputs.
6. Human-AI Collaboration:
Designing effective human-AI collaboration systems where humans and AI work together
seamlessly poses challenges in terms of interface design, trust-building, and
understanding each other's capabilities and limitations
4. What is an AI Technique?
1.Machine Learning:
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
classifications.
2. Deep Learning:
Deep learning is a subfield of machine learning that employs neural networks with many
layers (deep neural networks) to learn hierarchical representations of data.
• Machine translation
• Text summarization
• Question answering
4. Computer Vision:
• Image segmentation
• Image classification
• Facial recognition,
• Scene understanding
5. Evolutionary Algorithms:
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
6. Define Agent?
In AI, an "agent" is any entity that perceives its environment through sensors and acts upon that
environment through actuators.
1. Intelligent personal assistants: These are agents that are designed to help users with
various tasks, such as scheduling appointments, sending messages, and setting
reminders. Examples of intelligent personal assistants include Siri, Alexa, and Google
Assistant.
2. Autonomous robots: These are agents that are designed to operate autonomously in
the physical world. They can perform tasks such as cleaning, sorting, and delivering
goods. Examples of autonomous robots are Roomba vacuum cleaner , Amazon delivery
robot.
3. Gaming agents: These are agents that are designed to play games, either against
human opponents or other agents. Examples of gaming agents include chess-playing
agents and poker-playing agents.
4. Fraud detection agents: These are agents that are designed to detect fraudulent
behavior in financial transactions.
8. Define Rationality?
Rationality is nothing but status of being reasonable, sensible, and having good sense of
judgment.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
The success of an intelligent behavior of a system can be measured with Turing Test.
• Discrete / Continuous − If there are a limited number of distinct, clearly defined, states
of the environment, the environment is discrete (For Ex,chess); otherwise it is
continuous (For Ex, driving).
• Static / Dynamic − If the environment does not change while an agent is acting, then it
is static; otherwise it is dynamic.
• Single agent / Multiple agents − The environment may contain other agents which may
be of the same or different kind as that of the agent.
• Accessible / Inaccessible − If the agent’s sensory apparatus can have access to the
complete state of the environment, then the environment is accessible to that agent.
• They are rational only if a correct decision is made only on the basis of current precept.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
• They use a model of the world to choose their actions. They maintain an internal state.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
• Goal-based approach is more flexible than reflex agent since the knowledge supporting a
decision is explicitly modeled, thereby allowing for modifications.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
• There are conflicting goals, out of which only few can be achieved.
• Goals have some uncertainty of being achieved and you need to weigh likelihood of
success against the importance of a goal.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
Types of problem in AI
UNIT - 2
Searching & Reduction
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data
structures.
• The algorithm starts at the root node (selecting some arbitrary node as the root
node in the case of a graph) and explores as far as possible along each branch
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
before backtracking.
• It uses last in- first-out strategy and hence it is implemented using a stack.
Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data
structures.
• It starts at the tree root (or some arbitrary node of a graph, sometimes referred
to as a ‘search key’), and explores all of the neighbor nodes at the present depth
prior to moving on to the nodes at the next depth level.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
1. Hill Climbing:
Hill Climbing Algorithm is a local search algorithm which continuously moves in the
direction of increasing elevation/value to find the peak of the mountain or best solution
to the problem.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
• No Backtracking
• Greedy Approach
• Step 1: Evaluate the initial state. If it is the goal state, then return success and
Stop.
• Step 2: Loop Until a solution is found or there is no new operator left to apply.
Else if it is better than the current state, then assign a new state as a current
state.
Else if not better than the current state, then return to step2.
• Step 5: Exit.
Best – First Search uses the concept of a Priority queue and heuristic search. To search
the graph space, the best first search method uses two lists for tracking the traversal.
Advantages -
• It is complete.
Disadvantages -
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
Problem reduction is an algorithm design technique that takes a complex problem and reduces
it to a simpler one.
The simpler problem is then solved and the solution of the simpler problem is then transformed
to the solution of the original problem.
1. The A* Algorithm
• It is used for plotting an efficiently directed path between several points called
nodes.
• It uses the heuristic function h(n) and cost to reach the node n from the start
state g(n).
Advantages Of A* Algorithm
Disadvantages Of A* Algorithm
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
AO* represents an AND-OR graph method that ANDs many branches to find multiple
solutions.
• AO* is often used for the common pathfinding problem in applications- video
games, stochastic grammars in NLP, an Informational search with online learning.
• It can be more complex than simpler algorithms due to its adaptability & nature.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
4. Constraint Satisfication:
Constraint Satisfaction is deals with solving problems by identifying constraints and finding
solutions that satisfy those constraints.
Types of contraints -
1. Unary Constraints:
2. Binary Constraints:
3. Global Constraints:
Global constraints involve more than two variables and specify complex
relationships between them.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
It refers to technique used in computer and video games to produce illusion of the intelligenin
the behaviour of non player characters (NPCs).
• Advancement of AI
• Research
• Real-world applications
• Limited scope
• Computational cost
• Game-playing
• Decision-making
Example
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
UNIT - 3
Knowledge Representation Issues
1. Define Knowledge ?
Knowledge is the information about a domain that can be used to solve problems in that
domain and this knowledge must be represented in the computer.
• Object: All the facts about objects in our world domain. E.g., Guitars contains strings,
trumpets are brass instruments.
• Facts: Facts are the truths about the real world and what we represent.
Declarative Knowledge –
Structural Knowledge –
Procedural Knowledge –
This is responsible for knowing how to do something and includes rules, strategies,
procedures, etc.
Meta Knowledge –
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
Heuristic Knowledge –
• It is the simplest way of storing facts which uses the relational method. Here, all the facts
about a set of the object are set out systematically in columns.
2. Inheritable Knowledge
• In the inheritable knowledge approach, all data must be storeinto a hierarchy of classes
and should be arranged in a generalized form or a hierarchal manner.
• Also, this approach contains inheritable knowledge which shows a relation between
instance and class, and it is called instance relation.
• Every individual frame can represent the collection of attributes and its value.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
3. Inferential Knowledge
• The inferential knowledge approach represents knowledge in the form oformal logic.
• Example:
4. Procedural knowledge
• Procedural knowledge approach uses small programs and codes whichdescribes how to
do specific things, and how to proceed.
• In this knowledge, we can use various coding languages such as LISP language (list
processing) and Prolog language
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
1. Logical Representation
• Logical representation is a language with some definite rules which deal with
propositions and has no ambiguity in representation.
Advantages:
Disadvantages:
2. Kind-of-relation
Advantages:
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
Disadvantages:
3. Frame Representation
A frame is a record like structure that consists of a collection of attributes and values to
describe an entity in the world.
Advantages:
Disadvantages:
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
4. Production Rules
• Production rules system consist of (condition, action) pairs which mean, "If
condition then action".
• In production rules, agent checks for the condition and if the condition exists
then production rule fires and corresponding action is carried out.
Advantages:
– The production rules are highly modular and can be easily removed or
modified.
Disadvantages:
– It does not exhibit any learning capabilities and does not store the result of the
problem for future uses.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
Logic programming offers a formalism for specifying a computation in terms of logical relations
between entities.
The solution of a problem generally includes the initial data and facts in order to arrive at the
solution.
AnThe backward reasoning is inverse of forward reasoning in which goal is analysed in order to
deduce the rules, initial facts and data.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
Knowledge about which paths are most likely to lead quickly to a goalstate is often called search
control knowledge.
UNIT - 4
Learning
1. Define Learning ?
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
experiencing something.
Examples
• I like to eat
First-order logic is a powerful language that develops information about the objects in a more
easy way and can also express the relationship between those objec
1. Syntax
2. Semantics -
3. Inference -
4. Expressiveness -
FOL is more expressive than propositional logic and can represent complex
statements involving variables, quantifiers, and relations.
1. Atomic Sentence
Example
2. Complex sentence
Example
It consists of two parts, the first part x is the subject of the statement and second part "is
an integer," is known as a predic
1. Forward Chaining:
Forward chaining, also known as data-driven or bottom-up reasoning, starts with the available
data and uses inference rules to derive new conclusions until a desired goal is reached.
2. Backward Chaining:
Backward chaining, also known as goal-driven or top-down reasoning, starts with a given goal or
query and works backward through the inference rules to determine if the goal can be satisfied
by the available data.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
8. Define Resolution?
Decision trees are a popular machine learning technique used for classification and regression
tasks in artificial intelligence.
Objective: EBL aims to learn new concepts or problem-solving strategies by using explanations
provided by a domain expert or previous learning experiences.
Applications:
• Medical Diagnosis
• Robot Navigation
• Fraud Detection
Statistical learning methods in AI involve algorithms that learn from data to make predictions or
decisions by identifying patterns or relationships
Objective: Statistical learning methods aim to build predictive models from data by analyzing
the underlying statistical properties and relationships.
Key Concepts
1. Supervised Learning:
In supervised learning, the algorithm is trained on labeled data, where each input is
associated with a corresponding output or target variable.
2. Unsupervised Learning:
In unsupervised learning, the algorithm is trained on unlabeled data, and the goal is to
discover hidden patterns, structures, or relationships within the data.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
3. Semi-supervised Learning:
Applications -
Input: The input should be an initial state from which the model will start
Output: There are many possible outputs as there are a variety of solutions to a particular
problem
Training: The training is based upon the input, The model will return a state and the user will
decide to reward or punish the model based on its output.
• Positive
• Negative
UNIT - 5
Expert Systems
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
1. List AI Applications ?
• Healthcare
• Finance
• Autonomous vehicles
• Robotics
• Manufacturing
• Retail
• Transportation
• Energy
• Government
• Education
• Agriculture
• Social Media
The expert systems are the computer applications developed to solve complex problems in a
particular domain, at the level of extra-ordinary human intelligence and expertise.
Characteristics -
• High Performance: The expert system provides high performance for solving any type of
complex problem.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
• Highly responsive: ES provides the result for any complex query within a very short
period of time.
The user interface allows users to interact with the expert system, input queries, provide
information, and receive outputs or recommendations.
The inference engine is known as the brain of the expert system as it is the main processing unit
of the system. The system extracts the knowledge from the knowledge base.
1. Deterministic Inference engine: The conclusions drawn from this type of inference engine are
assumed to be true. It is based on facts and rules.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
3. Knowledge Base:
The knowledge base is a type of storage that stores knowledge acquired from the different
experts of the particular domain. It is considered as big storage of knowledge.
The more the knowledge base, the more precise will be the Expert System.
1. Factual knowledge.
2. Heuristic Knowledge
3. Knowledge Acquisitions
4. Knowledge reprentation.
The human element in an expert system in AI refers to the involvement of human expertise in
the development, maintenance, and operation of the system.
• These rules guide the system in making decisions & providing solutions to user
queries.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
• This approach replaces traditional knowledge bases with neural networks to process
& solve problems.
5. Neuro-Fuzzy Systems:
• Robust performance
• Continuous improvement
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
Techniques -
1. Knowledge Acquisition -
This process involves various techniques, including interviews, questionnaires, and observation.
2. Knowledge Representation -
Transform acquired knowledge into a format the system can understand and use.
3. Knowledge Verification -
Ensure that the knowledge in the expert system is accurate and complete.
4. Knowledge Implementation -
5. Knowledge Maintenance -
Finally, we maintain our expert system’s knowledge base by regularly updating it with new
information.
www.ourcreativeinfo.in
ARTIFICIAL INTELLIGENCE
1. Protocol-generation techniques
4. Matrix-based techniques
5. Sorting techniques
7. Diagram-based techniques
www.ourcreativeinfo.in