Artificial Intelligence assignment
Artificial Intelligence assignment
1. Narrow AI (Weak AI): AI systems that are designed and trained for a specific
task. Examples include virtual personal assistants like Apple's Siri and
Amazon's Alexa.
2. General AI (Strong AI): AI systems with generalized human cognitive abilities
so that when presented with an unfamiliar task, they have enough intelligence
to find a solution.
Key Concepts in AI
2. Deep Learning: A subset of ML that uses neural networks with many layers
(deep neural networks) to analyze various factors of data. It's particularly
effective for image and speech recognition.
4. Computer Vision: The field of AI that enables machines to interpret and make
decisions based on visual data from the world, such as images and videos.
5. Robotics: The branch of AI that involves the design and creation of robots.
Robots are machines that can perform tasks autonomously or semi-
autonomously.
Natural Language Processing (NLP)?
1. Tokenization: The process of breaking down text into smaller units, such as
words or phrases. For example, the sentence "NLP is fascinating" can be
tokenized into ["NLP", "is", "fascinating"].
Types of Robots-
Expert systems are a branch of artificial intelligence that uses knowledge and
inference to solve complex problems that typically require human expertise. These
systems emulate the decision-making abilities of a human expert in a specific
domain. They are designed to provide solutions, advice, or recommendations in
areas such as medical diagnosis, financial analysis, and technical troubleshooting.
3. User Interface:-The user interface allows users to interact with the expert
system. It enables users to input queries or problems and receive advice,
explanations, or solutions. A good user interface is crucial for making the
system accessible and easy to use.
Future Directions
Ethical Considerations
Future of AI
Applications of NLP
1. Virtual Assistants: Siri, Alexa, and Google Assistant use NLP to understand
and respond to user commands.
2. Customer Support: Chatbots and automated customer service agents use
NLP to interact with customers and resolve issues.
3. Content Recommendation: Platforms like Netflix and Amazon use NLP to
analyze user reviews and provide personalized recommendations.
4. Healthcare: NLP is used to analyze medical records, extract relevant
information, and assist in diagnostics.
5. Social Media Monitoring: NLP tools analyze social media posts to gauge
public sentiment and identify trending topics.
6. Document Analysis: Legal, financial, and academic documents are processed
using NLP to extract key information and summarize content.
Challenges in NLP
5. Model Building:Description: Creating models that can learn from data and
make predictions or decisions.-Techniques: Decision trees, neural networks,
support vector machines.
Sensors and Vision Systems in Robotics
Sensors and vision systems are crucial components of modern robots, enabling
them to perceive and interact with their environments. These systems provide the
necessary data for decision-making, navigation, manipulation, and various other
robotic functions.
Types of Sensors
1. Proximity Sensors:
2. Contact Sensors:
3. Motion Sensors:
MYCIN was an early expert system developed in the 1970s at Stanford University. It
aimed to assist physicians in diagnosing bacterial infections and selecting
appropriate antibiotics.
Features:
Architecture
3. Inference Algorithms:
also known as R1, was an expert system developed in the 1980s by Digital
Equipment Corporation (DEC). It was designed to assist system administrators and
engineers in configuring and diagnosing issues in computer systems, specifically the
VAX series of minicomputers.
Architecture
2. Inference Engine: The system's inference engine utilizes forward chaining, a form
of reasoning where the system starts with available facts and applies rules to infer
new conclusions. This allows RI to make decisions about system configuration and
troubleshooting based on observed data.
Knowledge Base
Inference Mechanism
Markov Processes: Markov processes, such as Markov chains and hidden Markov
models (HMMs), are used to model stochastic processes with discrete time steps.
HMMs, in particular, are widely used for sequential data modeling, such as speech
recognition and gesture recognition.
1. Time Series Forecasting: Temporal models are used to forecast future values
of time series data, such as stock prices, weather patterns, and energy
consumption.
3. Manipulation:
algorithm is a popular and widely used search algorithm in artificial intelligence for
finding the shortest path between two nodes in a graph. It's particularly efficient
when searching in graphs with known costs between nodes and a heuristic estimate
of the remaining cost to reach the goal node. Here's an overview of the A* algorithm:
A* Algorithm Overview
1. Initialization:
• Start with the initial node (start state) and add it to the open list.
• Set the cost of reaching the initial node from the start to 0.
• Set the heuristic estimate of the remaining cost to reach the goal node
from the initial node.
2. Expansion:
3. Termination:
• If the open list becomes empty and the goal node is not reached,
terminate the search with failure (no path exists).
Heuristic Function
1. Admissibility: The heuristic function must never overestimate the true cost to
reach the goal node. In other words,
ℎ(𝑛)≤true cost to reach goal from 𝑛h(n)≤true cost to reach goal from n.
2. Consistency (or Monotonicity): For every node 𝑛n and its successor 𝑛′n′ with
a cost 𝑐c between them, the estimated cost to reach the goal from 𝑛n
BFS, Breadth-First Search, is a vertex-based technique for finding the shortest path
in the graph. It uses a Queue data structure that follows first in first out. In BFS, one
vertex is selected at a time when it is visited and marked then its adjacent are
visited and stored in the queue. It is slower than DFS. Input:
A
/\
B C
/ /\
D E F
A, B, C, D, E, F
DFS, Depth First Search, is an edge-based technique. It uses the Stack data
structure and performs two stages, first visited vertices are pushed into the stack,
and second if there are no vertices then visited vertices are popped.
Example:
Input:
A
/\
B D
/ /\
C E F
Output:
A, B, C, D, E, F
Parameters BFS DFS
Conceptual BFS builds the tree level by DFS builds the tree sub-tree by
Difference level. sub-tree.
678_
The Water Jug problem
also known as the Die Hard problem, is a classic puzzle in computer science and
mathematics that involves transferring water between jugs to measure a certain
volume. The problem typically consists of two jugs of different capacities and a
target volume that needs to be measured. The goal is to determine a sequence of
jug fillings and pourings that results in achieving the target volume. Here's an
explanation of the concept of the Water Jug problem with an example:
Problem Statement:
The goal is to measure exactly 2 liters of water using these two jugs. We can
perform the following operations:
Example Solution:
2. Fill Jug A (4 liters):-Fill Jug A completely from the tap: (4, 0).
• Pour water from Jug A into Jug B until Jug B is full: (1, 3).
4. Empty Jug B:-Empty Jug B completely into the sink: (1, 0).
5. Pour from Jug A to Jug B:-Pour water from Jug A into Jug B until Jug B is full:
(0, 1).
6. Fill Jug A (4 liters):-Fill Jug A completely from the tap: (4, 1).
7. Pour from Jug A to Jug B:-Pour water from Jug A into Jug B until Jug B is full:
(2, 3).
Result:
Features of Prolog:
Process:-NLG systems analyze input data or knowledge and generate coherent and
grammatically correct language output that conveys the intended message. This
process may involve various subtasks such as text planning, sentence structuring,
lexical choice, and surface realization.
Example:-Given a user query "What is the weather forecast for tomorrow?", an NLU
system can analyze the query to extract the intent ("weather forecast"), temporal
information ("tomorrow"), and other relevant entities to retrieve the appropriate
weather forecast information.
Advantages:
Disadvantages:
• In Prolog, rules and facts are the primary constructs used to define
relationships, properties, and logical implications within a program. These
constructs are fundamental to the declarative nature of Prolog programming,
where computation is expressed as a collection of logical statements. Here's
an explanation of rules and facts in Prolog: Facts: Definition: Facts are
statements that assert the existence of relationships or properties in the
program's domain. They represent ground truths or atomic pieces of
knowledge. Rules:-Defination- Rules are logical implications that define
relationships or properties based on other relationships or properties. They
specify conditions under which certain conclusions can be drawn.
3. should be less than or equal to the estimated cost to reach the goal from 𝑛′n′
plus the cost 𝑐c. Mathematically, ℎ(𝑛)≤ℎ(𝑛′)+𝑐h(n)≤h(n′)+c.
Benefits of A* Algorithm
2. Optimality: A* finds the shortest path from the start node to the goal node if
the heuristic function is admissible.
Applications of A* Algorithm
Examples:-A* search, best-first search, and greedy best-first search are examples of
informed search algorithms.
Differences: