0% found this document useful (0 votes)
17 views46 pages

Aetificial Intel

Artificial Intelligence (AI) is a field that combines various human-like abilities such as reasoning, learning, and problem-solving to enable machines to perform complex tasks. It encompasses techniques like natural language processing, expert systems, and neural networks, which allow machines to mimic human intelligence in specific domains. The document also distinguishes between weak AI, which is task-specific, and strong AI, which aims for human-level intelligence across various tasks.
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)
17 views46 pages

Aetificial Intel

Artificial Intelligence (AI) is a field that combines various human-like abilities such as reasoning, learning, and problem-solving to enable machines to perform complex tasks. It encompasses techniques like natural language processing, expert systems, and neural networks, which allow machines to mimic human intelligence in specific domains. The document also distinguishes between weak AI, which is task-specific, and strong AI, which aims for human-level intelligence across various tasks.
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/ 46

BASIC CONCEPT OF ARTIFICIAL INTELLIGENCE

Definition of AI

Artificial Intelligence is an integrated combination of many abilities such as thinking,


reasoning, comprehension, learning, judgment, and inference. Thanks to intelligence, people can
carry out activities such as learning from experience, producing solutions to different and
uncertain problems encountered, and responding to a new situation as soon as possible. These
activities are the core of AI approaches. Artificial intelligence is the whole of techniques that can
produce solutions with similar designs to solve problems and try to imitate humans' intelligence
or other living organisms in the computer environment in this process.

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.

What Contributes to AI?


Artificial intelligence is a science and technology based on disciplines such as Computer
Science, Biology, Psychology, Linguistics, Mathematics, and Engineering. A major thrust of AI
is in the development of computer functions associated with human intelligence, such as
reasoning, learning, and problem solving.
Out of the following areas, one or multiple areas can contribute to build an intelligent system.

Fig 1

Programming Without and With AI


The programming without and with AI is different in following ways −

Programming Without AI Programming With AI

A computer program without AI can answer A computer program with AI can


the specific questions it is meant to solve. answer the generic questions it is
meant to solve.

AI programs can absorb new


modifications by putting highly
Modification in the program leads to change independent pieces of information
in its structure. together. Hence you can modify even a
minute piece of information of
program without affecting its structure.
Modification is not quick and easy. It may
Quick and Easy program modification.
lead to affecting the program adversely.
History of AI
Here is the history of AI during 20th century −

Yea Milestone / Innovation


r

Karel Čapek play named “Rossum's Universal Robots” (RUR) opens in London,
1923
first use of the word "robot" in English.

1943 Foundations for neural networks laid.

1945 Isaac Asimov, a Columbia University alumni, coined the term Robotics.

Alan Turing introduced Turing Test for evaluation of intelligence and


1950 published Computing Machinery and Intelligence. Claude Shannon
published Detailed Analysis of Chess Playing as a search.

John McCarthy coined the term Artificial Intelligence. Demonstration of the


1956
first running AI program at Carnegie Mellon University.

1958 John McCarthy invents LISP programming language for AI.

Danny Bobrow's dissertation at MIT showed that computers can understand


1964
natural language well enough to solve algebra word problems correctly.

Joseph Weizenbaum at MIT built ELIZA, an interactive problem that carries on


1965
a dialogue in English.

Scientists at Stanford Research Institute Developed Shakey, a robot, equipped


1969
with locomotion, perception, and problem solving.

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.

Major advances in all areas of AI −


 Significant demonstrations in machine learning
 Case-based reasoning
 Multi-agent planning
1990
 Scheduling
 Data mining, Web Crawler
 natural language understanding and translation
 Vision, Virtual Reality
 Games

The Deep Blue Chess Program beats the then world chess champion, Garry
1997
Kasparov.

Interactive robot pets become commercially available. MIT displays Kismet, a


2000 robot with a face that expresses emotions. The robot Nomad explores remote
regions of Antarctica and locates meteorites.

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 −

Intelligence Description Example

Linguistic intelligence The ability to speak, Narrators, Orators


recognize, and use
mechanisms of phonology
(speech sounds), syntax
(grammar), and semantics
(meaning).

The ability to create,


communicate with, and Musicians,
Musical intelligence understand meanings made of Singers,
sound, understanding of pitch, Composers
rhythm.

The ability of use and


understand relationships in the
Mathematicians,
Logical-mathematical intelligence absence of action or objects.
Scientists
Understanding complex and
abstract ideas.

The ability to perceive visual


or spatial information, change
Map readers,
it, and re-create visual images
Spatial intelligence Astronauts,
without reference to the
Physicists
objects, construct 3D images,
and to move and rotate them.

The ability to use complete or


part of the body to solve
problems or fashion products,
Bodily-Kinesthetic intelligence Players, Dancers
control over fine and coarse
motor skills, and manipulate
the objects.

The ability to distinguish


Intra-personal intelligence among one’s own feelings, Gautam Buddhha
intentions, and motivations.

The ability to recognize and


Mass
make distinctions among other
Interpersonal intelligence Communicators,
people’s feelings, beliefs, and
Interviewers
intentions.

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 –

Inductive Reasoning Deductive Reasoning

It starts with a general statement


It conducts specific observations to makes broad general and examines the possibilities to
statements. reach a specific, logical
conclusion.

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.

Example − "All women of age


Example − "Nita is a teacher. Nita is studious. Therefore, above 60 years are grandmothers.
All teachers are studious." Shalini is 65 years. Therefore,
Shalini is a grandmother."

 Learning − It is the activity of gaining knowledge or skill by studying, practising, being


taught, or experiencing something. Learning enhances the awareness of the subjects of the
study.
The ability of learning is possessed by humans, some animals, and AI-enabled systems.
Learning is categorized as −
o Auditory Learning − It is learning by listening and hearing. For example,
students listening to recorded audio lectures.
o Episodic Learning − To learn by remembering sequences of events that one has
witnessed or experienced. This is linear and orderly.
o Motor Learning − It is learning by precise movement of muscles. For example,
picking objects, Writing, etc.
o Observational Learning − To learn by watching and imitating others. For
example, child tries to learn by mimicking her parent.
o Perceptual Learning − It is learning to recognize stimuli that one has seen before.
For example, identifying and classifying objects and situations.
o Relational Learning − It involves learning to differentiate among various stimuli
on the basis of relational properties, rather than absolute properties. For Example,
Adding ‘little less’ salt at the time of cooking potatoes that came up salty last time,
when cooked with adding say a tablespoon of salt.
o Spatial Learning − It is learning through visual stimuli such as images, colors,
maps, etc. For Example, A person can create roadmap in mind before actually
following the road.
o Stimulus-Response Learning − It is learning to perform a particular behavior
when a certain stimulus is present. For example, a dog raises its ear on hearing
doorbell.
 Problem Solving − It is the process in which one perceives and tries to arrive at a desired
solution from a present situation by taking some path, which is blocked by known or
unknown hurdles.
Problem solving also includes decision making, which is the process of selecting the best
suitable alternative out of multiple alternatives to reach the desired goal are available.
 Perception − It is the process of acquiring, interpreting, selecting, and organizing sensory
information.
Perception presumes sensing. In humans, perception is aided by sensory organs. In the
domain of AI, perception mechanism puts the data acquired by the sensors together in a
meaningful manner.
 Linguistic Intelligence − It is one’s ability to use, comprehend, speak, and write the
verbal and written language. It is important in interpersonal communication.

Difference between Human and Machine Intelligence


 Humans perceive by patterns whereas the machines perceive by set of rules and data.
 Humans store and recall information by patterns, machines do it by searching algorithms.
For example, the number 40404040 is easy to remember, store, and recall as its pattern is
simple.
 Humans can figure out the complete object even if some part of it is missing or distorted;
whereas the machines cannot do it correctly.

The key elements of AI include:


 Natural language processing (NLP)
 Expert systems
 Robotics
 Intelligent agents
 Computational intelligence

(Fig.3)

Natural Language Processing


NLP is a branch of AI that allows machines to use and understand human language. It is built
into products such as automatic language translators used in multilingual conferences, text-to-
speech translation, speech-to-text translation, and knowledge extraction from text. This
technology is used to scan data in the form of raw language such as handwriting, voice, and
images into contextually relevant structures and relationships that can easily be integrated with
other structured data for more efficient analysis in subsequent processes.
Expert Systems
A ``knowledge engineer'' interviews experts in a certain domain and tries to embody their
knowledge in a computer program for carrying out some task. How well this works depends on
whether the intellectual mechanisms required for the task are within the present state of AI.
When this turned out not to be so, there were many disappointing results. One of the first expert
systems was MYCIN in 1974, which diagnosed bacterial infections of the blood and suggested
treatments. It did better than medical students or practicing doctors, provided its limitations were
observed.
Robotics
Intelligent robots are mechanical structures in various shapes that are programmed to perform
specific tasks based on human instructions. Depending on the environment of use (land, air, and
sea), they are called drones and rovers.
Intelligent Agents
Multi-agent systems (MAS) is a subfield of AI that builds computational systems capable of
making decisions and take actions autonomously. These systems are capable of maintaining
information about their environment and making decisions based on their perception about the
state of the environment, their past experiences, and their objectives. Agents can also interface
with other agents to collaborate on common goals. They emulate human social behavior by
sharing partial views of a problem, enabling collaboration, and cooperating with other agents to
make appropriate and timely decisions to reach desired objectives. Agents have been
implemented successfully, mostly in the manufacturing industries
Computational Intelligence
Computational Intelligence is the computational aspect of AI that focuses on utilizing and
deriving value from data. It uses the knowledge-discovery and data-mining processes to develop
ML workflows to learn from historical data and predict future events. There are several
algorithms designed to build ML models. Examples are artificial neural networks, decision trees,
random forests, support vector machines, extreme learning machines, fuzzy logic types I and II,
adaptive neuron fuzzy inference systems (popularly known as ANFIS), Gaussian-process
regression, Bayesian belief network, and K-nearest neighbor.

Weak AI vs. Strong AI


When discussing artificial intelligence (AI), it is common to distinguish between two broad
categories: weak AI and strong AI. Let's explore the characteristics of each type:
Weak AI (Narrow AI)
Weak AI refers to AI systems that are designed to perform specific tasks and are limited to those
tasks only. These AI systems excel at their designated functions but lack general intelligence.
Examples of weak AI include voice assistants like Siri or Alexa, recommendation algorithms,
and image recognition systems. Weak AI operates within predefined boundaries and cannot
generalize beyond their specialized domain.

Strong AI (General AI)


Strong AI, also known as general AI, refers to AI systems that possess human-level intelligence
or even surpass human intelligence across a wide range of tasks. Strong AI would be capable of
understanding, reasoning, learning, and applying knowledge to solve complex problems in a
manner similar to human cognition. However, the development of strong AI is still largely
theoretical and has not been achieved to date.

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.

2. FeedBack neural networks


Artificial neural networks learn continuously by using corrective feedback loops to improve their
predictive analytics. In simple terms, you can think of the data flowing from the input node to the
output node through many different paths in the neural network. Only one path is the correct one
that maps the input node to the correct output node. To find this path, the neural network uses a
feedback loop, which works as follows:
 Each node makes a guess about the next node in the path.
 It checks if the guess was correct. Nodes assign higher weight values to paths that lead to
more correct guesses and lower weight values to node paths that lead to incorrect
guesses.
 For the next data point, the nodes make a new prediction using the higher weight paths
and then repeat Step 1.

How to train neural networks?


Neural network training is the process of teaching a neural network to perform a task. Neural
networks learn by initially processing several large sets of labeled or unlabeled data. By using
these examples, they can then process unknown inputs more accurately.
Supervised learning
In supervised learning, data scientists give artificial neural networks labeled datasets that provide
the right answer in advance. For example, a deep learning network training in facial recognition
initially processes hundreds of thousands of images of human faces, with various terms related to
ethnic origin, country, or emotion describing each image.
The neural network slowly builds knowledge from these datasets, which provide the right answer
in advance. After the network has been trained, it starts making guesses about the ethnic origin or
emotion of a new image of a human face that it has never processed before.

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

Its Architecture contains four parts :

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.

There are largely three types of fuzzifiers:

 Singleton fuzzifier
 Gaussian fuzzifier
 Trapezoidal or triangular fuzzifier

What is Fuzzy Control?

 It is a technique to embody human-like thinkings into a control system.


 It may not be designed to give accurate reasoning but it is designed to give acceptable
reasoning.
 It can emulate human deductive thinking, that is, the process people use to infer
conclusions from what they know.
 Any uncertainties can be easily dealt with the help of fuzzy logic.

Advantages of Fuzzy Logic System

 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.

Disadvantages of Fuzzy Logic Systems


 Many researchers proposed different ways to solve a given problem through fuzzy logic
which leads to ambiguity. There is no systematic approach to solve a given problem
through fuzzy logic.
 Proof of its characteristics is difficult or impossible in most cases because every time we
do not get a mathematical description of our approach.
 As fuzzy logic works on precise as well as imprecise data so most of the time accuracy is
compromised.

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.

INTRODUCTION OF GENETIC ALGORITHM

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.

Inspired by Darwin’s theory, the Genetic Algorithm is a part of Evolutionary Algorithms,


specifically to generate high-quality solutions to optimization and search problems by relying on
biologically inspired operators such as mutation, crossover, and selection.

Genetic algorithm is majorly used for 2 purposes-

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.

The process terminates under 2 scenarios-

 When maximum number of generations have been created


 Fitness level reached is sufficient.

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).

The process can be broadly divided as following:

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).

2. Defining the fit function:

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-

Roulette Wheel Selection


Rank Selection
Steady State Selection
Tournament Selection
Elitism 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.

 Single point crossover.


 k-point crossover (k ≥ 1)
 Uniform crossover.

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.

These steps are repeated until the termination criteria is met.

 When to apply Genetic Algorithm:


 There are multiple local optima
 The objective function is not smooth (so derivative methods cannot be applied)
 Number of parameters is very large
 Objective function is noisy or stochastic

Advantages of Genetic Algorithm:

 Concept is easy to understand


 Modular, separate from application
 Answer gets better with time
 Inherently parallel; easily distributed
 Genetic algorithms work on the Chromosome, which is an encoded version of potential
solutions’ parameters, rather the parameters themselves.
 Genetic algorithms use fitness score, which is obtained from objective functions, without
other derivative or auxiliary information

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.

Applications are of Artificial Intelligence


Artificial intelligence (AI) has a wide range of applications across various industries and
domains. Here are some notable applications of AI:
 Natural Language Processing (NLP)
AI is used in NLP to analyze and understand human language. It powers applications
such as speech recognition, machine translation, sentiment analysis, and virtual assistants
like Siri and Alexa.
 Image and Video Analysis
AI techniques, including computer vision, enable the analysis and interpretation of
images and videos. This finds application in facial recognition, object detection and
tracking, content moderation, medical imaging, and autonomous vehicles.
 Robotics and Automation
AI plays a crucial role in robotics and automation systems. Robots equipped with AI
algorithms can perform complex tasks in manufacturing, healthcare, logistics, and
exploration. They can adapt to changing environments, learn from experience, and
collaborate with humans.
 Recommendation Systems
AI-powered recommendation systems are used in e-commerce, streaming platforms, and
social media to personalize user experiences. They analyze user preferences, behavior,
and historical data to suggest relevant products, movies, music, or content.
 Financial Services
AI is extensively used in the finance industry for fraud detection, algorithmic trading,
credit scoring, and risk assessment. Machine learning models can analyze vast amounts
of financial data to identify patterns and make predictions.
 Healthcare
AI applications in healthcare include disease diagnosis, medical imaging analysis, drug
discovery, personalized medicine, and patient monitoring. AI can assist in identifying
patterns in medical data and provide insights for better diagnosis and treatment.
 Virtual Assistants and Chatbots
AI-powered virtual assistants and chatbots interact with users, understand their queries,
and provide relevant information or perform tasks. They are used in customer support,
information retrieval, and personalized assistance.
 Gaming
AI algorithms are employed in gaming for creating realistic virtual characters, opponent
behavior, and intelligent decision-making. AI is also used to optimize game graphics,
physics simulations, and game testing.
 Smart Homes and IoT
AI enables the development of smart home systems that can automate tasks, control
devices, and learn from user preferences. AI can enhance the functionality and efficiency
of Internet of Things (IoT) devices and networks.
 Cyber security
AI helps in detecting and preventing cyber threats by analyzing network traffic,
identifying anomalies, and predicting potential attacks. It can enhance the security of
systems and data through advanced threat detection and response mechanisms.

Artificial Intelligence Examples


Artificial Intelligence (AI) has become an integral part of our daily lives, revolutionizing various
industries and enhancing user experiences. Here are some notable examples of AI applications:
ChatGPT
ChatGPT is an advanced language model developed by OpenAI, capable of generating human-
like responses and engaging in natural language conversations. It uses deep learning techniques
to understand and generate coherent text, making it useful for customer support, chatbots, and
virtual assistants.
Google Maps
Google Maps utilizes AI algorithms to provide real-time navigation, traffic updates, and
personalized recommendations. It analyzes vast amounts of data, including historical traffic
patterns and user input, to suggest the fastest routes, estimate arrival times, and even predict
traffic congestion.
Smart Assistants
Smart assistants like Amazon's Alexa, Apple's Siri, and Google Assistant employ AI
technologies to interpret voice commands, answer questions, and perform tasks. These assistants
use natural language processing and machine learning algorithms to understand user intent,
retrieve relevant information, and carry out requested actions.
Snapchat Filters
Snapchat's augmented reality filters, or "Lenses," incorporate AI to recognize facial features,
track movements, and overlay interactive effects on users' faces in real-time. AI algorithms
enable Snapchat to apply various filters, masks, and animations that align with the user's facial
expressions and movements.
Self-Driving Cars
Self-driving cars rely heavily on AI for perception, decision-making, and control. Using a
combination of sensors, cameras, and machine learning algorithms, these vehicles can detect
objects, interpret traffic signs, and navigate complex road conditions autonomously, enhancing
safety and efficiency on the roads.
Wearables
Wearable devices, such as fitness trackers and smartwatches, utilize AI to monitor and analyze
users' health data. They track activities, heart rate, sleep patterns, and more, providing
personalized insights and recommendations to improve overall well-being.
MuZero
MuZero is an AI algorithm developed by DeepMind that combines reinforcement learning and
deep neural networks. It has achieved remarkable success in playing complex board games like
chess, Go, and shogi at a superhuman level. MuZero learns and improves its strategies through
self-play and planning.
These examples demonstrate the wide-ranging applications of AI, showcasing its potential to
enhance our lives, improve efficiency, and drive innovation across various industries.
Brain

The brain is composed of the cerebrum, cerebellum, and brainstem.

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.

Right brain – left brain

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.

Lobes of the brain


The cerebral hemispheres have distinct fissures, which divide the brain into lobes. Each
hemisphere has 4 lobes: frontal, temporal, parietal, and occipital (Fig. 3). Each lobe may be
divided, once again, into areas that serve very specific functions. It’s important to understand
that each lobe of the brain does not function alone. There are very complex relationships between
the lobes of the brain and between the right and left hemispheres.

The cerebrum is divided into four lobes: frontal, parietal, occipital and temporal.

Frontal lobe

 Personality, behavior, emotions


 Judgment, planning, problem solving
 Speech: speaking and writing (Broca’s area)
 Body movement (motor strip)
 Intelligence, concentration, self awareness

Parietal lobe

 Interprets language, words


 Sense of touch, pain, temperature (sensory strip)
 Interprets signals from vision, hearing, motor, sensory and memory
 Spatial and visual perception

Occipital lobe

 Interprets vision (color, light, movement)

Temporal lobe

 Understanding language (Wernicke’s area)


 Memory
 Hearing
 Sequencing and organization

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.

Nervous System development across the human lifespan

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

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.

What is the relationship between a formal language and AI?

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.

What are the benefits of using a formal language in AI?

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.

How can formal language be used to represent knowledge in AI?

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.

DECISION TREES, THE ID3ALGORITHM AND STATISTICIAL LEARNING

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.

What are Decision Trees?

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).

Decision tree Example

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.

What's the difference between machine learning, AI, and NLP?

AI = building systems that can do intelligent things

NLP = building systems that can understand language AI

ML = building systems that can learn from experience AI

NLP ML = building systems that can learn how to understand language

NLP pursues a set of problems within AI.

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.

It can be divided into five main types:


o Breadth-first search
o Uniform cost search
o Depth-first search
o Iterative deepening depth-first search
o Bidirectional Search

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.

The Structure of Intelligent Agents


Agent’s structure can be viewed as:
 Agent = Architecture + Agent Program
 Architecture = the machinery that an agent executes on.
 Agent Program = an implementation of an agent function.
Simple Reflex Agents
 They choose actions only based on the current percept.
 They are rational only if a correct decision is made only on the basis of current precept.
 Their environment is completely observable.

Condition-Action Rule − It is a rule that maps a state (condition) to an action.


Model Based Reflex Agents
They use a model of the world to choose their actions. They maintain an internal state.
Model − knowledge about “how the things happen in the world”.
Internal State − It is a representation of unobserved aspects of current state depending on
percept history.
Updating the state requires the information about −
 How the world evolves.
 How the agent’s actions affect the world.

Goal Based Agents


They choose their actions in order to achieve goals. Goal-based approach is more flexible than
reflex agent since the knowledge supporting a decision is explicitly modeled, thereby allowing
for modifications.
Goal − It is the description of desirable situations.
Utility Based Agents
They choose actions based on a preference (utility) for each state.
Goals are inadequate when −
 There are conflicting goals, out of which only few can be achieved.
 Goals have some uncertainty of being achieved and you need to weigh likelihood of
success against the importance of a goal.

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

Rationality of an agent depends on the following −


 The performance measures, which determine the degree of success.
 Agent’s Percept Sequence till now.
 The agent’s prior knowledge about the environment.
 The actions that the agent can carry out.
A rational agent always performs right action, where the right action means the action that causes
the agent to be most successful in the given percept sequence. The problem the agent solves is
characterized by Performance Measure, Environment, Actuators, and Sensors (PEAS).
AGENT ENVIRONMENT
Characteristics of Agent Environment
The environment has multifold characteristics:
 Discrete / Continuous − If there are a limited number of distinct, clearly defined, states of
the environment, the environment is discrete (For example, chess); otherwise it is
continuous (For example, driving).
 Observable / Partially Observable − If it is possible to determine the complete state of
the environment at each time point from the percepts it is observable; otherwise it is only
partially observable.
 Static / Dynamic − If the environment does not change while an agent is acting, then it is
static; otherwise it is dynamic.
 Single agent / Multiple agents − The environment may contain other agents which may
be of the same or different kind as that of the agent.
 Accessible / Inaccessible − If the agent’s sensory apparatus can have access to the
complete state of the environment, then the environment is accessible to that agent.
 Deterministic / Non-deterministic − If the next state of the environment is completely
determined by the current state and the actions of the agent, then the environment is
deterministic; otherwise it is non-deterministic.
 Episodic / Non-episodic − In an episodic environment, each episode consists of the agent
perceiving and then acting. The quality of its action depends just on the episode itself.
Subsequent episodes do not depend on the actions in the previous episodes. Episodic
environments are much simpler because the agent does not need to think ahead.
DEEP LEARNING
What is deep learning?
Deep learning is a type of machine learning and artificial intelligence (AI) that imitates the way
humans gain certain types of knowledge. Deep learning models can be taught to perform
classification tasks and recognize patterns in photos, text, audio and other various data. It is also
used to automate tasks that would normally need human intelligence, such as describing images
or transcribing audio files.
Deep learning is an important element of data science, including statistics and predictive
modeling. It is extremely beneficial to data scientists who are tasked with collecting, analyzing
and interpreting large amounts of data; deep learning makes this process faster and easier.
Where human brains have millions of interconnected neurons that work together to learn
information, deep learning features neural networks constructed from multiple layers of software
nodes that work together. Deep learning models are trained using a large set of labeled data and
neural network architectures.
Deep learning enables a computer to learn by example. To understand deep learning, imagine a
toddler whose first word is dog. The toddler learns what a dog is -- and is not -- by pointing to
objects and saying the word dog. The parent says, "Yes, that is a dog," or, "No, that is not a dog."
As the toddler continues to point to objects, he becomes more aware of the features that all dogs
possess. What the toddler is doing, without knowing it, is clarifying a complex abstraction: the
concept of dog. They are doing this by building a hierarchy in which each level of abstraction is
created with knowledge that was gained from the preceding layer of the hierarchy.
Challenges in Deep Learning
Deep learning has made significant advancements in various fields, but there are still some
challenges that need to be addressed. Here are some of the main challenges in deep learning:
1. Data availability: It requires large amounts of data to learn from. For using deep learning it’s
a big concern to gather as much data for training.
2. Computational Resources: For training the deep learning model, it is computationally
expensive because it requires specialized hardware like GPUs and TPUs.
3. Time-consuming: While working on sequential data depending on the computational resource
it can take very large even in days or months.
4. Interpretability: Deep learning models are complex, it works like a black box. it is very
difficult to interpret the result.
5. Overfitting: when the model is trained again and again, it becomes too specialized for the
training data, leading to overfitting and poor performance on new data.

Advantages of Deep Learning:

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.

Disadvantages of Deep Learning:

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.

Supervised deep learning


Supervised learning refers to the problem space wherein the target to be predicted is clearly
labelled within the data that is used for training.
In this section, we introduce at a high-level two of the most popular supervised deep learning
architectures - convolutional neural networks and recurrent neural networks as well as some of
their variants.
Convolutional neural networks
A CNN is a multilayer neural network that was biologically inspired by the animal visual cortex.
The architecture is particularly useful in image-processing applications. The first CNN was
created by Yann LeCun; at the time, the architecture focused on handwritten character
recognition, such as postal code interpretation. As a deep network, early layers recognize
features (such as edges), and later layers recombine these features into higher-level attributes of
the input.
The LeNet CNN architecture is made up of several layers that implement feature extraction and
then classification (see the following image). The image is divided into receptive fields that feed
into a convolutional layer, which then extracts features from the input image. The next step is
pooling, which reduces the dimensionality of the extracted features (through down-sampling)
while retaining the most important information (typically, through max pooling). Another
convolution and pooling step is then performed that feeds into a fully connected multilayer
perceptron. The final output layer of this network is a set of nodes that identify features of the
image (in this case, a node per identified number). You train the network by using back-
propagation.

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

Recurrent neural networks


The RNN is one of the foundational network architectures from which other deep learning
architectures are built. The primary difference between a typical multilayer network and a
recurrent network is that rather than completely feed-forward connections, a recurrent network
might have connections that feed back into prior layers (or into the same layer). This feedback
allows RNNs to maintain memory of past inputs and model problems in time.
RNNs consist of a rich set of architectures (we'll look at one popular topology called LSTM
next). The key differentiator is feedback within the network, which could manifest itself from a
hidden layer, the output layer, or some combination thereof.
RNNs can be unfolded in time and trained with standard back-propagation or by using a variant
of back-propagation that is called back-propagation in time (BPTT).
Example applications: Speech recognition and handwriting recognition
LSTM networks
The LSTM was created in 1997 by Hochreiter and Schimdhuber, but it has grown in popularity
in recent years as an RNN architecture for various applications. You'll find LSTMs in products
that you use every day, such as smartphones. IBM applied LSTMs in IBM Watson® for
milestone-setting conversational speech recognition.
The LSTM departed from typical neuron-based neural network architectures and instead
introduced the concept of a memory cell. The memory cell can retain its value for a short or long
time as a function of its inputs, which allows the cell to remember what's important and not just
its last computed value.
The LSTM memory cell contains three gates that control how information flows into or out of
the cell. The input gate controls when new information can flow into the memory. The forget
gate controls when an existing piece of information is forgotten, allowing the cell to remember
new data. Finally, the output gate controls when the information that is contained in the cell is
used in the output from the cell. The cell also contains weights, which control each gate. The
training algorithm, commonly BPTT, optimizes these weights based on the resulting network
output error.

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

Unsupervised deep learning


Unsupervised learning refers to the problem space wherein there is no target label within the data
that is used for training.
This section discusses three unsupervised deep learning architectures: self-organized maps,
autoencoders, and restricted boltzmann machines. We also discuss how deep belief networks and
deep stacking networks are built based on the underlying unsupervised architecture.
Self-organized maps
Self-organized map (SOM) was invented by Dr. Teuvo Kohonen in 1982 and was popularly
known as the Kohonen map. SOM is an unsupervised neural network that creates clusters of the
input data set by reducing the dimensionality of the input. SOMs vary from the traditional
artificial neural network in quite a few ways.
The first significant variation is that weights serve as a characteristic of the node. After the inputs
are normalized, a random input is first chosen. Random weights close to zero are initialized to
each feature of the input record. These weights now represent the input node. Several
combinations of these random weights represent variations of the input node. The euclidean
distance between each of these output nodes with the input node is calculated. The node with the
least distance is declared as the most accurate representation of the input and is marked as
the best matching unit or BMU. With these BMUs as center points, other units are similarly
calculated and assigned to the cluster that it is the distance from. Radius of points around BMU
weights are updated based on proximity. Radius is shrunk.
Next, in an SOM, no activation function is applied, and because there are no target labels to
compare against there is no concept of calculating error and back propogation.
Example applications: Dimensionality reduction, clustering high-dimensional inputs to 2-
dimensional output, radiant grade result, and cluster visualization
Autoencoders
Though the history of when autoencoders were invented is hazy, the first known usage of
autoencoders was found to be by LeCun in 1987. This variant of an ANN is composed of 3
layers: input, hidden, and output layers.
First, the input layer is encoded into the hidden layer using an appropriate encoding function.
The number of nodes in the hidden layer is much less than the number of nodes in the input
layer. This hidden layer contains the compressed representation of the original input. The output
layer aims to reconstruct the input layer by using a decoder function.

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

Deep belief networks


The DBN is a typical network architecture, but includes a novel training algorithm. The DBN is
a multilayer network (typically deep and including many hidden layers) in which each pair of
connected layers is an RBM. In this way, a DBN is represented as a stack of RBMs.
In the DBN, the input layer represents the raw sensory inputs, and each hidden layer learns
abstract representations of this input. The output layer, which is treated somewhat differently
than the other layers, implements the network classification. Training occurs in two steps:
unsupervised pretraining and supervised fine-tuning.
In unsupervised pretraining, each RBM is trained to reconstruct its input (for example, the first
RBM reconstructs the input layer to the first hidden layer). The next RBM is trained similarly,
but the first hidden layer is treated as the input (or visible) layer, and the RBM is trained by using
the outputs of the first hidden layer as the inputs. This process continues until each layer is
pretrained. When the pretraining is complete, fine-tuning begins. In this phase, the output nodes
are applied labels to give them meaning (what they represent in the context of the network). Full
network training is then applied by using either gradient descent learning or back-propagation to
complete the training process.
Example applications: Image recognition, information retrieval, natural language
understanding, and failure prediction

Deep stacking networks


The final architecture is the DSN, also called a deep convex network. A DSN is different from
traditional deep learning frameworks in that although it consists of a deep network, it's actually a
deep set of individual networks, each with its own hidden layers. This architecture is a response
to one of the problems with deep learning, the complexity of training. Each layer in a deep
learning architecture exponentially increases the complexity of training, so the DSN views
training not as a single problem but as a set of individual training problems.
The DSN consists of a set of modules, each of which is a subnetwork in the overall hierarchy of
the DSN. In one instance of this architecture, three modules are created for the DSN. Each
module consists of an input layer, a single hidden layer, and an output layer. Modules are stacked
one on top of another, where the inputs of a module consist of the prior layer outputs and the
original input vector. This layering allows the overall network to learn more complex
classification than would be possible given a single module.
The DSN permits training of individual modules in isolation, making it efficient given the ability
to train in parallel. Supervised training is implemented as back-propagation for each module
rather than back-propagation over the entire network. For many problems, DSNs can perform
better than typical DBNs, making them a popular and efficient network architecture.
Example applications: Information retrieval and continuous speech recognition

Applications of Deep Learning


The main applications of deep learning can be divided into computer vision, natural language
processing (NLP), and reinforcement learning.
Computer vision
In computer vision, Deep learning models can enable machines to identify and understand
visual data. Some of the main applications of deep learning in computer vision include:
 Object detection and recognition: Deep learning model can be used to identify and locate
objects within images and videos, making it possible for machines to perform tasks such as
self-driving cars, surveillance, and robotics.
 Image classification: Deep learning models can be used to classify images into categories
such as animals, plants, and buildings. This is used in applications such as medical imaging,
quality control, and image retrieval.
 Image segmentation: Deep learning models can be used for image segmentation into
different regions, making it possible to identify specific features within images.

Natural language processing (NLP) :


In NLP, the Deep learning model can enable machines to understand and generate human
language. Some of the main applications of deep learning in NLP include:
 Automatic Text Generation – Deep learning model can learn the corpus of text and new
text like summaries, essays can be automatically generated using these trained models.
 Language translation: Deep learning models can translate text from one language to
another, making it possible to communicate with people from different linguistic
backgrounds.
 Sentiment analysis: Deep learning models can analyze the sentiment of a piece of text,
making it possible to determine whether the text is positive, negative, or neutral. This is
used in applications such as customer service, social media monitoring, and political
analysis.
 Speech recognition: Deep learning models can recognize and transcribe spoken words,
making it possible to perform tasks such as speech-to-text conversion, voice search, and
voice-controlled devices.

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.

(Kandel, Schwartz & Jessell, 2000)

You might also like