Aetificial Intel
Aetificial Intel
Definition of AI
What is AI?
Artificial Intelligence (AI) is a branch of Science which deals with helping machines find
solutions to complex problems in a more human-like fashion.
This generally involves borrowing characteristics from human intelligence, and applying
them as algorithms in a computer friendly way.
A more or less flexible or efficient approach can be taken depending on the requirements
established, which influences how artificial the intelligent behavior appears
Artificial intelligence can be viewed from a variety of perspectives.
From the perspective of intelligence artificial intelligence is making machines
"intelligent" -- acting as we would expect people to act.
The inability to distinguish computer responses from human responses is called the
Turing test.
Intelligence requires knowledge
Expert problem solving - restricting domain to allow including significant relevant
knowledge
From a business perspective AI is a set of very powerful tools, and methodologies for
using those tools to solve business problems.
From a programming perspective, AI includes the study of symbolic programming,
problem solving, and search.
One of the simplest and most straightforward definitions of AI was presented by John McCarthy,
a professor of computer science at Stanford University, as “the science and engineering of
making intelligent systems.” The intelligent systems could be in the form of software, hardware,
or a combination of both.
Philosophy of AI
While exploiting the power of the computer systems, the curiosity of human, lead him to
wonder, “Can a machine think and behave like humans do?”
Thus, the development of AI started with the intention of creating similar intelligence in
machines that we find and regard high in humans.
Goals of AI
To Create Expert Systems − The systems which exhibit intelligent behavior, learn,
demonstrate, explain, and advice its users.
To Implement Human Intelligence in Machines − Creating systems that understand,
think, learn, and behave like humans.
Fig 1
Karel Čapek play named “Rossum's Universal Robots” (RUR) opens in London,
1923
first use of the word "robot" in English.
1945 Isaac Asimov, a Columbia University alumni, coined the term Robotics.
1973 The Assembly Robotics group at Edinburgh University built Freddy, the
Famous Scottish Robot, capable of using vision to locate and assemble models.
1979 The first computer-controlled autonomous vehicle, Stanford Cart, was built.
1985 Harold Cohen created and demonstrated the drawing program, Aaron.
The Deep Blue Chess Program beats the then world chess champion, Garry
1997
Kasparov.
What is Intelligence?
The ability of a system to calculate, reason, perceive relationships and analogies, learn from
experience, store and retrieve information from memory, solve problems, comprehend complex
ideas, use natural language fluently, classify, generalize, and adapt new situations.
Types of Intelligence
As described by Howard Gardner, an American developmental psychologist, the Intelligence
comes in multifold −
You can say a machine or a system is artificially intelligent when it is equipped with at least
one and at most all intelligences in it.
What is Intelligence composed of?
The intelligence is intangible. It is composed of −
Reasoning
Learning
Problem Solving
Perception
Linguistic Intelligence
Fig 2
Let us go through all the components briefly −
Reasoning − It is the set of processes that enables us to provide basis for judgement,
making decisions, and prediction. There are broadly two types –
Even if all of the premises are true in a statement, inductive If something is true of a class of
reasoning allows for the conclusion to be false. things in general, it is also true for
all members of that class.
(Fig.3)
AI TECHNIQUES
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.
Why are neural networks important?
Neural networks can help computers make intelligent decisions with limited human assistance.
This is because they can learn and model the relationships between input and output data that are
nonlinear and complex. For instance, they can do the following tasks.
What are neural networks used for?
Neural networks have several use cases across many industries, such as the following:
Medical diagnosis by medical image classification
Targeted marketing by social network filtering and behavioral data analysis
Financial predictions by processing historical data of financial instruments
Electrical load and energy demand forecasting
Process and quality control
Chemical compound identification
We give four of the important applications of neural networks below.
1. Computer vision
Computer vision is the ability of computers to extract information and insights from images and
videos. With neural networks, computers can distinguish and recognize images similar to
humans. Computer vision has several applications, such as the following:
Visual recognition in self-driving cars so they can recognize road signs and other road users
Content moderation to automatically remove unsafe or inappropriate content from image and
video archives
Facial recognition to identify faces and recognize attributes like open eyes, glasses, and facial
hair
Image labeling to identify brand logos, clothing, safety gear, and other image details
2. Speech recognition
Neural networks can analyze human speech despite varying speech patterns, pitch, tone,
language, and accent. Virtual assistants like Amazon Alexa and automatic transcription software
use speech recognition to do tasks like these:
Assist call center agents and automatically classify calls
Convert clinical conversations into documentation in real time
Accurately subtitle videos and meeting recordings for wider content reach
3. Natural language processing
Natural language processing (NLP) is the ability to process natural, human-created text. Neural
networks help computers gather insights and meaning from text data and documents. NLP has
several use cases, including in these functions:
Automated virtual agents and chatbots
Automatic organization and classification of written data
Business intelligence analysis of long-form documents like emails and forms
Indexing of key phrases that indicate sentiment, like positive and negative comments on social
media
Document summarization and article generation for a given topic
4. Recommendation engines
Neural networks can track user activity to develop personalized recommendations. They can also
analyze all user behavior and discover new products or services that interest a specific user. For
example, Curalate, a Philadelphia-based startup, helps brands convert social media posts into
sales. Brands use Curalate’s intelligent product tagging (IPT) service to automate the collection
and curation of user-generated social content. IPT uses neural networks to automatically find and
recommend products relevant to the user’s social media activity. Consumers don't have to hunt
through online catalogs to find a specific product from a social media image. Instead, they can
use Curalate’s auto product tagging to purchase the product with ease.
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.
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.
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.
What are the types of neural networks?
Artificial neural networks can be categorized by how the data flows from the input node to the
output node. Below are some examples:
1. Feedforward neural networks
Feedforward neural networks process data in one direction, from the input node to the output
node. Every node in one layer is connected to every node in the next layer. A feedforward
network uses a feedback process to improve predictions over time.
Fuzzy Logic
Introduction
The term fuzzy refers to things that are not clear or are vague. In the real world many times we
encounter a situation when we can’t determine whether the state is true or false, their fuzzy logic
provides very valuable flexibility for reasoning. In this way, we can consider the inaccuracies
and uncertainties of any situation.
Fuzzy Logic is a form of many-valued logic in which the truth values of variables may be any
real number between 0 and 1, instead of just the traditional values of true or false. It is used to
deal with imprecise or uncertain information and is a mathematical method for representing
vagueness and uncertainty in decision-making.
Fuzzy Logic is based on the idea that in many cases, the concept of true or false is too restrictive,
and that there are many shades of gray in between. It allows for partial truths, where a statement
can be partially true or false, rather than fully true or false.
Fuzzy Logic is used in a wide range of applications, such as control systems, image processing,
natural language processing, medical diagnosis, and artificial intelligence.
The fundamental concept of Fuzzy Logic is the membership function, which defines the degree
of membership of an input value to a certain set or category. The membership function is a
mapping from an input value to a membership degree between 0 and 1, where 0 represents non-
membership and 1 represents full membership.
Fuzzy Logic is implemented using Fuzzy Rules, which are if-then statements that express the
relationship between input variables and output variables in a fuzzy way. The output of a Fuzzy
Logic system is a fuzzy set, which is a set of membership degrees for each possible output value.
In summary, Fuzzy Logic is a mathematical method for representing vagueness and uncertainty
in decision-making, it allows for partial truths, and it is used in a wide range of applications. It is
based on the concept of membership function and the implementation is done using Fuzzy rules.
In the boolean system truth value, 1.0 represents the absolute truth value and 0.0 represents the
absolute false value. But in the fuzzy system, there is no logic for the absolute truth and absolute
false value. But in fuzzy logic, there is an intermediate value too present which is partially true
and partially false.
ARCHITECTURE
RULE BASE: It contains the set of rules and the IF-THEN conditions provided by the experts to
govern the decision-making system, on the basis of linguistic information. Recent developments
in fuzzy theory offer several effective methods for the design and tuning of fuzzy controllers.
Most of these developments reduce the number of fuzzy rules.
FUZZIFICATION: It is used to convert inputs i.e. crisp numbers into fuzzy sets. Crisp inputs
are basically the exact inputs measured by sensors and passed into the control system for
processing, such as temperature, pressure, rpm’s, etc. also It splits the input signal into five steps
such as −
LP x is Large Positive
MP x is Medium Positive
S x is Small
MN x is Medium Negative
LN x is Large Negative
INFERENCE ENGINE: It determines the matching degree of the current fuzzy input with
respect to each rule and decides which rules are to be fired according to the input field. Next, the
fired rules are combined to form the control actions.
DEFUZZIFICATION: It is used to convert the fuzzy sets obtained by the inference engine into
a crisp value. There are several defuzzification methods available and the best-suited one is used
with a specific expert system to reduce the error.
Singleton fuzzifier
Gaussian fuzzifier
Trapezoidal or triangular fuzzifier
This system can work with any type of inputs whether it is imprecise, distorted or noisy
input information.
The construction of Fuzzy Logic Systems is easy and understandable.
Fuzzy logic comes with mathematical concepts of set theory and the reasoning of that is
quite simple.
It provides a very efficient solution to complex problems in all fields of life as it
resembles human reasoning and decision-making.
The algorithms can be described with little data, so little memory is required.
Application
It is used in the aerospace field for altitude control of spacecraft and satellites.
It has been used in the automotive system for speed control, traffic control.
It is used for decision-making support systems and personal evaluation in the large
company business.
It has application in the chemical industry for controlling the pH, drying, chemical
distillation process.
Fuzzy logic is used in Natural language processing and various intensive applications in
Artificial Intelligence.
Fuzzy logic is extensively used in modern control systems such as expert systems.
Fuzzy Logic is used with Neural Networks as it mimics how a person would make decisions,
only much faster. It is done by Aggregation of data and changing it into more meaningful data by
forming partial truths as Fuzzy sets.
Have you ever wondered how certain theories greatly inspire a particular invention? The same
goes with Genetic Algorithms. All of us would have heard of the famous theory of Charles
Darwin, “Survival of the fittest” (fittest individuals are selected for reproduction to produce
offspring of the next generation), which extends to Evolution by Natural Selection.
1. Search
2. Optimisation
Genetic algorithms use an iterative process to arrive at the best solution. Finding the best solution
out of multiple best solutions (best of best). Compared with Natural selection, it is natural for the
fittest to survive in comparison with others.
Evolution usually starts from a population of randomly generated individuals in the form of
iteration. (Iteration will lead to a new generation).
In every iteration or generation, the fitness of each individual is determined to select the fittest.
Genome fittest individuals selected are mutated or altered to form a new generation, and the
process continues until the best solution has reached.
Relating it to the Optimisation scenario, we need to identify the Genetic Representation of our
solution domain or business problem we need to solve. Evaluation criteria i.e., Fitness Function
to decide the worth of a solution.
For example:
We need to maximize the profit (Fitness Function) by increasing sales (Genetic representation)
of the product.
We need to find the best model hyperparameters (Fitness function) for the classification
algorithms i.e., Fine-tuning to yield the best prediction
Optimum number of feature (fitness function) selection for building the machine learning model
(Genetic representation).
1. Initialisation:
Randomly generate a population with multiple chromosomes. Gene is the smallest unit and can
be referred to as a set of characteristics (variables). We aim to join the Genes to obtain the
Chromosomes(solution). The chromosome itself represents one candidate solution abstractly.
The generation of Chromosome is user-defined (combination of numbers between 0 and 5 or
only binary numbers).
Now we need to define the evaluation criteria for best chromosomes(solution). Each
chromosome is assigned with a fitness score by the fitness function, which represents the
goodness of the solution. Let’s say the fitness function is the sum of all the genes. Hence, the
chromosome with the maximum sum is the fittest. In our case, the chromosome has a sum of 12.
3. Selection:
Selecting the top 2 fittest chromosomes for creating the next generation. These will act as parents
to generate offspring for the next generation which will naturally inherit the strong features. Two
pairs of individuals (parents) are selected based on their fitness scores. Other chromosomes are
dropped. Here are some of the methods of parent selection-
4. Crossover:
Crossover is the equivalent of two parents having a child. Each chromosome contributes a
certain number of genes to the new individual. Offspring are created by exchanging the genes of
parents among themselves until the crossover point is reached.
5. Mutation:
To avoid the duplicity (crossover generates offspring similar to parents) and to enhance the
diversity in offspring we perform mutation. The mutation operator solves this problem by
changing the value of some features in the offspring at random.
Disadvantages:
Genetic Algorithms might be costly in computational terms since the evaluation of each
individual requires the training of a model.
These algorithms can take a long time to converge since they have a stochastic nature.
The brain has three main parts: the cerebrum, cerebellum and brainstem.
Cerebrum: is the largest part of the brain and is composed of right and left hemispheres. It
performs higher functions like interpreting touch, vision and hearing, as well as speech,
reasoning, emotions, learning, and fine control of movement.
Cerebellum: is located under the cerebrum. Its function is to coordinate muscle movements,
maintain posture, and balance.
Brainstem: acts as a relay center connecting the cerebrum and cerebellum to the spinal cord. It
performs many automatic functions such as breathing, heart rate, body temperature, wake and
sleep cycles, digestion, sneezing, coughing, vomiting, and swallowing.
The cerebrum is divided into two halves: the right and left hemispheres (Fig. 2) They are joined
by a bundle of fibers called the corpus callosum that transmits messages from one side to the
other. Each hemisphere controls the opposite side of the body. If a stroke occurs on the right side
of the brain, your left arm or leg may be weak or paralyzed.
Not all functions of the hemispheres are shared. In general, the left hemisphere controls speech,
comprehension, arithmetic, and writing. The right hemisphere controls creativity, spatial ability,
artistic, and musical skills. The left hemisphere is dominant in hand use and language in about
92% of people.
. The cerebrum is divided into left and right hemispheres. The two sides are connected by the
nerve fibers corpus callosum.
The cerebrum is divided into four lobes: frontal, parietal, occipital and temporal.
Frontal lobe
Parietal lobe
Occipital lobe
Temporal lobe
The brain is the most complex part of the human body. It is the center of consciousness and also
controls all voluntary and involuntary movement and bodily functions. It communicates with
each part of the body through the nervous system, a network of channels that carry
electrochemical signals.
As a species, humans have evolved a complex nervous system and brain over millions of years.
Comparisons of our nervous systems with those of other animals, such as chimpanzees, show
some similarities (Darwin, 1859). Researchers can also use fossils to study the relationship
between brain volume and human behavior over the course of evolutionary history. Homo
habilis, for instance, a human ancestor living about 2 million years ago shows a larger brain
volume than its own ancestors but far less than modern homo sapiens. The main difference
between humans and other animals-- in terms of brain development-- is that humans have a
much more developed frontal cortex (the front part of the brain associated with planning).
Interestingly, a person’s unique nervous system develops over the course of their lifespan in a
way that resembles the evolution of nervous systems in animals across vast stretches of time. For
example, the human nervous system begins developing even before a person is born. It begins as
a simple bundle of tissue that forms into a tube and extends along the head-to-tail plane
becoming the spinal cord and brain. 25 days into its development, the embryo has a distinct
spinal cord, as well as hindbrain, midbrain and forebrain (Stiles & Jernigan, 2010). What,
exactly, is this nervous system that is developing and what does it do?
The nervous system can be thought of as the body’s communication network that consists of all
nerve cells. There are many ways in which we can divide the nervous system to understand it
more clearly. One common way to do so is by parsing it into the central nervous system and the
peripheral nervous system. Each of these can be sub-divided, in turn. Let’s take a closer, more
in-depth look at each. And, don’t worry, the nervous system is complicated with many parts and
many new vocabulary words. It might seem overwhelming at first but through the figures and a
little study you can get it.
The Central Nervous System (CNS): The Neurons inside the Brain
The Central Nervous System, or CNS for short, is made up of the brain and spinal cord. The
CNS is the portion of the nervous system that is encased in bone (the brain is protected by the
skull and the spinal cord is protected by the spinal column). It is referred to as “central” because
it is the brain and spinal cord that are primarily responsible for processing sensory information—
touching a hot stove or seeing a rainbow, for example—and sending signals to the peripheral
nervous system for action. It communicates largely by sending electrical signals through
individual nerve cells that make up the fundamental building blocks of the nervous system,
called neurons. There are approximately 86 billion neurons in the human brain and each has
many contacts with other neurons, called synapses,
If we were able to magnify a view of individual neurons we would see that they are cells made
from distinct parts. The three main components of a neuron are the dendrites, the soma, and the
axon. Neurons communicate with one another by receiving information through the dendrites,
which act as an antenna. When the dendrites channel this information to the soma, or cell body,
it builds up as an electro-chemical signal. This electrical part of the signal, called an action
potential shoots down the axon, a long tail that leads away from the soma and toward the next
neuron. When people talk about “nerves” in the nervous system, it typically refers to bundles of
axons that form long neural wires along which electrical signals can travel. Cell-to-cell
communication is helped by the fact that the axon is covered by a myelin sheath—a layer of
fatty cells that allow the signal to travel very rapidly from neuron to neuron
What is a formal language?
A formal language is a language that is characterized by a strict set of rules that govern its syntax
and semantics. Formal languages are used in many different fields, including mathematics,
computer science, and linguistics.
In the field of artificial intelligence, formal languages are used to represent knowledge and
reasoning. AI systems often use formal languages to represent the knowledge they have acquired
from data. This knowledge can then be used to make predictions or decisions.
Formal languages are powerful tools for AI systems. They allow for precise and unambiguous
representation of knowledge. Additionally, formal languages can be used to automatically
generate new knowledge from existing knowledge. This process, known as reasoning, is a key
part of many AI applications.
In AI, a formal language is a language in which the grammar and syntax are well-defined, and
there is a clear mapping between the elements of the language and the concepts they represent.
Formal languages are often used in mathematical and computer science applications, where they
are used to represent ideas and concepts in a precise and unambiguous way.
Formal languages are an important tool for AI researchers, as they allow us to express ideas in a
way that can be understood by computers. By using a formal language, we can tell a computer
what we want it to do, and how we want it to do it. This is essential for creating effective AI
systems.
However, it is important to remember that a formal language is only a tool, and it is not the only
way to create AI systems. There are many different approaches to AI, and each has its own
strengths and weaknesses. Formal languages are just one tool in the AI toolbox, and they should
be used in conjunction with other methods to create the most effective AI systems possible.
Formal languages are used in AI to help machines understand and process information. By using
a formal language, machines can more easily identify patterns and relationships between data
points. This can help machines make better decisions and predictions.
Formal languages also make it easier to debug AI systems. By having a well-defined language, it
is easier to identify errors and track down their causes. This can save a lot of time and effort in
the development process.
Overall, formal languages can help make AI systems more efficient and accurate. They can also
help make the development process easier and faster.
What are some of the challenges associated with formal language use in AI?
One of the challenges associated with formal language use in AI is the ambiguity of natural
language. For example, the sentence "I saw the man with a telescope" can be interpreted in
multiple ways. Does "I" refer to the speaker or the person who owns the telescope? Is the man
looking through the telescope or carrying it? This ambiguity can make it difficult for AI systems
to understand the intended meaning of a sentence.
Another challenge is the lack of standardization in natural language. There is no one "correct"
way to say something, and different people may use different words or phrases to mean the same
thing. This can make it difficult for AI systems to learn the correct mapping from words to
concepts.
Finally, the use of formal language in AI can be limited by the available data. If there is no data
available for a particular word or phrase, then the AI system will not be able to learn its meaning.
This can be a problem when trying to learn rare or specialized concepts.
Formal language is any language that is used in a well-defined, specific way. In AI, formal
language is often used to represent knowledge. This is because formal language is precise and
can be interpreted by computers.
Formal language can be used to represent knowledge in AI in many ways. For example, formal
language can be used to represent facts and rules. Facts can be represented using predicate logic,
and rules can be represented using first-order logic. Additionally, formal language can be used to
represent knowledge in other ways, such as using Bayesian networks or decision trees.
Overall, formal language is a powerful tool that can be used to represent knowledge in AI. By
using formal language, AI systems can be more precise and accurate in their understanding of the
world.
FORMS OF LEARNING
Definition of learning
Learning is a complex and adaptive process through which individuals acquire new knowledge,
skills, behaviors, or understanding about the world. It involves the integration of information,
experiences, and feedback to create lasting changes in an individual's cognitive, emotional, or
physical capabilities. Learning can occur through various methods, including formal education,
personal experiences, observation, experimentation, and interactions with the environment.
In essence, learning is the process by which individuals or organisms gain the ability to
recognize patterns, solve problems, make decisions, and adapt to new situations based on their
acquired knowledge and experiences. It can encompass a wide range of activities, from acquiring
basic facts to developing complex problem-solving skills and critical thinking abilities. Learning
is not limited to humans; it is observed across various species and plays a fundamental role in
their survival and adaptation.
This article targets to clearly explain the ID3 Algorithm (one of the many Algorithms used to
build Decision Trees) in detail. We explain the algorithm using a fake sample Covid-19 dataset.
In simple words, a decision tree is a structure that contains nodes (rectangular boxes) and
edges(arrows) and is built from a dataset (table of columns representing features/attributes and
rows corresponds to records). Each node is either used to make a decision (known as decision
node) or represent an outcome (known as leaf node).
The picture above depicts a decision tree that is used to classify whether a person is Fit or Unfit.
The decision nodes here are questions like ‘’‘Is the person less than 30 years of age?’, ‘Does the
person eat junk?’, etc. and the leaves are one of the two possible outcomes viz. Fit and Unfit.
Looking at the Decision Tree we can say make the following decisions:
If a person is less than 30 years of age and doesn’t eat junk food then he is Fit, if a person is less
than 30 years of age and eats junk food then he is Unfit and so on.
The initial node is called the root node (colored in blue), the final nodes are called the leaf nodes
(colored in green) and the rest of the nodes are called intermediate or internal nodes.
The root and intermediate nodes represent the decisions while the leaf nodes represent the
outcomes.
ID3 in brief
ID3 stands for Iterative Dichotomiser 3 and is named such because the algorithm iteratively
(repeatedly) dichotomizes(divides) features into two or more groups at each step.
Invented by Ross Quinlan, ID3 uses a top-down greedy approach to build a decision tree. In
simple words, the top-down approach means that we start building the tree from the top and the
greedy approach means that at each iteration we select the best feature at the present moment to
create a node.
ML also pursues a set of problems within AI, whose solutions may be useful to help solve other
AI problems. Most AI work now involves ML because intelligent behavior requires considerable
knowledge, and learning is the easiest way to get that knowledge.
For a meatier but more NLP-focused discussion, see Jason Eisner's answer to How is
computational linguistics different from natural language processing?
Types of search algorithms
Based on the search problems we can classify the search algorithms into uninformed (Blind
search) search and informed search (Heuristic search) algorithms.
Uninformed/Blind Search:
The uninformed search does not contain any domain knowledge such as closeness, the location
of the goal. It operates in a brute-force way as it only includes information about how to traverse
the tree and how to identify leaf and goal nodes. Uninformed search applies a way in which
search tree is searched without any information about the search space like initial state operators
and test for the goal, so it is also called blind search.It examines each node of the tree until it
achieves the goal node.
1. Depth-First Search (DFS): DFS explores as far as possible along each branch before
backtracking. It uses a stack data structure to keep track of the nodes to be visited next. DFS can
get trapped in deep branches, leading to suboptimal solutions or infinite loops in some cases.
2. Breadth-First Search (BFS): BFS explores all the neighbors of a node before moving on to
the next level of nodes. It uses a queue data structure to manage the order of nodes to be visited.
BFS guarantees the shortest path to the goal, but it might be memory-intensive for large graphs.
3. Uniform Cost Search (UCS): UCS expands nodes based on their cumulative path cost from
the initial state. It uses a priority queue to ensure that nodes with lower path costs are explored
first. UCS is optimal for finding the shortest path but can be slow due to repeated expansion of
states.
4. Iterative Deepening A (IDA)**: IDA* is a memory-efficient variation of A* that avoids the
memory overhead of storing all nodes in a search tree. It performs a series of depth-limited
searches, increasing the depth limit iteratively until the goal is found.
5. Beam Search: Beam Search is a variation of BFS that only keeps a fixed number (beam
width) of most promising nodes at each level, discarding the rest. This reduces memory usage
but can lead to suboptimal solutions if promising paths are discarded too early.
6. Hill Climbing: Hill Climbing is a local search algorithm that starts at an initial state and
iteratively moves to neighboring states that improve a heuristic. It tends to get stuck in local
optima and might not find the global optimal solution.
7. Simulated Annealing: Simulated Annealing is a probabilistic search algorithm inspired by
the annealing process in metallurgy. It allows the algorithm to sometimes accept worse solutions
early in the search to escape local optima and explore a broader solution space.
8. Genetic Algorithms: Genetic Algorithms are inspired by the process of natural selection.
They use a population of candidate solutions and apply selection, crossover, and mutation
operations to evolve and refine solutions over multiple generations.
Informed Search
Informed search algorithms use domain knowledge. In an informed search, problem information
is available which can guide the search. Informed search strategies can find a solution more
efficiently than an uninformed search strategy. Informed search is also called a Heuristic search.
A heuristic is a way which might not always be guaranteed for best solutions but guaranteed to
find a good solution in reasonable time.
Informed search can solve much complex problem which could not be solved in another way.
An example of informed search algorithms is a traveling salesman problem.
1. Greedy Search
2. A* Search
1. Greedy Best-First Search: Greedy Best-First Search uses a heuristic function to estimate the
cost from a node to the goal. It prioritizes nodes that appear to be closer to the goal. This
algorithm is not guaranteed to find the optimal solution and can get stuck in local optima.
2. A Search*: A* (pronounced "A star") combines the advantages of both UCS and Greedy
Best-First Search. It uses a combination of the path cost and the heuristic function to select
the best nodes to expand. A* is both optimal and complete if the heuristic is admissible
(never overestimates the true cost) and consistent.
DIFFERENT TYPES OF IA AGENTS
An AI system is composed of an agent and its environment. The agents act in their environment.
The environment may contain other agents.
What are Agent and Environment?
An agent is anything that can perceive its environment through sensors and acts upon that
environment through effectors.
A human agent has sensory organs such as eyes, ears, nose, tongue and skin parallel to
the sensors, and other organs such as hands, legs, mouth, for effectors.
A robotic agent replaces cameras and infrared range finders for the sensors, and various
motors and actuators for effectors.
A software agent has encoded bit strings as its programs and actions.
Agent Terminology
Performance Measure of Agent − It is the criteria, which determines how successful an
agent is.
Behavior of Agent − It is the action that agent performs after any given sequence of
percepts.
Percept − It is agent’s perceptual inputs at a given instance.
Percept Sequence − It is the history of all that an agent has perceived till date.
Agent Function − It is a map from the precept sequence to an action.
Rationality
Rationality is nothing but status of being reasonable, sensible, and having good sense of
judgment.
Rationality is concerned with expected actions and results depending upon what the agent has
perceived. Performing actions with the aim of obtaining useful information is an important part
of rationality.
What is Ideal Rational Agent?
An ideal rational agent is the one, which is capable of doing expected actions to maximize its
performance measure, on the basis of −
Its percept sequence
Its built-in knowledge base
1. High accuracy: Deep Learning algorithms can achieve state-of-the-art performance in various
tasks, such as image recognition and natural language processing.
2. Automated feature engineering: Deep Learning algorithms can automatically discover and
learn relevant features from data without the need for manual feature engineering.
3. Scalability: Deep Learning models can scale to handle large and complex datasets, and can
learn from massive amounts of data.
4. Flexibility: Deep Learning models can be applied to a wide range of tasks and can handle
various types of data, such as images, text, and speech.
5. Continual improvement: Deep Learning models can continually improve their performance as
more data becomes available.
1. High computational requirements: Deep Learning models require large amounts of data and
computational resources to train and optimize.
2. Requires large amounts of labeled data: Deep Learning models often require a large amount
of labeled data for training, which can be expensive and time- consuming to acquire.
3. Interpretability: Deep Learning models can be challenging to interpret, making it difficult to
understand how they make decisions.
Overfitting: Deep Learning models can sometimes overfit to the training data, resulting in
poor performance on new and unseen data.
4. Black-box nature: Deep Learning models are often treated as black boxes, making it difficult
to understand how they work and how they arrived at their predictions.
In summary, while Deep Learning offers many advantages, including high accuracy and
scalability, it also has some disadvantages, such as high computational requirements, the need
for large amounts of labeled data, and interpretability challenges. These limitations need to be
carefully considered when deciding whether to use Deep Learning for a specific task.
Deep learning architectures
Connectionist architectures have existed for more than 70 years, but new architectures and
graphical processing units (GPUs) brought them to the forefront of artificial intelligence. Deep
learning isn't a single approach but rather a class of algorithms and topologies that you can apply
to a broad spectrum of problems.
While deep learning is certainly not new, it is experiencing explosive growth because of the
intersection of deeply layered neural networks and the use of GPUs to accelerate their execution.
Big data has also fed this growth. Because deep learning relies on training neural networks with
example data and rewarding them based on their success, the more data, the better to build these
deep learning structures.
The number of architectures and algorithms that are used in deep learning is wide and varied.
This section explores six of the deep learning architectures spanning the past 20 years. Notably,
long short-term memory (LSTM) and convolutional neural networks (CNNs) are two of the
oldest approaches in this list but also two of the most used in various applications.
This classifies deep learning architectures into supervised and unsupervised learning and
introduces several popular deep learning architectures: convolutional neural networks, recurrent
neural networks (RNNs), long short-term memory/gated recurrent unit (GRU), self-organizing
map (SOM), autoencoders (AE) and restricted Boltzman machine (RBM). It also gives an
overview of deep belief networks (DBN) and deep stacking networks (DSNs)
Artificial neural network (ANN) is the underlying architecture behind deep learning. Based on
ANN, several variations of the algorithms have been invented. To learn about the fundamentals
of deep learning and artifical neural networks, read the introduction to deep learning article.
The use of deep layers of processing, convolutions, pooling, and a fully connected classification
layer opened the door to various new applications of deep learning neural networks. In addition
to image processing, the CNN has been successfully applied to video recognition and various
tasks within natural language processing.
Example applications: Image recognition, video analysis, and natural language processing
Recent applications of CNNs and LSTMs produced image and video captioning systems in
which an image or video is captioned in natural language. The CNN implements the image or
video processing, and the LSTM is trained to convert the CNN output into natural language.
Example applications: Image and video captioning systems
GRU networks
In 2014, a simplification of the LSTM was introduced called the gated recurrent unit. This model
has two gates, getting rid of the output gate present in the LSTM model. These gates are an
update gate and a reset gate. The update gate indicates how much of the previous cell contents to
maintain. The reset gate defines how to incorporate the new input with the previous cell contents.
A GRU can model a standard RNN simply by setting the reset gate to 1 and the update gate to 0.
The GRU is simpler than the LSTM, can be trained more quickly, and can be more efficient in its
execution. However, the LSTM can be more expressive and with more data can lead to better
results.
Example applications: Natural language text compression, handwriting recognition, speech
recognition, gesture recognition, image captioning
During the training phase, the difference between the input and the output layer is calculated
using an error function, and the weights are adjusted to minimize the error. Unlike traditional
unsupervised learning techniques, where there is no data to compare the outputs against,
autoencoders learn continuosly using backward propagation. For this reason, autoencoders are
classified as self supervised algorithms.
Example applications: Dimensionality reduction, data interpolation, and data
compression/decompression
Restricted Boltzmann Machines
Though RBMs became popular much later, they were originally invented by Paul Smolensky in
1986 and was known as a Harmonium.
An RBM is a 2-layered neural network. The layers are input and hidden layers. As shown in the
following figure, in RBMs every node in a hidden layer is connected to every node in a visible
layer. In a traditional Boltzmann Machine, nodes within the input and hidden layer are also
connected. Due to computational complexity, nodes within a layer are not connected in
a Restricted Boltzmann Machine.
During the training phase, RBMs calculate the probabilty distribution of the training set using a
stochastic approach. When the training begins, each neuron gets activated at random. Also, the
model contains respective hidden and visible bias. While the hidden bias is used in the forward
pass to build the activation, the visible bias helps in reconstructing the input.
Because in an RBM the reconstructed input is always different from the original input, they are
also known as generative models.
Also, because of the built-in randomness, the same predictions result in different outputs. In fact,
this is the most significant difference from an autoencoder, which is a deterministic model.
Example applications: Dimensionality reduction and collaborative filtering
Reinforcement learning:
In reinforcement learning, deep learning works as training agents to take action in an
environment to maximize a reward. Some of the main applications of deep learning in
reinforcement learning include:
Game playing: Deep reinforcement learning models have been able to beat human experts
at games such as Go, Chess, and Atari.
Robotics: Deep reinforcement learning models can be used to train robots to perform
complex tasks such as grasping objects, navigation, and manipulation.
Control systems: Deep reinforcement learning models can be used to control complex
systems such as power grids, traffic management, and supply chain optimization.