Professional Documents
Culture Documents
Unit No. 01 - Introduction To AI & ML
Unit No. 01 - Introduction To AI & ML
01
Introduction to AI & ML
science is Artificial Intelligence which is ready to create a new revolution in the world by
making intelligent machines. The Artificial Intelligence is now all around us. It is currently
working with a variety of subfields, ranging from general to specific, such as self-driving
cars, playing chess, proving theorems, playing music, Painting, etc.
AI is one of the fascinating and universal fields of Computer science which has a
great scope in future. AI holds a tendency to cause a machine to work as a human.
make decisions."
Mechanical men in Ancient Greek and Egyptian Myths. Following are some milestones in
the history of AI which defines the journey from the AI generation to till date development.
o Year 1943: The first work which is now recognized as AI was done by Warren
McCulloch and Walter pits in 1943. They proposed a model of artificial neurons.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
o Year 1949: Donald Hebb demonstrated an updating rule for modifying the
connection strength between neurons. His rule is now called Hebbian learning.
o Year 1950: The Alan Turing who was an English mathematician and pioneered
Machine learning in 1950. Alan Turing publishes "Computing Machinery and
Intelligence" in which he proposed a test. The test can check the machine's ability
to exhibit intelligent behavior equivalent to human intelligence, called a Turing
test.
o Year 1955: An Allen Newell and Herbert A. Simon created the "first artificial
intelligence program "Which was named as "Logic Theorist". This program had
proved 38 of 52 Mathematics theorems, and find new and more elegant proofs for
some theorems.
o Year 1956: The word "Artificial Intelligence" first adopted by American Computer
scientist John McCarthy at the Dartmouth Conference. For the first time, AI coined
as an academic field.
At that time high-level computer languages such as FORTRAN, LISP, or COBOL were
invented. And the enthusiasm for AI was very high at that time.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
o Year 1966: The researchers emphasized developing algorithms which can solve
mathematical problems. Joseph Weizenbaum created the first chatbot in 1966,
which was named as ELIZA.
o Year 1972: The first intelligent humanoid robot was built in Japan which was
named as WABOT-1.
o The duration between years 1974 to 1980 was the first AI winter duration. AI winter
refers to the time period where computer scientist dealt with a severe shortage of
funding from government for AI researches.
o During AI winters, an interest of publicity on artificial intelligence was decreased.
A boom of AI (1980-1987)
o Year 1980: After AI winter duration, AI came back with "Expert System". Expert
systems were programmed that emulate the decision-making ability of a human
expert.
o In the Year 1980, the first national conference of the American Association of
Artificial Intelligence was held at Stanford University.
o The duration between the years 1987 to 1993 was the second AI Winter duration.
o Again Investors and government stopped in funding for AI research as due to high
cost but not efficient result. The expert system such as XCON was very cost
effective.
o Year 1997: In the year 1997, IBM Deep Blue beats world chess champion, Gary
Kasparov, and became the first computer to beat a world chess champion.
o Year 2002: for the first time, AI entered the home in the form of Roomba, a vacuum
cleaner.
o Year 2006: AI came in the Business world till the year 2006. Companies like
Facebook, Twitter, and Netflix also started using AI.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Need of Artificial Intelligence: -
Before Learning about Artificial Intelligence, we should know that what is the importance
of AI and why should we learn it. Following are some main reasons to learn about AI:
o With the help of AI, you can create such software or devices which can solve real-
world problems very easily and with accuracy such as health issues, marketing,
traffic issues, etc.
o With the help of AI, you can create your personal virtual Assistant, such as Cortana,
Google Assistant, Siri, etc.
o With the help of AI, you can build such Robots which can work in an environment
where survival of humans can be at risk.
o AI opens a path for other new technologies, new devices, and new Opportunities.
o High Accuracy with less errors: AI machines or systems are prone to less errors
and high accuracy as it takes decisions as per pre-experience or information.
o High-Speed: AI systems can be of very high-speed and fast-decision making,
because of that AI systems can beat a chess champion in the Chess game.
o High reliability: AI machines are highly reliable and can perform the same action
multiple times with high accuracy.
o Useful for risky areas: AI machines can be helpful in situations such as defusing a
bomb, exploring the ocean floor, where to employ a human can be risky.
o Digital Assistant: AI can be very useful to provide digital assistant to the users
such as AI technology is currently used by various E-commerce websites to show
the products as per customer requirement.
o Useful as a public utility: AI can be very useful for public utilities such as a self-
driving car which can make our journey safer and hassle-free, facial recognition for
security purpose, Natural language processing to communicate with the human in
human-language, etc.
2. Goals Identifying the patterns that are Automation of the process and
concealed in the data is the main the granting of autonomy to
objective of data science. the data model are the main
goals of artificial intelligence.
3. Types of Data Science will have a variety of AI uses standardized data in the
data different types of data, including form of vectors and
structured, semi-structured, and embeddings.
unstructured type of data.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Sr.
Parameters Data science Artificial Intelligence
No.
5. Tools used The tools utilized in Data Science The tools used in AI are less
are far more extensive than those extensive compared to Data
used in AI. This is due to the fact Science.
that Data Science entails a
number of procedures for
analyzing data and developing
insights from it.
10. Examples of R, Python, etc. are the tools used Tensor flow, sci-kit-learn, Kaffee
Tools in data science. etc. are the tools used in AI.
11. Models Models are built in Data Science Models are created in Artificial
to generate statistical insights for Intelligence that is believed to
decision-making. be analogous to human
understanding and cognition.
12. Data Science looks for patterns in AIs look to intelligence reports
data to make decisions. to make decisions.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Sr.
Parameters Data science Artificial Intelligence
No.
Manufacturing
Many processes in the manufacturing industry require Mechanical Engineering to
be done with components, products, processes, etc. Artificial Intelligence is currently used
in similar processes of Mechanical Engineering. Whether in Components, Products, or
Processes. It is making sure about its presence being felt. There are many other processes
and technologies which are becoming easy fast and efficient with the help of Artificial
Intelligence. Machine’s which can do more work than human tendency and that too with
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
least effort of humans into it is the main goal here. When the above objective is achieved
or worked upon, it will send serious implications to different areas of the sector.
That’s what AI is impacting in the current era for the manufacturing industry.
People of the sector are also scared off them losing the jobs.
Mechanical Design
Whenever we start the process of building a component/product/flow, the first
step of it would be of Mechanical Design. Different sectors of services are provided
through mechanical Design. To list the few as; Product Design, Machine Design,
Mechanical Component Design, Tooling and Fixture Development, Mold Design, Casting
Design. All are coming under the umbrella for Mechanical Design Services. A.I can majorly
impact Product Design Services when it comes to designing the concept, examining the
product, and also during the manufacturing of the product.
Coming back to the discussion of AI’s impact, Artificial Intelligence has a significant
role in the increasing trend of Machine Learning. A.I has its comfort zone when it comes
to relying on Huge Data and Large Algorithmic learnings. Machine learning, as discussed
earlier, is dependent mostly on the constant generation of data and its analysis. A. I learn
through those large sets of data and various commands that engineers might have to
give in the first place.
There are a few other ways where Artificial Intelligence does help during the process
of Mechanical Engineering. Such as,
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Structure Generation: While Generating a Structure, AI can help through its
algorithms and data storage. It is making the process efficient and transparent.
Artificial Intelligence can be divided in various types, there are mainly two types
of main categorization which are based on capabilities and based on functionally of AI.
Following is flow diagram which explain the types of AI.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
o IBM's Watson supercomputer also comes under Narrow AI, as it uses an Expert
system approach combined with Machine learning and natural language
processing.
o Some Examples of Narrow AI are playing chess, purchasing suggestions on e-
commerce site, self-driving cars, speech recognition, and image recognition.
2. General AI:
o General AI is a type of intelligence which could perform any intellectual task with
efficiency like a human.
o The idea behind the general AI to make such a system which could be smarter and
think like a human by its own.
o Currently, there is no such system exist which could come under general AI and
can perform any task as perfect as a human.
o The worldwide researchers are now focused on developing machines with General
AI.
o As systems with general AI are still under research, and it will take lots of efforts
and time to develop such systems.
3. Super AI:
o Super AI is a level of Intelligence of Systems at which machines could surpass
human intelligence, and can perform any task better than human with cognitive
properties. It is an outcome of general AI.
o Some key characteristics of strong AI include capability include the ability to think,
to reason, solve the puzzle, make judgments, plan, learn, and communicate by its
own.
o Super AI is still a hypothetical concept of Artificial Intelligence. Development of
such systems in real is still world changing task.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Artificial Intelligence type-2: Based on functionality
1. Reactive Machines
o Purely reactive machines are the most basic types of Artificial Intelligence.
o Such AI systems do not store memories or past experiences for future actions.
o These machines only focus on current scenarios and react on it as per possible best action.
o IBM's Deep Blue system is an example of reactive machines.
o Google's AlphaGo is also an example of reactive machines.
2. Limited Memory
o Limited memory machines can store past experiences or some data for a short period of
time.
o These machines can use stored data for a limited time period only.
o Self-driving cars are one of the best examples of Limited Memory systems. These cars can
store recent speed of nearby cars, the distance of other cars, speed limit, and other
information to navigate the road.
3. Theory of Mind
o Theory of Mind AI should understand the human emotions, people, beliefs, and be able
to interact socially like humans.
o This type of AI machines are still not developed, but researchers are making lots of efforts
and improvement for developing such AI machines.
4. Self-Awareness
o Self-awareness AI is the future of Artificial Intelligence. These machines will be super
intelligent, and will have their own consciousness, sentiments, and self-awareness.
o These machines will be smarter than human mind.
o Self-Awareness AI does not exist in reality still and it is a hypothetical concept.
Applications of AI: -
AI has been dominant in various fields such as −
Gaming − AI plays crucial role in strategic games such as chess, poker, tic-tac-toe,
etc., where machine can think of large number of possible positions based on
heuristic knowledge.
Natural Language Processing − It is possible to interact with the computer that
understands natural language spoken by humans.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Expert Systems − There are some applications which integrate machine, software,
and special information to impart reasoning and advising. They provide
explanation and advice to the users.
Vision Systems − These systems understand, interpret, and comprehend visual
input on the computer. For example,
o A spying aero plane takes photographs, which are used to figure out spatial
information or map of the areas.
o Doctors use clinical expert system to diagnose the patient.
o Police use computer software that can recognize the face of criminal with the
stored portrait made by forensic artist.
Speech Recognition − Some intelligent systems are capable of hearing and
comprehending the language in terms of sentences and their meanings while a
human talks to it. It can handle different accents, slang words, noise in the
background, change in human’s noise due to cold, etc.
Handwriting Recognition − The handwriting recognition software reads the text
written on paper by a pen or on screen by a stylus. It can recognize the shapes of
the letters and convert it into editable text.
Intelligent Robots − Robots are able to perform the tasks given by a human. They
have sensors to detect physical data from the real world such as light, heat,
temperature, movement, sound, bump, and pressure. They have efficient
processors, multiple sensors and huge memory, to exhibit intelligence. In addition,
they are capable of learning from their mistakes and they can adapt to the new
environment.
What are the basics of AI: -
The intelligence is intangible. It is composed of −
Reasoning
Learning
Problem Solving
Perception
Linguistic Intelligence
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
1. 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 If something is true of a class of things in
statement, inductive reasoning allows general, it is also true for all members of
for the conclusion to be false. that class.
3. 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.
4. 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.
5. Linguistic Intelligence − It is one’s ability to use, comprehend, speak, and write the
verbal and written language. It is important in interpersonal communication.
6. Motion and Manipulation –
o Al is heavily used in robotics.
o Localization is how a robot knows its location and map its environment. When
given a small, static, and visible environment, this is easy; however, dynamic
environments, such as (in endoscopy) the interior of a patient's breathing body,
pose a greater challenge.
o Motion planning is the process of breaking down a movement task into
"primitives" such as individual joint movements.
o Such movement often involves compliant motion, a process where movement
requires maintaining physical contact with an object.
o Robots can learn from experience how to move efficiently despite the presence
of friction and gear slippage.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Machine Learning is the subset of AI that uses computer algorithms to analyze data
and make intelligent decisions based on what it has learned, without being explicitly
programmed.
Machine learning is a growing technology which enables computers to learn
automatically from past data. Machine learning uses various algorithms for building
mathematical models and making predictions using historical data or information.
Currently, it is being used for various tasks such as image recognition, speech
recognition, email filtering, Facebook auto-tagging, recommender system, and many
more.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
predicted output depends upon the amount of data, as the huge amount of data helps to
build a better model which predicts the output more accurately.
Suppose we have a complex problem, where we need to perform some predictions,
so instead of writing a code for it, we just need to feed the data to generic algorithms, and
with the help of these algorithms, machine builds the logic as per the data and predict the
output. Machine learning has changed our way of thinking about the problem. The below
block diagram explains the working of Machine Learning algorithm:
Approaches to AI: -
The following four main approaches of AI:
1. Cybernetics and brain-simulation.
2. Symbolic
3. Sub-symbolic
4. Statistical
Brain Simulation
2. Symbolic: -
o When access to digital computers became possible in the middle 1950s, AI
research began to explore the possibility that human intelligence could be reduced
to symbol manipulation.
o The research was centered in three institutions: Carnegie Mellon University,
Stanford and MIT, and each one developed its own style of research. John
Haugeland named these approaches to AI “good old-fashioned AI” or “GOFAI”.
o During the 1960s, symbolic approaches had achieved great success at simulating
high-level thinking in small demonstration programs.
o Approaches based on cybernetics or neural networks were abandoned or pushed
into the background.
o Researchers in the 1960s and the 1970s were convinced that symbolic approaches
would eventually succeed in creating a machine with artificial general intelligence
and considered this the goal of their field.
o Symbolic approach to knowledge representation and processing uses names to
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
explicitly define the meaning of represented knowledge.
o Symbolic approach, introduced by Newell & Simon in 1976 describes AI as the
development of models using symbolic manipulation.
o In AI applications, computers process symbols rather than numbers or letters. In
the Symbolic approach, AI applications process strings of characters that represent
real-world entities or concepts.
o Symbols can be arranged in structures such as lists, hierarchies, or networks and
these structures show how symbols relate to each other.
o a Symbolic approach offer good performances in reasoning, is able to give
explanations and can manipulate complex data structures, but it has generally
serious difficulties in anchoring their symbols in the perceptive world.
o Symbolic AI is a sub-field of artificial intelligence that focuses on the high- level
symbolic (human-readable) representation of problems, logic, and search.
o Between the 50s and the 80s, symbolic AI was the dominant AI paradigm. For
instance, if you ask yourself, with the Symbolic AI paradigm in mind, “What is an
apple?”, the answer will be that an apple is “a fruit,” “has red, yellow, or green color,”
or “has a roundish shape.” These descriptions are symbolic because we utilize
symbols (color, shape, kind) to describe an apple.
3. Sub-Symbolic: -
o Sub-symbolic artificial intelligence is the set of alternative approaches which do
not use explicit high-level symbols, such as mathematical optimization, statistical
classifiers and neural networks. Symbolic AI was the dominant paradigm of AI
research from the mid-1950s until the middle 1990s.
o “Sub-symbolic'' if it is made by constituent entities that are not representations in
their turn, e.g., pixels, sound images as perceived by the ear, signal samples; sub-
symbolic units in neural networks can be considered particular cases of this
category.
o AI models are often used to make predictions, and these models can be explicitly
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
represented -as in symbolic AI paradigm- or implicitly represented. Implicit
representation is derived from the learning from experience with no symbolic
representation of rules and properties.
o The main assumption of the sub-symbolic paradigm is that the ability to extract a
good model with limited experience makes a model successful. Here, instead of
clearly defined human-readable relations, we design less explainable mathematical
equations to solve problems.
o Neural networks, ensemble models, regression models, decision trees, support
vector machines are some of the most popular Sub-symbolic AI models that you
can easily come across, especially if you are developing ML models.
o Starting from the 80s, the Sub-symbolic AI paradigm has taken over Symbolic AI’s
position as the leading sub-field under Artificial Intelligence due to its high
accuracy performance and flexibility.
4. Statistical: -
o The statistical approach involves defining phenomena in terms of numbers and
then using the numbers to either imply or deduce cause and effect. Statistics are
a key research tool for quantitative researchers.
o It's a process where the AI system gather, organize, analyze and interpret
numerical information from data. More and more industries are applying AL to
process improvement in the design and manufacture of their products.
o Some consider statistics to be a distinct mathematical science rather than a
branch of mathematics. While many scientific investigations make use of data,
statistics is concerned with the use of data in the context of uncertainty and
decision making in the face of uncertainty.
o In the 1990s, AI researchers developed sophisticated mathematical tools to solve
specific subproblems.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
o These tools are truly scientific, in the sense that their results are both measurable
and verifiable, and they have been responsible for many of AI’s recent successes.
o The shared mathematical language has also permitted a high level of
collaboration with more established fields (like mathematics, economics or
operations research).
o Stuart Russell and Peter Norvig describe this movement as nothing less than a
“revolution” and “the victory of the neats.”
o Critics argue that these techniques are too focused on particular problems and
have failed to address the long-term goal of general intelligence.
Approaches to ML: -
Machine Learning can be approached by following types:
1. Supervised Learning
2. Unsupervised Learning
3. Reinforcement Learning
1. Supervised Learning: -
o Supervised learning is the types of machine learning in which machines are trained
using well "labelled" training data, and on basis of that data, machines predict the
output. The labelled data means some input data is already tagged with the correct
output.
o In supervised learning, the training data provided to the machines work as the
supervisor that teaches the machines to predict the output correctly. It applies the
same concept as a student learns in the supervision of the teacher.
o Supervised learning is a process of providing input data as well as correct output
data to the machine learning model. The aim of a supervised learning algorithm is
to find a mapping function to map the input variable(x) with the output
variable(y).
o In the real-world, supervised learning can be used for Risk Assessment, Image
classification, Fraud Detection, spam filtering, etc.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Suppose we have a dataset of different types of shapes which includes square,
rectangle, triangle, and Polygon. Now the first step is that we need to train the model
for each shape.
o If the given shape has four sides, and all the sides are equal, then it will be labelled
as a Square.
o If the given shape has three sides, then it will be labelled as a triangle.
o If the given shape has six equal sides, then it will be labelled as hexagon.
Now, after training, we test our model using the test set, and the task of the model is
to identify the shape.
The machine is already trained on all types of shapes, and when it finds a new shape,
it classifies the shape on the bases of a number of sides, and predicts the output.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
o Execute the algorithm on the training dataset. Sometimes we need validation sets
as the control parameters, which are the subset of training datasets.
o Evaluate the accuracy of the model by providing the test set. If the model predicts
the correct output, which means our model is accurate.
1. Regression
Regression algorithms are used if there is a relationship between the input variable
and the output variable. It is used for the prediction of continuous variables, such as
Weather forecasting, Market Trends, etc. Below are some popular Regression algorithms
which come under supervised learning:
o Linear Regression
o Regression Trees
o Non-Linear Regression
o Bayesian Linear Regression
o Polynomial Regression
2. Classification
Classification algorithms are used when the output variable is categorical, which means
there are two classes such as Yes-No, Male-Female, True-false, etc.
Spam Filtering,
o Random Forest
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
o Decision Trees
o Logistic Regression
o Support vector Machines
2. Unsupervised Learning: -
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
underlying structure of dataset, group that data according to similarities, and
represent that dataset in a compressed format.
o Example: Suppose the unsupervised learning algorithm is given an input dataset
containing images of different types of cats and dogs. The algorithm is never
trained upon the given dataset, which means it does not have any idea about the
features of the dataset. The task of the unsupervised learning algorithm is to
identify the image features on their own. Unsupervised learning algorithm will
perform this task by clustering the image dataset into the groups according to
similarities between images.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Here, we have taken an unlabeled input data, which means it is not categorized
and corresponding outputs are also not given. Now, this unlabeled input data is fed to
the machine learning model in order to train it.
Firstly, it will interpret the raw data to find the hidden patterns from the data and
then will apply suitable algorithms such as k-means clustering, Decision tree, etc.
Once it applies the suitable algorithm, the algorithm divides the data objects into
groups according to the similarities and difference between the objects.
The unsupervised learning algorithm can be further categorized into two types of
problems:
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
o Clustering: Clustering is a method of grouping the objects into clusters such that
objects with most similarities remains into a group and has less or no similarities
with the objects of another group. Cluster analysis finds the commonalities
between the data objects and categorizes them as per the presence and absence
of those commonalities.
o Association: An association rule is an unsupervised learning method which is used
for finding the relationships between variables in the large database. It determines
the set of items that occurs together in the dataset. Association rule makes
marketing strategy more effective. Such as people who buy X item (suppose a
bread) are also tend to purchase Y (Butter/Jam) item. A typical example of
Association rule is Market Basket Analysis.
o K-means clustering
o KNN (k-nearest neighbors)
o Hierarchal clustering
o Anomaly detection
o Neural Networks
o Principle Component Analysis
o Independent Component Analysis
o Apriori algorithm
o Singular value decomposition
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
Differences between Supervised and Unsupervised learning are given
below: -
Supervised learning model takes direct Unsupervised learning model does not
feedback to check if it is predicting correct take any feedback.
output or not.
Supervised learning model predicts the Unsupervised learning model finds the
output. hidden patterns in data.
In supervised learning, input data is provided In unsupervised learning, only input data is
to the model along with the output. provided to the model.
The goal of supervised learning is to train the The goal of unsupervised learning is to
model so that it can predict the output when find the hidden patterns and useful
it is given new data. insights from the unknown dataset.
Supervised learning needs supervision to Unsupervised learning does not need any
train the model. supervision to train the model.
Supervised learning can be used for those Unsupervised learning can be used for
cases where we know the input as well as those cases where we have only input data
corresponding outputs. and no corresponding output data.
Supervised learning is not close to true Unsupervised learning is more close to the
Artificial intelligence as in this, we first train true Artificial Intelligence as it learns
the model for each data, and then only it can similarly as a child learns daily routine
predict the correct output. things by his experiences.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
3. Reinforcement Learning: -
o Reinforcement Learning is a feedback-based Machine learning technique in which
an agent learns to behave in an environment by performing the actions and seeing
the results of actions. For each good action, the agent gets positive feedback, and
for each bad action, the agent gets negative feedback or penalty.
o In Reinforcement Learning, the agent learns automatically using feedbacks without
any labeled data, unlike supervised learning.
o Since there is no labeled data, so the agent is bound to learn by its experience only.
o RL solves a specific type of problem where decision making is sequential, and the
goal is long-term, such as game-playing, robotics, etc.
o The agent interacts with the environment and explores it by itself. The primary goal
of an agent in reinforcement learning is to improve the performance by getting
the maximum positive rewards.
o The agent learns with the process of hit and trial, and based on the experience, it
learns to perform the task in a better way. Hence, we can say that "Reinforcement
learning is a type of machine learning method where an intelligent agent (computer
program) interacts with the environment and learns to act within that." How a
Robotic dog learns the movement of his arms is an example of Reinforcement
learning.
o It is a core part of Artificial intelligence, and all AI agent works on the concept of
reinforcement learning. Here we do not need to pre-program the agent, as it learns
from its own experience without any human intervention.
o Example: Suppose there is an AI agent present within a maze environment, and
his goal is to find the diamond. The agent interacts with the environment by
performing some actions, and based on those actions, the state of the agent gets
changed, and it also receives a reward or penalty as feedback.
o The agent continues doing these three things (take action, change state/remain
in the same state, and get feedback), and by doing these actions, he learns and
explores the environment.
o The agent learns that what actions lead to positive feedback or rewards and what
actions lead to negative feedback penalty. As a positive reward, the agent gets a
positive point, and as a penalty, it gets a negative point.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
How does Reinforcement Learning Work?
To understand the working process of the RL, we need to consider two main things:
Let's take an example of a maze environment that the agent needs to explore. Consider
the below image:
The above image shows the robot, diamond, and fire. The goal of the robot is to get the
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
reward that is the diamond and avoid the hurdles that are fired. The robot learns by trying all
the possible paths and then choosing the path which gives him the reward with the least
hurdles. Each right step will give the robot a reward and each wrong step will subtract the
reward of the robot. The total reward will be calculated when it reaches the final reward that
is the diamond.
o Positive Reinforcement
o Negative Reinforcement
Positive Reinforcement:
The positive reinforcement learning means adding something to increase the tendency
that expected behavior would occur again. It impacts positively on the behavior of the
agent and increases the strength of the behavior.
This type of reinforcement can sustain the changes for a long time, but too much positive
reinforcement may lead to an overload of states that can reduce the consequences.
Negative Reinforcement:
It can be more effective than the positive reinforcement depending on situation and
behavior, but it provides reinforcement only to meet minimum behavior.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede
3. Game Playing:
a. RL can be used in Game playing such as tic-tac-toe, chess, etc.
4. Chemistry:
a. RL can be used for optimizing the chemical reactions.
5. Business:
a. RL is now used for business strategy planning.
6. Manufacturing:
a. In various automobile manufacturing companies, the robots use deep
reinforcement learning to pick goods and put them in some containers.
7. Finance Sector:
a. The RL is currently used in the finance sector for evaluating trading
strategies.
Dr. D.Y. Patil Institute of Technology, Pimpri, Pune. Prof. J.S. Narkhede