0% found this document useful (0 votes)
12 views15 pages

AI Mid Note

The document provides an overview of artificial intelligence (AI), defining it as the simulation of human intelligence in machines, and outlining key aspects such as learning, reasoning, perception, and natural language processing. It discusses various applications of AI across sectors like healthcare, finance, and transportation, and explains concepts like the Turing Test, types of agents, and search algorithms including BFS, DFS, and Dijkstra's algorithm. Additionally, it covers Bayesian networks and the Hill Climbing algorithm, emphasizing their roles in problem-solving within AI.

Uploaded by

neil.crandall234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views15 pages

AI Mid Note

The document provides an overview of artificial intelligence (AI), defining it as the simulation of human intelligence in machines, and outlining key aspects such as learning, reasoning, perception, and natural language processing. It discusses various applications of AI across sectors like healthcare, finance, and transportation, and explains concepts like the Turing Test, types of agents, and search algorithms including BFS, DFS, and Dijkstra's algorithm. Additionally, it covers Bayesian networks and the Hill Climbing algorithm, emphasizing their roles in problem-solving within AI.

Uploaded by

neil.crandall234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Lecture 1:

Q: Define AI?
A: AI refers to the simulation of human intelligence in machines that are programmed to think,
learn and make decisions like humans.
Q: What are the key aspects of AI?
A: The key aspects of AI are:

• Learning: AI system can learn from data through algorithms and improve their
performance. This includes supervised, unsupervised and reinforcement learning.
• Reasoning: AI can analyze data, draw logical conclusion and make decision based on
available information.
• Perception: Using sensor, AI system can perceive the environment by recognizing
images, sound and other data.
• NLP: AI can understand, interpret and generate human language.
• Adaptation: AI system can adjust their behavior based on new information, allowing
them to respond to dynamic situation.
Q: What are the applications of AI?
A: AI can be used in various day to day services like:
Healthcare: Diagnosing diseases, personalized treatment plans, drug discovery.
•Finance: Fraud detection, algorithmic trading, credit scoring.
•Transportation: Autonomous vehicles, traffic optimization.
•Education: Personalized learning experiences, automated grading.
•Entertainment: Content recommendation, virtual reality experiences.
•Customer Service: Chatbots, virtual assistants.

Q: Explain the concept of Turing Test.


A: The Turing Test is a fundamental benchmark for evaluating artificial intelligence. In this test,
a human judge interacts with both an AI system and a human, without knowing which is which.
If the judge cannot reliably distinguish the AI from the human based on their responses, the AI
is said to have passed the test, demonstrating its ability to exhibit human-like intelligence.
Q: What are the components of an AI system?
A: The components of an AI system are:

• Agent
• Environment
• Perception
• Reasoning
• Action
Q: What is rationality?
A: Rationality is a fixed performance measure, that evaluates the sequence of observed action
effects on the environment.
Q: Describe the PEAS terminology with an example
A: The term PEAS refers to:

• Performance measure: This measure how effective are the actions of an agent in an
environment.
• Environment: It’s where the agent performs its action based on perception through the
sensors.
• Actuator: An agent performs its action through actuators.
• Sensors: An perceives its environment through sensors.
•Example: Taxi driver
–Performance measure: safe, fast, comfortable (maximize profits)
–Environment: roads, other traffic, pedestrians, customers
–Actuators: steering, accelerator, brake, signal, horn
–Sensors: cameras, sonar, speedometer, GPS, odometer, accelerometer, engine sensors
Lecture 2:
Q: What is an agent?
A: An agent is anything that can perceive its environment though sensors and acting upon that
environment through effectors.
Q: What is an Intelligent agent? How it differs from a normal agent?
A: An intelligent agent also called as a rational agent is one that does the right thing. An
Intelligent agent can transform perception into actions rationally.
For example: Diagnosing a patient on the basis of symptoms and predict disease.
An intelligent agent acts different than a normal agent, because it can reason and learn to make
decision unlike a normal agent that follows predefined logic or instructions. An intelligent AI
can also learn and adapt from its experience, whereas a normal agent cannot.

Q: Describe types of agents:


A: Types of agents are:

• Simple reflex agent: Acts only based on the current percept, ignoring past history.
• Simple agent with internal state: Maintains some internal memory to track past
percepts and make better decisions.
• Goal based agent: Chooses actions that bring it closer to achieving a specified goal.
• Utility based agent: Selects actions based on a utility function, maximizing overall
performance or preference.
Q: What are the environment properties?
A:
❖ Accessible vs Inaccessible:
➢ If an agent sensory apparatus provides access to the complete state of an environment,
then the environment is said to be accessible to that agent.
➢ An accessible environment is convenient as agent may not be required for maintaining
any internal state to keep track of the world.
❖ Deterministic vs Non deterministic:
➢ The environment is said to be deterministic, if the next state of environment is
completely determined by the current state and the actions are selected by the agents.
➢ However, if the environment is inaccessible, then it may appear to be nondeterministic.
❖ Episodic vs Non-episodic:
➢ In an episodic environment, the agents experience is divided into episodes. Each
episode consists of perceiving and acting agent.
➢ Episodic environments are much simpler because agents are not required to think
ahead.
❖ Static vs Dynamic:
➢ If an environment does not undergo any change especially when an agent is busy in
performing a specific task, then the environment is said to be static otherwise it is
dynamic.
➢ If an environment does not change with the time, but the agents score changes in
accordance to time, then the environment is said to be semi dynamic.
❖ Discrete vs Continues
➢ If there are limited number of distinct defined percepts and actions, then the
environment is discrete.
➢ For example: Environment is discrete for Chess and Continuous for Driving
Q: Define computational probability.
A: Conditional probability is a probability of occurring an event when another event has already
happened.
To calculate the event A when event B has already occurred, "the probability of A under the
conditions of B", it can be written as:

Where P(A⋀B) = Joint probability of A and B


P(B)=Marginal probability of B.
If the probability of A is given and we need to find the probability of B, then it will be given as:

Q: Describe Baye’s Theorem.


A: Baye’s theorem:
Baye’s theorem is known as Baye’s rule, Baye’s law or Bayesian reasoning, which determines
the probability of an event with uncertain knowledge. In probability theory, it relates the
conditional probability and marginal probabilities of two random events. Bayes' theorem allows
updating the probability prediction of an event by observing new information of the real
world. Its written as:

Where,
P(A|B) is the posterior
P(B|A) is the likelihood
P(A) is the prior probability
P(B) is the marginal probability
Q: From a standard deck of playing cards, a single card is drawn. The probability that
the card is king is 4/52, then calculate posterior probability P( King|Face ), which means the
drawn face card is a king card.
A:
We can use Bayes' Theorem to calculate the posterior probability:
𝑃(𝐾𝑖𝑛𝑔)𝑃(𝐹𝑎𝑐𝑒∣𝐾𝑖𝑛𝑔)
P(King∣Face)=
𝑃(𝐹𝑎𝑐𝑒)

Given Data:
• P(King)=4/52 [Since there are 4 kings in a 52 card deck)
• P(Face|King)= 1 [If the card is king, then certainly its face]
• P(Face)= 12/52 [Since there are 12 face cards in a 52 card deck]
Substituting the values:
4
×1
52
𝑃(𝐾𝑖𝑛𝑔|𝐹𝑎𝑐𝑒) = 12 = 1/3
52

So, P(King|Face)=1/3

Q: What is Bayesian Belief Network in AI?


A: "A Bayesian network is a probabilistic graphical model which represents a set of variables
and their conditional
dependencies using a directed acyclic graph."
It is also called a Bayes network, belief network, decision network, or Bayesian model
It can also be used in various tasks including prediction, anomaly detection, diagnostics,
automated insight, reasoning, time series prediction, and decision making under uncertainty
It consists of two parts:

• Directed Acyclic graph


• Tables of conditional probabilities
A Bayesian network graph is made up of nodes and
Arcs (directed links), where:
Each node corresponds to the random variables, and a variable can be continuous or discrete
Arc or directed arrows represent the causal relationship or conditional probabilities between
random variables.
Q: What is Hill Climbing Algorithm in AI?
A: 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 It
terminates when it reaches a peak value where no neighbor has a higher value

Q: Write down the algorithm of Simple Hill Climbing Algorithm:


A:
•Step 1: Evaluate the initial state, if it is goal state then return success and Stop
•Step 2: Loop Until a solution is found or there is no new operator left to apply
•Step 3: Select and apply an operator to the current state
•Step 4: Check new state:
•If it is goal state, then return success and quit
•Else if it is better than the current state then assign new state as a current state
•Else if not better than the current state, then return to step 2
•Step 5: Exit
Q: Write down the algorithm for Steepest-Ascent Hill climbing
A:
•Step 1 Evaluate the initial state, if it is goal state then return success and stop, else make
current state as initial state
•Step 2 Loop until a solution is found or the current state does not change:
•Let SUCC be a state such that any successor of the current state will be better than it
•For each operator that applies to the current state
•Apply the new operator and generate a new state
•Evaluate the new state
•If it is goal state, then return it and quit, else compare it to the SUCC
•If it is better than SUCC, then set new state as SUCC
•If the SUCC is better than the current state, then set current state to SUCC
•Step 3: Exit

Lecture 3:
Q: What is problem solving by searching?
A: Problem-solving by searching is a process that involves using search algorithms to identify
and choose a solution to a problem.
Q: Write down the types of search algorithms
A:

Q: Explain BFS algorithm with an example.


A: Breadth First Search (BFS) is a fundamental graph traversal algorithm. It begins with a node,
then first traverses all its adjacent nodes. Once all adjacent are visited, then their adjacent are
traversed.
Example:
Q: What is Dijkstra’s algorithm? Give an example.
A: Dijkstra's algorithm finds the shortest path from one vertex to all other vertices.
It does so by repeatedly selecting the nearest unvisited vertex and calculating the distance to all
the unvisited neighboring vertices.

Output:
0 4 12 19 21 11 9 8 14
Explanation: The distance from 0 to 1 = 4 .
The minimum distance from 0 to 2 = 12 . 0 1 2
The minimum distance from 0 to 3 = 19 . 0 1 2 3
The minimum distance from 0 to 4 = 21 . 0 7 6 5 4
The minimum distance from 0 to 5 = 11 . 0 7 6 5
The minimum distance from 0 to 6 = 9 . 0 7 6
The minimum distance from 0 to 7 = 8 . 0 7
The minimum distance from 0 to 8 = 14 . 0 1 2 8
Q: Explain DFS with an example.
A: In Depth First Search (or DFS) for a graph, we traverse all adjacent vertices one by one.
When we traverse an adjacent vertex, we completely finish the traversal of all vertices
reachable through that adjacent vertex. Similar to a tree, where we first completely traverse
the left subtree and then move to the right subtree. key difference is that, unlike trees, graphs
may contain cycles (a node may be visited more than once).
Example:
Q: Explain the A* search algorithm with an example.
The A* (A-star) algorithm is a widely used pathfinding and graph traversal algorithm that finds
the shortest path between a starting node and a target node. It is commonly used in AI,
robotics, and game development.
How A Works*:
•Initialize a tree with the root node being the start node S.
•Remove the top node from the open list for exploration.
•Add the current node to the closed list.
•Add all nodes that have an incoming edge from the current node as child nodes in the tree.
•Update the lowest cost to reach the child node.
•Compute the evaluation function for every child node and add them to the open list.
Example:
Q: Find out the differences between DFS and BFS
A:
Q: Find out the differences between Dijkstra and A*
A:

You might also like