Assignment-1-RollNo-333
Assignment-1-RollNo-333
Artificial Intellegence
Submitted by:
SU92-BSCSM-F22-333
Submitted to:
1. Introduction to AI:
a. Define Artificial Intelligence in your own words.
Artificial Intelligence (AI) is the subfield of computer science which emphasizes the creation
of systems able to perform tasks that require human intelligence. Among them are problem-
solving, data-driven learning, decision-making, and natural language processing. Algorithms
and computational models allow AI to mimic human cognitive functions, hence allowing
machines to perform complex tasks in an efficient manner.
Alan Turing introduced the concept of machine intelligence and proposed the Turing Test.
The first AI programs, such as the Logic Theorist, were developed.
John McCarthy coined the term "Artificial Intelligence" in 1956.
1970s-1980s (AI Winter):
Due to high expectations but slow progress, funding and research declined.
Limited computational power and unrealistic goals led to reduced interest in AI.
1990s-2000s (Revival and Growth):
Big data and deep learning ushered speech recognition, autonomous driving, and natural-
language processing developments.
Google Assistant, Siri, and self-driving cars became the household norm.
AI became widespread in the industries of health care, financial services, and cybersecurity.
2. Turing Test:
a. What is the Turing Test?
The Turing Test, proposed in 1950 by Alan Turing, is an approach to know whether a
machine can exhibit behavior equivalent to that of a human or indistinguishable from a
human. Here, a human judge interacts through text-based conversation with both the human
and the machine. A machine is considered to have passed the test when the judge can't
reliably differentiate between the two.
•It shifted the focus from whether machines "think" like humans to whether they behave
intelligently.
•It shaped the development of natural language processing (NLP) and chatbots like GPT-
based AI models.
• Healthcare:
• AI-based diagnostic tool, such as IBM Watson, helps doctors in detecting diseases, such as
cancer, through the analysis of images and predictive models.
• AI-based chatbots and virtual assistants provide medical consultancy.
• Finance:
• Fraud detection algorithms detect unusual transactions, preventing cybercrime.
• Automated trading systems have high accuracy for analyzing market trends and executing
trades.
• Autonomous Vehicles:
•\tAI enables self-driving cars, such as Tesla's Autopilot, to navigate roads using computer
vision and deep learning.
•\tAI helps in real-time decision-making for traffic management and accident prevention.
b. Predict two future trends in AI development.
An agent is an entity that perceives its environment through sensors and acts upon it using
actuators to achieve a specific goal. It can be a software program, a robotic system, or an AI
model.
The environment is the exterior system in which an agent works. It gives inputs or percepts
that cause the agent's decisions. In addition, an environment can either be static or dynamic,
deterministic or stochastic, and fully or partially observable.
Example
A robot vacuum cleaner (agent) perceives dust levels (sensor input) and moves accordingly
(actuators).
A chatbot (agent) interacts with users (environment) through text inputs.
Rationality in AI refers to an agent’s ability to take the best possible action based on its
percepts, knowledge, and available resources to maximize performance. A rational agent:
2. Agent Types:
a. Differentiate between simple reflex agents, goal-based agents, model-based agents, and
utility-based agents.
Agent Type Description Decision making process
Simple reflex Agent Agents Based on current precerts Uses conditions-actions rules (eg if
without considering history traffic light = red then stop)
Model based Agent Maintain an internal model of the world Uses past and present data to make
to handle partial observability decisions.
Goal based Agents Takes actions to achieve a specific Uses search and planning algorithms.
goal, even if multiple steps are needed.
Utility Based Agents Maximizes a utility function to choose Considers both goals and preferences.
the best possible outcome.
3. PEAS Framework:
a. Choose one of the following systems and describe its PEAS:
o Autonomous vehicle
PEAS description for an Autonomous Vehicle
Component Description
Performance Measure Safe driving, reaching the destination
efficiently, minimizing fuel consumption,
avoiding accidents.
Environment Roads, traffic, pedestrians, weather
conditions, traffic rules.
Actuators Steering, braking, acceleration, indicator
lights.
Sensors Cameras, LiDAR, GPS, speed sensors,
proximity sensors.
b. Describe the problem space for the Water Jug Problem or Missionaries and
Cannibals problem.
State space refers to the set of all possible states a system can be in while solving a
problem. It consists of:
2. Search Strategies:
a. Define Depth First Search (DFS) and Breadth First Search (BFS) with pseudo-code.
Pseudo-code:
Pseudo-code:
while queue:
node = queue.popleft()
if node == goal:
return True
for neighbor in graph[node]:
if neighbor not in visited:
visited.add(neighbor)
queue.append(neighbor)
return False
UCS finds the least-cost path by expanding the node with the lowest cost first.
A → B (cost 4)
A → C (cost 2)
B → D (cost 3)
C → D (cost 5)
UCS starts from A and always expands the cheapest path, ensuring the shortest path to D is
chosen
3. Practical Exercise:
Solve the Missionaries and Cannibals problem using any of the search strategies (DFS,
BFS, or UCS). Clearly explain your approach and provide the solution steps.
Approach:
Use BFS to explore all possible moves while ensuring no missionaries are eaten.
Track visited states to avoid loops.
If the goal state (0,0,1) is reached, return the sequence of moves.
Solution Steps:
Steps Left Side Right Side Move
1 (3,3,0) (0,0,1) Start
2 (3,1,1) (0,2,0) Move 2 cannibal
3 (3,2,0) (0,1,1) Return with 1
cannibal
4 (3,0,1) (0,3,0) Move 2 cannibal
5 (3,1,0) (0,2,1) Return with 1
missionary
6 (2,1,1) (1,2,0) Move 2
missionary
7 (3,1,0) (0,2,1) Return with 1
missionary
8 (1,1,1) (2,2,0) Move 2
missionary
9 (2,2,0) (1,1,1) Return with 1
cannibal
10 (0,2,1) (3,1,0) Move 2
missionary
11 (1,1,0) (2,2,1) Return with 1
missionary
12 (0,0,1) (3,3,0) Move final 2
missionary