AIML

Download as pdf or txt
Download as pdf or txt
You are on page 1of 79

Introduction to Artificial Intelligence

and Machine Learning


M Sarat Chandra Prasad
Assistant Professor
Department of Ai&Ml
Aditya College of Engineering

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Unit -I
• Introduction: What Is AI?, The Foundations of Artificial
Intelligence, The History of Artificial Intelligence, The
State of the Art, Agents and Environments, Good
Behavior: The Concept of Rationality, The Nature of
Environments, The Structure of Agents.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
What is AI?
There is no particular definition for AI while most of the people
defines AI as “The ability of a computer to do tasks that generally
require human intelligence”
“Computer system that is able to do something that it was not
explicitly programmed to do”

Most common point in all the definitions “Computers simulate


human intelligence”

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
• The most popular 8 definitions of AI were laid out along two
dimensions (Table 1). The definitions on the top are concerned
with thought process and reasoning where as the bottom
addresses behavior. The definitions on the left measure success in
terms of fidelity to human performance where as the ones on
the right measure against an ideal performance measure called
rationality. A system is said to be rational if it does the right
thing. Historically all 4 approaches have been followed each by
different people in different methods. A human centered
approach must be in part an empirical science involving
observations about human behavior. A rationalist approach
involves a combination of mathematics and engineering

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Acting Humanly: The Turing Test Approach
The “Turing Test”, proposed by Alan Turing was designed to
provide a satisfactory operational definition of intelligence. A
computer passes the test if a human interrogator after posing
some written questions cannot tell whether the written responses
come from a person or from a computer. The computer would
need to possess the following capabilities.
Natural language Processing to enable it to communicate successfully
in English
Knowledge Representation to store what it knows or hears
Automated Reasoning to use the stored information to answer
questions and to draw new conclusions
Machine Learning to adapt to new circumstances and to detect and
extrapolate patterns
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Turing’s Test deliberately avoided direct physical interaction between
interrogator and the computer because physical simulation of a person
is unnecessary for intelligence. However Turing Test includes video
signal so that interrogator can test the subject’s perceptual abilities. To
pass the Turing’s test computer will need Computer Vision to perceive
objects and Robotics to manipulate objects and move about

Hence all the 6 disciplines compose Most of the AI They are


Natural Language Processing
Knowledge Representation
Automated Reasoning
Machine Learning
Computer Vision
Robotics
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Thinking Humanly : The Cognitive Modeling Approach
If we are going to say that a given program thinks like a human, we
must have some way of determining how humans think. We need to
get inside the actual workings of human minds. There are three ways to
do this:
Through Introspection:Trying to catch our own thoughts as they go by
Through psychological experiments Observing a person in action
Through brain imaging Observing the brain in action. Once we have a
sufficiently precise theory of the mind, it becomes possible to express
the theory as a computer program. If the program’sinput–output
behavior matches corresponding human behavior, that is evidence that
some of the program’s mechanisms could also be operating in humans.
The interdisciplinary field of cognitive science brings together computer
models from AI and experimental techniques from psychology to construct
precise and testable theories of the human mind.
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Thinking Rationally : The Laws of Thought Approach
The Greek philosopher Aristotle was one of the first to attempt to
codify “right thinking,” that is irrefutable reasoning processes. His
syllogisms provided patterns for argument structures that always
yielded correct conclusions when given correct premises—for
example, “Socrates is a man; all men are mortal; therefore,
Socrates is mortal.” These laws of thought were supposed to
govern the operation of the mind; their study initiated the field
called logic.
Logicians in the 19th century developed a precise notation
for statements about all kinds of objects in the world and the
relations among them. By 1965, programs existed that could, in
principle, solve any solvable problem described in logical
notation. The so-called logicist tradition within artificial
intelligence hopes to build on such programs to create intelligent
systems.
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
There are two main obstacles to this approach. First, it is not easy
to take informal knowledge and state it in the formal terms
required by logical notation, particularly when the knowledge is
less than 100% certain. Second, there is a big difference between
solving a problem “in principle” and solving it in practice. Even
problems with just a few hundred facts can exhaust the
computational resources of any computer unless it has some
guidance as to which reasoning steps to try first. Although both of
these obstacles apply to any attempt to build computational
reasoning systems, they appeared first in the logicist tradition.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Acting Rationally : The Rational Agent Approach
An agent is just something that acts (agent comes from the Latin
agere, to do). Of course, all computer programs do something,
but computer agents are expected to do more: operate
autonomously, perceive their environment, persist over a
prolonged time period, adapt to change, and create and pursue
goals. A rational agent is one that acts so as to achieve the best
outcome or, when there is uncertainty, the best expected
outcome.
All the skills needed for the Turing Test also allow an agent to act
rationally. Knowledge representation and reasoning enable agents
to reach good decisions. We need to be able to generate
comprehensible sentences in natural language to get by in a
complex society. We need learning not only for erudition, but also
because it improves our ability to generate effective behavior.
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
In the “laws of thought” approach to AI, the emphasis
was on correct inferences. Making correct inferences is
sometimes part of being a rational agent, because one
way to act rationally is to reason logically to the
conclusion that a given action will achieve one’s goals
and then to act on that conclusion. On the other hand,
correct inference is not all of rationality; in some
situations, there is no provably correct thing to do, but
something must still be done. There are also ways of
acting rationally that cannot be said to involve inference.
For example, recoiling from a hot stove is a reflex action
that is usually more successful than a slower action taken
after careful deliberation.
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
History of Artificial Intelligence
1) The modern history of AI Probably begins with Alan Turing in
1936
2) Some states that his Turing Machine the predecessor to the
modern computer was the first instance of artificial intelligence
3) The test was simple can this computer system fool a human
4) In his mind this was the gold standard for intelligent behavior
5) This test can examine only external behavior
6) In 1955 John McCarthy and some colleagues coined the term
AI
7) Early AI systems were focused on General Intelligence
8) In 1966 Eliza Chatbot was able to pass Turing Test while it was
able to fool some humans most were not fooled
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
9) Systems were narrow in scope not robust as each behavior had
to be programmed explicitly.
10) Funding dropped off in the early 1970 as researchers and
government got discouraged and 1974-1980 became known as AI
Winter
11) The Japanese Government funded a Major AI project in 1980
but it was a total failure and the field of AI was quite again until
1993.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Applications of AI in Real World
• Robotic vehicles:
A driverless robotic car named STANLEY sped through the
rough terrain of the Mojave dessert at 22 mph, finishing the
132-mile course first to win the 2005 DARPA Grand
Challenge. STANLEY is a Volkswagen Touareg outfitted with
cameras, radar, and laser rangefinders to sense the
environment and onboard software to command the steering,
braking, and acceleration . The following year CMU’s BOSS
won the Urban Challenge, safely driving in traffic through the
streets of a closed Air Force base, obeying traffic rules and
avoiding pedestrians and other vehicles.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
• Speech recognition: A traveler calling United Airlines to book a
flight can have the entire conversation guided by an automated
speech recognition and dialog management system.
• Autonomous planning and scheduling: A hundred million miles
from Earth, NASA’s Remote Agent program became the first on-
board autonomous planning program to control the scheduling
of operations for a spacecraft. REMOTE AGENT generated plans
from high-level goals specified from the ground and monitored
the execution of those plans—detecting, diagnosing, and
recovering from problems as they occurred. Successor program
MAPGEN plans the daily operations for NASA’s Mars
Exploration Rovers, and MEXAR2 did mission planning—both
logistics and science planning—for the European Space Agency’s
Mars Express mission in 2008.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Game playing: IBM’s DEEP BLUE became the first computer program to
defeat the world champion in a chess match when it bested Garry
Kasparov by a score of 3.5 to 2.5 in an exhibition match. Kasparov said
that he felt a “new kind of intelligence” across the board from him.
Newsweek magazine described the match as “The brain’s last stand.”
The value of IBM’s stock increased by $18 billion. Human champions
studied Kasparov’s loss and were able to draw a few matches in
subsequent years, but the most recent human-computer matches have
been won convincingly by the computer.
Spam fighting: Each day, learning algorithms classify over a billion
messages as spam, saving the recipient from having to waste time
deleting what, for many users, could comprise 80% or 90% of all
messages, if not classified away by algorithms. Because the spammers
are continually updating their tactics, it is difficult for a static
programmed approach to keep up, and learning algorithms work best.
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Logistics planning: During the Persian Gulf crisis of 1991, U.S. forces
deployed a Dynamic Analysis and Replanning Tool, DART (Cross and
Walker, 1994), to do automated logistics planning and scheduling for
transportation. This involved up to 50,000 vehicles, cargo, and people at
a time, and had to account for starting points, destinations, routes, and
conflict resolution among all parameters. The AI planning techniques
generated in hours a plan that would have taken weeks with older
methods. The Defense Advanced Research Project Agency (DARPA) stated
that this single application more than paid back DARPA’s 30-year
investment in AI.
Robotics: The iRobot Corporation has sold over two million Roomba
robotic vacuum cleaners for home use. The company also deploys the
more rugged PackBot to Iraq and Afghanistan, where it is used to handle
hazardous materials, clear explosives, and identify the location of snipers.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Machine Translation: A computer program automatically translates from
Arabic to English, allowing an English speaker to see the headline
“Ardogan Confirms That Turkey Would Not Accept Any Pressure, Urging
Them to Recognize Cyprus.” The program uses a statistical model built
from examples of Arabic-to-English translations and from examples of
English text totaling two trillion words. None of the computer scientists
on the team speak Arabic, but they do understand statistics and machine
learning algorithms.
These are just a few examples of artificial
intelligence systems that exist today. Not magic
or science fiction—but rather science,
engineering, and mathematics
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Intelligent Agents

Rational Agent is the most concentrated term in AI. The concept


of rationality can be applied to a wide variety of agents operating
in any environment.
An agent is anything that can be viewed as perceiving its
environment through sensors and acting upon that environment
through actuators. This simple idea is illustrated in Figure 2. A
human agent has eyes, ears, and other organs for sensors and
hands, legs, vocal tract, and so on for actuators. A robotic agent
might have cameras and infrared range finders for sensors and
various motors for actuators. A software agent receives keystrokes,
file contents, and network packets as sensory inputs and acts on
the environment by displaying on the screen, writing files, and
sending network packets.
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
To illustrate these ideas, we use a very simple example—the
vacuum-cleaner world shown in Figure 3. This world is so simple
that we can describe everything that happens; it’s also a made-up
world, so we can invent many variations. This particular world
has just two locations: squares A and B. The vacuum agent
perceives which square it is in and whether there is dirt in the
square. It can choose to move left, move right, suck up the dirt, or
do nothing. One very simple agent function is the following: if
the current square is dirty, then suck; otherwise, move to the
other square. A partial tabulation of this agent function is shown
in Figure 4

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Good Behavior: The concept of Rationality
A rational agent is one that does the right thing—conceptually
speaking, every entry in the table for the agent function is filled
out correctly. Obviously, doing the right thing is better than doing
the wrong thing, but what does it mean to do the right thing?
We answer this age-old question in an age-old way: by
considering the consequences of the agent’s behavior. When an
agent is plunked down in an environment, it generates a sequence
of actions according to the percepts it receives. This sequence of
actions causes the environment to go through a sequence of states.
If the sequence is desirable, then the agent has performed well.
This notion of desirability is captured by a performance measure
that evaluates any given sequence of environment states.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
What is rational at any given time depends on four things:
• The performance measure that defines the criterion of success.
• The agent’s prior knowledge of the environment.
• The actions that the agent can perform.
• The agent’s percept sequence to date.

Rational Agent:
For each possible percept sequence, a rational agent should select
an action that is expected to maximize its performance measure,
given the evidence provided by the percept sequence and
whatever built-in knowledge the agent has

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Consider the simple vacuum-cleaner agent that cleans a square if it is dirty and
moves to the other square if not; this is the agent function Is this a rational
agent? That depends! First, we need to say what the performance measure is,
what is known about the environment, and what sensors and actuators the
agent has. Let us assume the following:
1) The performance measure awards one point for each clean square at each
time step, over a “lifetime” of 1000 time steps
2) The “geography” of the environment is known a priori but the dirt
distribution and the initial location of the agent are not. Clean squares stay
clean and sucking cleans the current square. The Left and Right actions move
the agent left and right except when this would take the agent outside the
environment, in which case the agent remains where it is
3) The only available actions are Left, Right, and Suck .
4) The agent correctly perceives its location and whether that location contains dirt.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Now that we have a definition of rationality, we are
almost ready to think about building rational agents.
First, however, we must think about task environments,
which are essentially the “problems” to which rational
agents are the “solutions.” We begin by showing how
to specify a task environment, illustrating the process
with a number of examples. We then show that task
environments come in a variety of flavors. The flavor
of the task environment directly affects the appropriate
design for the agent program.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Specifying the task environment

In discussion of the rationality of the simple vacuum-


cleaner agent, we had to specify the performance
measure, the environment, and the agent’s actuators and
sensors. We group all these under the heading of the task
environment. For the acronymically minded, we call
this the PEAS (Performance, Environment, Actuators,
Sensors) description. In designing an agent, the first step
must always be to specify the task environment as fully
as possible.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
The vacuum world was a simple example; let us consider a
more complex problem: an automated taxi driver. We should
point out, before the reader becomes alarmed, that a fully
automated taxi is currently somewhat beyond the capabilities
of existing technology. The full driving task is extremely open-
ended. There is no limit to the novel combinations of
circumstances that can arise—another reason we chose it as a
focus for discussion. Figure summarizes the PEAS description
for the taxi’s task environment.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
First, what is the performance measure to which we
would like our automated driver to aspire? Desirable
qualities include getting to the correct destination;
minimizing fuel consumption and wear and tear;
minimizing the trip time or cost; minimizing violations
of traffic laws and disturbances to other drivers;
maximizing safety and passenger comfort; maximizing
profits. Obviously, some of these goals conflict, so
tradeoffs will be required.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Next, what is the driving environment that the taxi will face? Any taxi
driver must deal with a variety of roads, ranging from rural lanes and
urban alleys to 12-lane freeways. The roads contain other traffic,
pedestrians, stray animals, road works, police cars, puddles and
potholes. The taxi must also interact with potential and actual
passengers. There are also some optional choices. The taxi might need
to operate in Southern California, where snow
is seldom a problem, or in Alaska, where it seldom is not. It could
always be driving on the right, or we might want it to be flexible
enough to drive on the left when in Britain or Japan. Obviously, the
more restricted the environment, the easier the design problem.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
The actuators for an automated taxi include those available to a human
driver: control over the engine through the accelerator and control over
steering and braking. In addition, it will need output to a display screen
or voice synthesizer to talk back to the passengers, and
perhaps some way to communicate with other vehicles, politely or
otherwise.
The basic sensors for the taxi will include one or more controllable
video cameras so that it can see the road; it might augment these with
infrared or sonar sensors to detect distances to other cars and obstacles.
To avoid speeding tickets, the taxi should have a speedome-
ter, and to control the vehicle properly, especially on curves, it should
have an accelerometer. To determine the mechanical state of the
vehicle, it will need the usual array of engine, fuel,
and electrical system sensors. Like many human drivers, it might want a
global positioning system (GPS) so that it doesn’t get lost. Finally, it will
need a keyboard or microphone for
the passenger to request a destination.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Agents in Artificial Intelligence
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.
An agent is anything that can be viewed as :perceiving its
environment through sensors and acting upon that environment
through actuators

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Types of Agents
Agents can be grouped into five classes based on their degree of
perceived intelligence and capability :
1) Simple Reflex Agents
2) Model-Based Reflex Agents
3) Goal-Based Agents
4) Utility-Based Agents
5) Learning Agent

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
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.
For simple reflex agents operating in partially observable
environments, infinite loops are often unavoidable. It may be
possible to escape from infinite loops if the agent can randomize
its actions.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Problems with Simple reflex agents are :
1) Very limited intelligence.
2) No knowledge of non-perceptual parts of the state.
3) Usually too big to generate and store.
4) If there occurs any change in the environment, then the
collection of rules need to be updated

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
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. The current state
is stored inside the agent which maintains some kind of structure
describing the part of the world which cannot be seen.
Updating the state requires information about :
how the world evolves independently from the agent, and
how the agent’s actions affect the world.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
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.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
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.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
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
A learning agent has mainly four conceptual components,
which are

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Learning element: It is responsible for making
improvements by learning from the environment
Critic: The learning element takes feedback from critics
which describes how well the agent is doing with respect
to a fixed performance standard.
Performance element: It is responsible for selecting
external action
Problem Generator: This component is responsible for
suggesting actions that will lead to new and informative
experiences.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
What is a neural network?
A neural network is a method in artificial intelligence that
teaches computers to process data in a way that is
inspired by the human brain. It is a type of machine
learning process, called deep learning, that uses
interconnected nodes or neurons in a layered structure
that resembles the human brain. It creates an adaptive
system that computers use to learn from their mistakes
and improve continuously. Thus, artificial neural networks
attempt to solve complicated problems, like summarizing
documents or recognizing faces, with greater accuracy.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
How do neural networks work?
The human brain is the inspiration behind neural network
architecture. Human brain cells, called neurons, form a
complex, highly interconnected network and send
electrical signals to each other to help humans process
information. Similarly, an artificial neural network is made
of artificial neurons that work together to solve a
problem. Artificial neurons are software modules, called
nodes, and artificial neural networks are software
programs or algorithms that, at their core, use computing
systems to solve mathematical calculations.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Simple neural network architecture
A basic neural network has interconnected artificial neurons in
three layers:
Input Layer : Information from the outside world enters the
artificial neural network from the input layer. Input nodes process
the data, analyze or categorize it, and pass it on to the next layer.
Hidden Layer :Hidden layers take their input from the input layer
or other hidden layers. Artificial neural networks can have a large
number of hidden layers. Each hidden layer analyzes the output
from the previous layer, processes it further, and passes it on to the
next layer.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Output Layer: The output layer gives the final result of all
the data processing by the artificial neural network. It can
have single or multiple nodes. For instance, if we have a
binary (yes/no) classification problem, the output layer
will have one output node, which will give the result as 1
or 0. However, if we have a multi-class classification
problem, the output layer might consist of more than one
output node.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
What is Artificial Neural Network
The term "Artificial Neural Network" is derived from
Biological neural networks that develop the structure of
a human brain. Similar to the human brain that has
neurons interconnected to one another, artificial neural
networks also have neurons that are interconnected to
one another in various layers of the networks. These
neurons are known as nodes.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
The given figure illustrates the typical diagram of Biological Neural
Network.
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
The typical Artificial Neural Network looks
something like the given figure.
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Dendrites from Biological Neural Network represent inputs in Artificial
Neural Networks, cell nucleus represents Nodes, synapse represents
Weights, and Axon represents Output.
Relationship between Biological neural network and artificial neural
network:
Biological Neural Network Artificial Neural Network
Dendrites Inputs
Cell nucleus Nodes
Synapse Weights
Axon Output

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
An Artificial Neural Network in the field of Artificial intelligence where
it attempts to mimic the network of neurons makes up a human brain
so that computers will have an option to understand things and make
decisions in a human-like manner. The artificial neural network is
designed by programming computers to behave simply like
interconnected brain cells.
There are around 1000 billion neurons in the human brain. Each
neuron has an association point somewhere in the range of 1,000 and
100,000. In the human brain, data is stored in such a manner as to be
distributed, and we can extract more than one piece of this data when
necessary from our memory parallelly. We can say that the human
brain is made up of incredibly amazing parallel processors.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
The architecture of an artificial neural network:
To understand the concept of the architecture of an
artificial neural network, we have to understand what a
neural network consists of. In order to define a neural
network that consists of a large number of artificial
neurons, which are termed units arranged in a
sequence of layers. Lets us look at various types of
layers available in an artificial neural network.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Advantages of Artificial Neural Network (ANN)
Parallel processing capability: Artificial neural networks have a
numerical value that can perform more than one task simultaneously.

Storing data on the entire network: Data that is used in traditional


programming is stored on the whole network, not on a database. The
disappearance of a couple of pieces of data in one place doesn't
prevent the network from working.

Capability to work with incomplete knowledge: After ANN training,


the information may produce output even with inadequate data. The
loss of performance here relies upon the significance of missing data.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Having a memory distribution: For ANN is to be able to adapt, it is
important to determine the examples and to encourage the network
according to the desired output by demonstrating these examples to
the network. The succession of the network is directly proportional to
the chosen instances, and if the event can't appear to the network in all
its aspects, it can produce false output.

Having fault tolerance: Extortion of one or more cells of ANN does not
prohibit it from generating output, and this feature makes the network
fault-tolerance.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Disadvantages of Artificial Neural Network:
• Assurance of proper network structure: There is no
particular guideline for determining the structure of artificial
neural networks. The appropriate network structure is
accomplished through experience, trial, and error.
• Unrecognized behavior of the network: It is the most
significant issue of ANN. When ANN produces a testing
solution, it does not provide insight concerning why and
how. It decreases trust in the network.
• Hardware dependence: Artificial neural networks need
processors with parallel processing power, as per their
structure. Therefore, the realization of the equipment is
dependent.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
• Difficulty of showing the issue to the network: ANNs can work with
numerical data. Problems must be converted into numerical values
before being introduced to ANN. The presentation mechanism to be
resolved here will directly impact the performance of the network. It
relies on the user's abilities.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
How do artificial neural networks work?
Artificial Neural Network can be best represented as a
weighted directed graph, where the artificial neurons form the
nodes. The association between the neurons outputs and
neuron inputs can be viewed as the directed edges with
weights. The Artificial Neural Network receives the input
signal from the external source in the form of a pattern and
image in the form of a vector. These inputs are then
mathematically assigned by the notations x(n) for every n
number of inputs.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Perceptrons: A neural network link that contains
computations to track features and uses Artificial
Intelligence in the input data is known as
Perceptron. This neural links to the artificial neurons
using simple logic gates with binary outputs. An
artificial neuron invokes the mathematical function
and has node, input, weights, and output
equivalent to the cell nucleus, dendrites, synapse,
and axon, respectively, compared to a biological
neuron.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Perceptron was introduced by Frank Rosenblatt in 1957. He
proposed a Perceptron learning rule based on the original MCP
neuron. A Perceptron is an algorithm for supervised learning of
binary classifiers. This algorithm enables neurons to learn and
processes elements in the training set one at a time.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Types of Perceptron:
Single layer: Single layer perceptron can learn only linearly
separable patterns.
Multilayer: Multilayer perceptrons can learn about two or more
layers having a greater processing power.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Advantages:
• A multi-layered perceptron model can solve complex non-linear
problems.
• It works well with both small and large input data.
• Helps us to obtain quick predictions after the training.
• Helps us obtain the same accuracy ratio with big and small
data.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
Disadvantages:
• In multi-layered perceptron model, computations are time-
consuming and complex.
• It is tough to predict how much the dependent variable affects
each independent variable.
• The model functioning depends on the quality of training.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
A genetic algorithm is an adaptive heuristic search algorithm inspired
by "Darwin's theory of evolution in Nature." It is used to solve
optimization problems in machine learning. It is one of the important
algorithms as it helps solve complex problems that would take a long
time to solve.
Genetic Algorithms are being widely used in different real-world
applications, for example, Designing electronic circuits, code-breaking,
image processing, and artificial creativity.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
• Population: Population is the subset of all possible or probable solutions,
which can solve the given problem.
• Chromosomes: A chromosome is one of the solutions in the population for
the given problem, and the collection of gene generate a chromosome.
• Gene: A chromosome is divided into a different gene, or it is an element of
the chromosome.
• Allele: Allele is the value provided to the gene within a particular
chromosome.
• Fitness Function: The fitness function is used to determine the individual's
fitness level in the population. It means the ability of an individual to
compete with other individuals. In every iteration, individuals are
evaluated based on their fitness function.
• Genetic Operators: In a genetic algorithm, the best individual mate to
regenerate offspring better than parents. Here genetic operators play a role
in changing the genetic composition of the next generation.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
• Selection : After calculating the fitness of every existent in the
population, a selection process is used to determine which of the
individualities in the population will get to reproduce and produce the
seed that will form the coming generation.

Department of Ai&Ml Aditya College of Engineering


01-06-2024
Surampalem
How Genetic Algorithm Work?
• The genetic algorithm works on the evolutionary generational cycle to
generate high-quality solutions. These algorithms use different
operations that either enhance or replace the population to give an
improved fit solution.
• It basically involves five phases to solve the complex optimization
problems, which are given as below:
• Initialization
• Fitness Assignment
• Selection
• Reproduction
• Termination
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
The genetic algorithm is a method for solving both constrained and
unconstrained optimization problems that is based on natural selection, the
process that drives biological evolution. The genetic algorithm repeatedly
modifies a population of individual solutions. At each step, the genetic
algorithm selects individuals from the current population to be parents and
uses them to produce the children for the next generation. Over successive
generations, the population "evolves" toward an optimal solution. You can
apply the genetic algorithm to solve a variety of optimization problems that
are not well suited for standard optimization algorithms, including problems
in which the objective function is discontinuous, nondifferentiable,
stochastic, or highly nonlinear. The genetic algorithm can address problems
of mixed integer programming, where some components are restricted to be
integer-valued.
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem
Department of Ai&Ml Aditya College of Engineering
01-06-2024
Surampalem

You might also like