0% found this document useful (0 votes)
10 views29 pages

Case Study

The document outlines various AI experiments conducted by Gaurav Lallan Jha, a 3rd-year AIML student, focusing on applications of AI, agent architectures, programming in Prolog, uninformed and informed search techniques, adversarial search using the minimax algorithm, and local search techniques like genetic algorithms. Each experiment includes aims, theories, applications, and conclusions about the respective AI concepts. The document serves as a comprehensive study of AI methodologies and their practical implementations.

Uploaded by

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

Case Study

The document outlines various AI experiments conducted by Gaurav Lallan Jha, a 3rd-year AIML student, focusing on applications of AI, agent architectures, programming in Prolog, uninformed and informed search techniques, adversarial search using the minimax algorithm, and local search techniques like genetic algorithms. Each experiment includes aims, theories, applications, and conclusions about the respective AI concepts. The document serves as a comprehensive study of AI methodologies and their practical implementations.

Uploaded by

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

Name : Gaurav Lallan Jha

Subject : Artificial Intelligence Year : 3rd


Topic : Face recognition Semester : 5
Branch : AIML Roll No. : 22
Academic year : 2022-23 PIN : ARMIET/AI20JG007
Professor in charge : Ashish Dwivedi Sir
Department : CSE (AIML)
Head of Department : Vivek Pandey Sir
University : Mumbai University
Sign :

AI EXPERIMENT 1
Aim: - Study of different applications of AI which provides peas description and task
environment.
Theory:-
We know that there are different types of agents in AI. PEAS System is used to categorize
similar agents together. The PEAS system delivers the performance measure with respect to the
environment, actuators, and sensors of the respective agent. Most of the highest performing
agents are Rational Agents.
Rational Agent: The rational agent considers all possibilities and chooses to perform a highly
efficient action. For example, it chooses the shortest path with low cost for high
efficiency. PEAS stands for a Performance measure, Environment, Actuator, Sensor.
1. Performance Measure: Performance measure is the unit to define the success of an agent.
Performance varies with agents based on their different precepts.
2. Environment: Environment is the surrounding of an agent at every instant. It keeps changing
with time if the agent is set in motion. There are 5 major types of environments:
 Fully Observable & Partially Observable
 Episodic & Sequential
 Static & Dynamic
 Discrete & Continuous
 Deterministic & Stochastic
3. Actuator: An actuator is a part of the agent that delivers the output of action to the
environment.
4. Sensor: Sensors are the receptive parts of an agent that takes in the input for the agent

.
Performance
Agent Measure Environment Actuator Sensor

Hospital Patient’s health, Prescription, Symptoms,


Management Admission Hospital, Doctors, Diagnosis, Scan Patient’s
System process, Payment Patients report response

The comfortable
trip, Safety, Steering wheel,
Automated Car Maximum Roads, Traffic, Accelerator, Camera, GPS,
Drive Distance Vehicles Brake, Mirror Odometer

Maximize scores, Classroom, Desk,


Subject Improvement is Chair, Board, Smart displays, Eyes, Ears,
Tutoring students Staff, Students Corrections Notebooks

Part-picking Percentage of parts Conveyor belt Jointed arms and Camera, joint
robot in correct bins with parts; bins hand angle sensors

camera
proximity
sensors infrared
Soccer player number of parts in joint, angles, sensors
robot correct container team players motors

(A) Automated car driving agent


i) Performance measures that which should be satisfied by the automated car driver.

Safety: Automated system should be able to drive the car safely without
dashing anywhere.
Optimum speed: Automated system should be able to maintain the optimal
speed depending upon the surroundings.
Comfortable journey: Automated system should be able to give a
comfortable journey to the end user i.e. depending upon the road it should
ensure the comfort of the end user.
Maximize profits: Automated system should provide good mileage on
various rows the amount of energy consumed to automate the system should
not be very high etc. such features ensures that the user is benefited with the
automated features of the system and it can be useful for maximizing the
profits.

ii) Environment
Roads: - automated car drivers should be able to drive on any kind of roads ranging
from city to highway.
Traffic conditions: - You will find different set of traffic condition for different
type of roads. Automated systems should be able to drive efficiently in all types of
traffic condition. Sometimes traffic condition are formed because of pedestrians,
animals, etc.
Clients: - Automated cars are created depending on the client’s environment. For
example in some countries you will see left hand drive and in some countries there
is a right hand drive. Every country or state can have different weather condition.
Depending upon such constraints automated car drivers should be designed.
iii) Actuators: - are responsible for performing actions or providing output to an
environment. In case of car driving agent following are the actuators :
1. Steering wheel which can be used to direct a car in desired direction that is
right or left.
2. Accelerator, gear, etc. can be useful to increase or decrease the speed of the
car.
3. Brake is used to stop the car.
4. Light signal, horn can be very useful as indicators for an automated car.
iv) Sensors: - To take input from environment in car driving example cameras, sonar
system, speedometer, GPS, engine sensors, etc. are used as sensors.

B) Part picking ARM robot


i) Performance measures: - number of parts in correct container.
ii) Environment: - conveyor belt used for handling parts, containers used to keep parts, and
parts.
iii) Actuators: - arm with tooltips, to pick and drop parts from one place to another.
iv) Sensors: - camera to scan the position from where part should be picked and joint angle
sensors which are use to sense the obstacles and move in appropriate place.

(C) Medical diagnosis system


i) Performance measures

Healthy patients: - System should make use of sterilized instruments to ensure the safety
(healthiness) of the patient
Minimize cost: - the automated system results should not be very costly otherwise overall
expenses of the patient may increase, lawsuits. Medical diagnosis system should be legal.
ii) Environment: - patient, doctors, hospital environment.
iii) Sensors: - screen, printer.
iv) Actuators: - keyboard and mouse which is useful to make entry of symptoms, findings,
patient’s answers to given questions. Scanner to scan the reports, camera to click pictures
of patients.
(D)Soccer player robot
i) Performance: - number of goals, speed legal game.
ii) Environment: team players, opponent team players, playing around, goal net.
iii) Sensors: camera, proximity sensors, infrared sensors
iv) Actuators: joint, angles, motors

CONCLUSION: - We have studied different applications of AI which provides PEAS


description and task environment.

AI EXPERIMENT 2
Aim: Identify suitable agent architecture for the problem Solving

Theory:

Artificial intelligence is defined as the study of rational agents. 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 can be grouped into five classes based on their degree of perceived intelligence and
capability

1. Simple reflex agents

Simple reflex agents ignore the rest of the percept history and act only on the basis of
the current percept. Percept history is the history of all that an agent has perceived to date. The
agent function is based on the condition-action rule. A condition-action rule is a rule that maps
a state i.e, condition to an action. If the condition is true, then the action is taken, else not. This
agent function only succeeds when the environment is fully observable.
2. Model-based reflex agents

It works by finding a rule whose condition matches the current situation. A model-based agent
can handle partially observable environments by the use of a model about the world. The
agent has to keep track of the internal state which is adjusted by each percept and that depends
on the percept history.

3. Goal-based agents

These kinds of agents take decisions based on how far they are currently from their goal
(description of desirable situations). Their every action is intended to reduce its distance from
the goal. This allows the agent a way to choose among multiple possibilities, selecting the one
which reaches a goal state. The knowledge that supports its decisions is represented explicitly
and can be modified, which makes these agents more flexible. They usually require search and
planning. The goal-based agent’s behavior can easily be changed.

4. Learning Agent :
A learning agent in AI is the type of agent that can learn from its past experiences or it has
learning capabilities. It starts to act with basic knowledge and then is able to act and adapt
automatically through learning.

5. Utility-based agents
The agents which are developed having their end uses as building blocks are called utility-based
agents. When there are multiple possible alternatives, then to decide which one is best, utility-
based agents are used. They choose actions based on a preference (utility) for each state.
Sometimes achieving the desired goal is not enough. We may look for a quicker, safer, cheaper
trip to reach a destination. Agent happiness should be taken into consideration. Utility describes
how “happy” the agent is. Because of the uncertainty in the world, a utility agent chooses the
action that maximizes the expected utility. A utility function maps a state onto a real number
which describes the associated degree of happiness.

Conclusion: We have studied that how to identify suitable architecture from all types of agents for
problem.

AI EXPERIMENT 3
Aim: Write the program using PROLOG as an AI programming Languages
Theory:
Prolog is a logic programming language. It has important role in artificial intelligence. Unlike
many other programming languages, Prolog is intended primarily as a declarative programming
language. In prolog, logic is expressed as relations (called as Facts and Rules). Core heart of
prolog lies at the logic being applied. Formulation or Computation is carried out by running a
query over these relations.

Prolog stands for programming in logic. In the logic programming paradigm, prolog language is
most widely available. Prolog is a declarative language, which means that a program consists of
data based on the facts and rules (Logical relationship) rather than computing how to find a
solution. A logical relationship describes the relationships which hold for the given application.

Applications of Prolog:

The applications of prolog are as follows:

o Specification Language
o Robot Planning
o Natural language understanding
o Machine Learning
o Problem Solving
o Intelligent Database retrieval
o Expert System
o Automated Reasoning

Conclusion: - From this experiment we have study that how PROLOG is used in AI.
Code:-
Output:-

Conclusion: - From this experiment we have study that how PROLOG is used in AI.

AI EXPERIMENT 4
Aim: - Implement any one of the Uninformed search techniques.
Theory: - Uninformed search is a class of general-purpose search algorithms which operates in
brute force-way. Uninformed search algorithms do not have additional information about state or
search space other than how to traverse the tree, so it is also called blind search.
Following are the various types of uninformed search algorithms:
⦁ Breadth-first Search
⦁ Depth-first Search
⦁ Depth-limited Search
⦁ Iterative deepening depth-first search
⦁ Uniform cost search
⦁ Bidirectional Search
Breadth-first Search:
⦁ Breadth-first search is the most common search strategy for traversing a tree or
graph. This algorithm searches breadthwise in a tree or graph, so it is called breadth-first
search.
⦁ BFS algorithm starts searching from the root node of the tree and expands all
successor node at the current level before moving to nodes of next level.
⦁ The breadth-first search algorithm is an example of a general-graph search algorithm.
⦁ Breadth-first search implemented using FIFO queue data
structure. Advantages:
⦁ BFS will provide a solution if any solution exists.
⦁ If there are more than one solutions for a given problem, then BFS will provide
the minimal solution which requires the least number of steps.
Disadvantages:
⦁ It requires lots of memory since each level of the tree must be saved into memory
to expand the next level.
⦁ BFS needs lots of time if the solution is far away from the root
node. Example:
in the following graph, we start traversal from vertex 2. When we come to vertex 0, we look for
all adjacent vertices of it. 2 is also an adjacent vertex of 0. If we don’t mark visited vertices, then
2 will be processed again and it will become a non-terminating process. A Breadth First
Traversal of the following graph is 2, 0, 3, 1.

Conclusion: - In this experiment we are study how many types are there in Uninformed
Search technique & how BFS (Breadth-First-Search) is working in AI.
Code :-

Output: -

AI EXPERIMENT 5
Aim: - Implement any one of the inform search techniques.

Theory:- Informed Search algorithms have information on the goal state which helps in
more efficient searching. This information is obtained by a function that estimates how close
a state is to the goal state. Example: A* algorithm for 8 puzzle problem.
A* Search algorithm is one of the best and popular technique used in path-finding and
graph traversals.
Why A* Search Algorithm?
Informally speaking, A* Search algorithms, unlike other traversal techniques, it has “brains”.
What it means is that it is really a smart algorithm which separates it from the other
conventional algorithms. This fact is cleared in detail in below sections.
And it is also worth mentioning that many games and web-based maps use this algorithm to
find the shortest path very efficiently (approximation).
We have introduced Branch and Bound and discussed the 0/1 Knapsack problem in the
below posts.
 Branch and Bound | Set 1 (Introduction with 0/1 Knapsack)
 Branch and Bound | Set 2 (Implementation of 0/1 Knapsack)
In this puzzle solution of the 8 puzzle problem is discussed.
Given a 3×3 board with 8 tiles (every tile has one number from 1 to 8) and one empty
space. The objective is to place the numbers on tiles to match the final configuration using
the empty space. We can slide four adjacent (left, right, above, and below) tiles into the
empty space.
For example,

Conclusion:- From this experiment we are study how inform search works and how A* algorithm
working in AI.

Code :-
Output :-
AI EXPERIMENT 6
Aim: - Implement adversarial search using min-max algorithm.
Theory: -
Minimax is a recursive algorithm which is used to choose an optimal move for a
player assuming that the other player is also playing optimally.
It is used in games such as tic-tac-toe, go, chess, Isola, checkers, and many other
two-player games.
Such games are called games of perfect information because it is possible to see
all the possible moves of a particular game.
Let us combine what we have learnt so far about minimax and evaluation function
to write a proper Tic-Tac-Toe AI (Artificial Intelligence) that plays a perfect game.
This AI will consider all possible scenarios and makes the most optimal move.
Finding the Best Move :
We shall be introducing a new function called findBestMove(). This function
evaluates all the available moves using minimax() and then returns the best move
the maximizer can make.
Checking for GameOver state :
To check whether the game is over and to make sure there are no moves left we
use isMovesLeft() function. It is a simple straightforward function which checks
whether a move is available or not and returns true or false respectively.
Making our AI smarter :
One final step is to make our AI a little bit smarter. Even though the following AI
plays perfectly, it might choose to make a move which will result in a slower
victory or a faster loss. Lets take an example and explain it.

Conclusion: - From this experiment we are studied that how min-max algorithm
works for any games in AI.

AI EXPERIMENT 7
Aim:- Implement any one of the Local Search techniques. E.g. Hill Climbing, Simulated
Annealing, Genetic algorithm.
Theory:-
Genetic Algorithms(GAs) are adaptive heuristic search algorithms that belong to the
larger part of evolutionary algorithms. Genetic algorithms are based on the ideas of
natural selection and genetics. These are intelligent exploitation of random search
provided with historical data to direct the search into the region of better performance
in solution space. They are commonly used to generate high-quality solutions for
optimization problems and search problems.
Genetic algorithms simulate the process of natural selection which means those
species who can adapt to changes in their environment are able to survive and
reproduce and go to next generation. In simple words, they simulate “survival of the
fittest” among individual of consecutive generation for solving a problem. Each
generation consist of a population of individuals and each individual represents a
point in search space and possible solution. Each individual is represented as a string
of character/integer/float/bits. This string is analogous to the Chromosome.

Code:
Output:
Conclusion:- In this experiment we have studied genetic algorithm local search techniques.

AI EXPERIMENT 8
Aim: Prove the goal sentence from the following set of statements in FOPL by
applying forward, backward and resolution inference algorithms.
Theory:

Resolution is a theorem proving technique that proceeds by building


refutation proofs, i.e., proofs by contradictions. It was invented by a
Mathematician John Alan Robinson in the year 1965.

Resolution is used, if there are various statements are given, and we need to
prove a conclusion of those statements. Unification is a key concept in proofs
by resolutions. Resolution is a single inference rule which can efficiently
operate on the conjunctive normal form or clausal form.

Steps for Resolution:


1. Conversion of facts into first-order logic.
2. Convert FOL statements into CNF
3. Negate the statement which needs to prove (proof by contradiction)
4. Draw resolution graph (unification).
To better understand all the above steps, we will take an example in which
we will apply resolution.

Conclusion: From this experiment we are studying how resolution works in AI.
AI EXPERIMENT 9
Aim: create a Bayesian network for the given problem statement and draw
inferences from it.
Theory:

Bayesian belief network is key computer technology for dealing with


probabilistic events and to solve a problem which has uncertainty. We can
define a Bayesian network as:

"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.
Bayesian networks are probabilistic, because these networks are built from
a probability distribution, and also use probability theory for prediction
and anomaly detection.

Real world applications are probabilistic in nature, and to represent the


relationship between multiple events, we need a Bayesian network. It can
also be used in various tasks including prediction, anomaly detection,
diagnostics, automated insight, reasoning, time series prediction,
and decision making under uncertainty.

Problem:

Calculate the probability that alarm has sounded, but there is


neither a burglary, nor an earthquake occurred, and David and
Sophia both called the Harry.

Conclusion: from this experiment they are study what is Bayesian network in AI
AI EXPERIMENT 10
Aim: Case study of any existing successful AI system. (FACE RECOGNITION)
Theory:

Face recognition is a technology capable of identifying or verifying a subject


through an image, video, or any audiovisual element of his face. Generally, this
identification is used to access an application, system, or service. It is a method of
biometric identification that uses that body measures, in this case, face and head, to
verify the identity of a person through its facial biometric pattern and data. The
technology collects a set of unique biometric data of each person associated with
their face and facial expression to identify, verify and/or authenticate a person. The
procedure simply requires any device that has digital photographic technology to
generate and obtain the images and data necessary to create and record the
biometric facial pattern of the person that needs to be identified.

Unlike other identification solutions such as passwords, verification by email,


selfies or images, or fingerprint identification, Biometric facial recognition uses
unique mathematical and dynamic patterns that make this system one of the safest
and most effective ones.
So how does facial recognition work? Technologies vary, but here
are the basic steps:

Step 1. A picture of your face is captured from a photo or video. Your face might
appear alone or in a crowd. Your image may show you looking straight ahead or
nearly in profile.

Step 2. Facial recognition software reads the geometry of your face. Key factors
include the distance between your eyes and the distance from forehead to chin. The
software identifies facial landmarks — one system identifies 68 of them — that are
key to distinguishing your face. The result: your facial signature.
Step 3. Your facial signature — a mathematical formula — is compared to a
database of known faces. And consider this: at least million people have images of
their faces in one or more databases.

Step 4. A determination is made. Your faceprint may match that of an image in a


facial recognition system database.

Who uses facial recognition?


 Mobile phone makers in products. Apple first used facial recognition to unlock
its iPhone X, and continues with the iPhone XS. Face ID authenticates — it
makes sure you’re you when you access your phone. Apple says the chance of a
random face unlocking your phone is about one in 1 million.

 Social media companies on websites. Facebook uses an algorithm to spot faces


when you upload a photo to its platform. The social media company asks if you
want to tag people in your photos. If you say yes, it creates a link to their
profiles. Facebook can recognize faces with 98 percent accuracy.

 Businesses at entrances and restricted areas. Some companies have traded in


security badges for facial recognition systems. Beyond security, it could be one
way to get some face time with the boss.

 Marketers and advertisers in campaigns. Marketers often consider things like


gender, age, and ethnicity when targeting groups for a product or idea. Facial
recognition can be used to define those audiences even at something like a
concert.

Challenges Faced by Facial Recognition System

1) Illumination
Illumination stands for light variations. The slight change in lighting conditions
cause a significant challenge for automated face recognition and can have a
significant impact on its results. If the illumination tends to vary, the same
individual gets captured with the same sensor and with an almost identical facial
expression and pose, the results that emerge may appear quite different.

Illumination changes the face appearance drastically. It has been found that the
difference between two same faces with different illuminations is higher than two
different faces taken under same illumination.

2) Pose
Facial Recognition Systems are highly sensitive to pose variations. The pose of a
face varies when the head movement and viewing angle of the person changes. The
movements of head or differing POV of a camera can invariably cause changes in
face appearance and generate intra‐class variations making automated face
recognition rates drop drastically. It becomes a challenge to identify the real face
when the rotation angle goes higher. It may result in faulty recognition or no
recognition if the database only has the frontal view of the face.

3) Occlusion
Occlusion means blockage, and it occurs when one or other parts of the face are
blocked and whole face is not available as an input image. Occlusion is considered
one of the most critical challenges in face recognition system.

It occurs due to beard, moustache, accessories (goggle, cap, mask, etc.), and it is
prevalent in real-world scenario. The presence of such components makes the
subject diverse and hence making automated face recognition process a tough nut to
crack.

4) Expressions
Face is one of the most crucial biometrics as its unique features play a crucial role
in providing human identity and emotions. Varying situations cause different
moods which result in showing various emotions and eventually change in facial
expressions.
Different expressions of the same individual are another significant factor that
needs to be taken into account. Human expressions are particularly macro-
expressions which are happiness, sadness, anger, disgust, fear, surprise. Micro-
expressions are the one which shows the rapid facial patterns and happen
involuntarily.

Macro and micro expressions find their place on someone’s face due to changes in
one’s emotional state and in the wake of such emotions- which are many- the
efficient recognition becomes difficult.

State of Facial Recognition across the world


a) North America, Central America, and Caribbean

More recently, the Department of Homeland Security unveiled its “Biometric


Exit” plan, which aims to use facial recognition technology on nearly all air
travel passengers by 2023, to identify compliance with visa status.

Perhaps surprisingly, 59% of Americans are actually in favour


of implementing facial recognition technology, considering it acceptable for
use in law enforcement according to a Pew Research survey. Yet, some cities
such as San Francisco have pushed to ban surveillance, citing a stand against
its potential abuse by the government.

Facial recognition technology can potentially come in handy after a natural


disaster. After Hurricane Dorian hit in late summer of 2019, the Bahamas
launched a blockchain-based missing persons database “FindMeBahamas” to
identify thousands of displaced people.

b) Europe
Belgium and Luxembourg are two of only three governments in the world to
officially oppose the use of facial recognition technology.
“The EU has been a haven for unlawful biometric experimentation and
surveillance.”

— European Digital Rights (EDRi)

In Russia, authorities have relied on facial recognition technology to check


for breaches of quarantine rules by potential COVID-19 carriers. In Moscow
alone, there are reportedly over 100,000 facial recognition enabled cameras
in operation.

c) East Asia and Oceania


In the COVID-19 battle, contact tracing through biometric identification
became a common tool to slow the infection rates in countries such as China,
South Korea, Taiwan, and Singapore. In some instances, this included the use
of facial recognition technology to monitor temperatures as well as spot those
without a mask.

China is often cited as a notorious use case of mass surveillance, and the
country has the highest ratio of CCTV cameras to citizens in the world —
one for every 12 people.

By 2023, China will be the single biggest player in the global facial
recognition market. And it’s not just implementing the technology at home–
it’s exporting too!!

d) Africa
While the African continent currently has the lowest concentration of facial
recognition technology in use, this deficit may not last for long.

Several African countries, such as Kenya and Uganda, have received


telecommunications and surveillance financing and infrastructure from
Chinese companies — Huawei in particular. While the company claims this
has enabled regional crime rates to plummet, some activists are wary of the
partnership.

e) Middle East and Central Asia


Facial recognition technology is widespread in this region, notably for
military purposes.

In Turkey, 30 domestically-developed Kamikaze drones will use AI and


facial recognition for border security. Similarly, Israel has a close eye on
Palestinian citizens across 27 West Bank checkpoints.

In other parts of the region, police in the UAE have purchased discreet smart
glasses that can be used to scan crowds, where positive matches show up on
an embedded lens display. Over in Kazakhstan, facial recognition technology
could replace public transportation passes entirely.

f) South America
The majority of facial recognition technology in South America is aimed at
cracking down on crime. In fact, it worked in Brazil to capture
Interpol’s second-most wanted criminal.

How face recognition works?


You might be good at recognizing faces. You probably find it a cinch to
identify the face of a family member, friend, or acquaintance. You’re familiar
with their facial features — their eyes, nose, mouth — and how they come
together.
That’s how a facial recognition system works, but on a grand, algorithmic
scale. Where you see a face, recognition technology sees data. That data can
be stored and accessed.

Conclusion: Face is the most essential part of the human body, and its unique
features make it even more crucial in identifying humans. Various algorithms and
technologies are used worldwide to make the face recognition process more
accurate and reliable. The applications of this ever-growing technology are also
expanding in healthcare, security, defence, forensic, and transportation, requiring
more accuracy. However, some challenges are ubiquitous while developing face
recognition technology such as pose, occlusion, expressions, ageing, etc, which
have been discussed above in the article.

You might also like