Preparation notes for final term exams.
I'm not responsible for anything!
The study and design of computing systems that perceives its environment and takes actions like human beings.
The term was introduced by John McCarthy in 1956
in the well-known Dartmouth Conference.
Intelligence: The ability to learn and solve problems.
Artifical Intelligence: is the intelligence exhibited by machines or software.
Thinking humanly | Thinking rationally | Acting humanly | Acting rationally |
---|---|---|---|
The exciting new effort to make computers think. | The study of mental faculties through the use of computational models. | The study of how to make computers do things which, at the moment, people are better. | Computational Intelligence is the study of the design of intelligent agents. |
how to make a program to think like a human? We need to get inside the actual workings of human minds. There are three ways:
A Turing Test is a method of inquiry in artificial intelligence (AI) for determining whether or not a computer is capable of thinking like a human being.
The original Turing Test requires 3
terminals, each of which is physically separated from the other two. One terminal is operated by a computer, while the other two are operated by humans.
When to Stop Turning Test:
The test is repeated many times. If the questioner makes the correct determination in half of the test runs or less.
Pros | Cons |
---|---|
Reduction in Human Error | High Costs of Creation |
Takes risks instead of Humans | Making Humans Lazy |
Available 24x7 | Unemployment |
Helping in Repetitive Jobs | No Emotions |
Digital Assistance | Lacking Out of Box Thinking |
Faster Decisions | -- |
Artificial intelligence is defined as a study of rational agents. A rational agent could be anything which makes decisions, as a person, firm, machine, or software. It carries out an action with the best outcome after considering past and current percepts(agent’s perceptual inputs at a given instance).
An AI system is composed of an agent and its environment. The agents
act in their environment. The environment
may contain other agents. An agent is anything that can be viewed as :
Agent | Sensor | Acutator |
---|---|---|
Human Agent | Eyes, Ear, & other organs. | Hands, legs, mouth, & other body parts. |
Robotic Agent | Camera, Recorder, & infrared range finder. | Various motors. |
Software Agent | Keystrokes, File contents, Received Network Packages. | Screen, Files, Sent Network Packets. |
Agent = Architecture + Agent Program
Architecture: is the machinery that the agent executes on. It is a device with sensors and actuators, for example : a robotic car, a camera, a PC.
Agent Program: is an implementation of an agent function.
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.
Ideal Rational Agent is capable of doing expected actions to maximize its performance measure, on the basis of −
Rationality | Omniscience |
---|---|
all knowing with infinite knowledge | only knows the actual outcome of its actions and can act accordingly |
Rationality | Perfection |
---|---|
maximizes expected performance | maximizes actual performance |
Specifying the task environment is always the first step in designing agent.
Performance, Environment, Actuators, Sensors
Performance | Environment | Actuators | Sensors |
---|---|---|---|
safe, fast, legal, comfortable trip | roads, other traffic, pedestrians, customers | steering, accelerator, brake, signal, horn, display | camera, sonar, speedometer, GPS, odometer, engine sensors, keyboard, accelerator |
Performance | Environment | Actuators | Sensors |
---|---|---|---|
healthy patient, minimize costs, lawsuits | patient, hospital, staff | display questions, tests, diagnosis, treatments, referrals | keyboard entry of symptoms, findings, patient’s answers |
Performance | Environment | Actuators | Sensors |
---|---|---|---|
Percentage of parts in correct bins | Conveyer belt with parts, bins | Jointed arm and hand | camera, joint angle sensors |
Single-Agent | Multi-Agent |
---|---|
environments are those on which a finite set of possibilities can drive the final outcome of the task. | Environments rely on unknown and rapidly changing data sources. |
Fully Observable | Partial Observable |
---|---|
if the sensors can always see the entire state of the environment. | if the sensors can see only a fraction of the state. Partial Observable agent needs memory. |
Deterministic | Strategic | Stochastic |
---|---|---|
Where your agent’s actions uniquely determined the outcome. | Environment is deterministic except for the actions of other agents. | We can’t predict the outcome. |
Episodic | Sequential |
---|---|
The agent's experience is divided into atomic "episodes". | The current decision could affect all future decisions. |
Each episode consists of the agent perceiving and then performing a single action. | -- |
The choice of action in each episode depends only on the episode itself. | -- |
Static | Dynamic | Semi-Dynamic |
---|---|---|
Environment cannot change while an agent is deliberating | Environment can change while an agent is deliberating | If the environment itself doesn’t change with time but the agent's performance score does. |
Discrete | Continuous |
---|---|
Environments are those on which a finite set of possibilities can drive the final outcome of the task. | Environments rely on unknown and rapidly changing data sources. |
Task Environment | Observable | Determines | Episodic | Static | Discrete | Agent |
---|---|---|---|---|---|---|
Crossword Puzzle | Fully | Determines | Sequential | Static | Discrete | Single |
Chess with clock | Fully | Strategic | Sequential | Static | Discrete | Multi |
Poker | Partially | Strategic | Sequential | Static | Discrete | Multi |
Backgammon | Fully | Stochastic | Sequential | Static | Discrete | Multi |
Taxi driving | Partially | Stochastic | Sequential | Dynamic | Con | Multi |
Medical Diagnosis | Partially | Stochastic | Sequential | Dynamic | Con | Single |
Image Analysis | Fully | Deterministic | Episodic | Semi | Con | Single |
Part pick mg robot | Partially | Stochastic | Episodic | Dynamic | Con | Single |
Refing controller | Partially | Stochastic | Sequential | Dynamic | Con | Single |
Interstice English tutor | Partially | Stochastic | Sequential | Dynamic | Discrete | Multi |
As a natural language, first-order logic also has two main parts:
The syntax of FOL determines which collection of symbols is a logical expression in FOL. The basic syntactic elements of FOL are symbols. We write statements in short-hand notation in FOL.
Constant | 1, 2, A, John, Mumbai, cat, |
---|---|
Variables | x, y, z, a, b, |
Predicates | Brother, Father, Uncle, |
Function | sqrt, LeftLegOf, pow, |
Connectives | ∧, ∨, ¬, ⇒, ⇔ |
Equality | == |
Quantifier | ∀, ∃ |
Predicate (term1, term2, ......, term n)
.Fahan and Nauman are brothers: => Brothers(Farhan, Nauman).
Chinky is a cat: => cat (Chinky).
First-order logic statements can be divided into two parts:
Consider the statement: "x is an integer." it consists of two parts, the first part x
is the subject of the statement and second part is an integer
, is known as a predicate.
There are two types of quantifier:
Universal quantifier is a symbol of logical representation, which specifies that the statement within its range is true for everything or every instance of a particular thing.
If x is a variable, then ∀x is read as:
All man drink coffee:
Let a variable x which refers to a cat so all x can be represented in UOD as below:
∀x man(x) → drink (x, coffee).
It will be read as: There are all x where x is a man who drink coffee.
Existential quantifiers are the type of quantifiers, which express that the statement within its scope is true for at least one instance of something.
It is denoted by the logical operator ∃, which resembles as inverted E. When it is used with a predicate variable then it is called as an existential quantifier.
If x is a variable, then existential quantifier will be ∃x or ∃(x). And it will be read as:
Some boys are intelligent.
∃x: boys(x) ∧ intelligent(x)
It will be read as: There are some x where x is a boy who is intelligent.
Some examples FOL using quantifier:
∀x bird(x) → fly(x).
∀x man(x) → respects (x, parent).
∃x boys(x) → play(x, cricket).
Wherever we go, we are “datafied"
Machine Learning | Statistical |
---|---|
Decision trees | Hypothesis testing |
Rule induction | Experimental design |
Neural Networks | Linear regression |
Clustering method | Logistic regression |
Association rules | -- |
Visualization | -- |
Genetic algorithm | -- |
Graphical models | -- |
In Supervised learning, you train the machine using data which is well "labeled." It means some data is already tagged with the correct answer. It can be compared to learning which takes place in the presence of a supervisor or a teacher.
Unsupervised learning is a machine learning technique, where you do not need to supervise the model. Instead, you need to allow the model to work on its own to discover information. It mainly deals with the unlabelled data.
Parameters | Supervised | Unsupervised |
---|---|---|
Process | In a supervised learning model, input and output variables will be given | In unsupervised learning model, only input data will be given |
Input Data | Algorithms are trained using labeled data | Algorithms are used against data which is not labeled |
Algorithms Used | Support vector machine, Neural network, Linear and logistics regression, random forest, and Classification trees | Unsupervised algorithms can be divided into different categories: like Cluster algorithms, K-means, Hierarchical clustering, etc |
Computational Complexity | Supervised learning is a simpler method | Unsupervised learning is computationally complex |
Accuracy of Results | Highly accurate and trustworthy method | Less accurate and trustworthy method. |
Real Time Learning | Learning method takes place offline | Learning method takes place in real time |
Main Drawback | Classifying big data can be a real challenge in Supervised Learning. | You cannot get precise information regarding data sorting, and the output as data used in unsupervised learning is labeled and not known. |
🔵 K-Nearest Neighbour is one of the simplest Machine Learning algorithms based on Supervised Learning technique.
🔵 K-NN algorithm assumes the similarity between the new case/data and available cases and put the new case into the category that is most similar to the available categories.
🔵 K-NN algorithm stores all the available data and classifies a new data point based on the similarity. This means when new data appears then it can be easily classified into a well suite category by using K- NN algorithm.
🔵 K-NN algorithm can be used for Regression as well as for Classification but mostly it is used for the Classification problems.
🔵 K-NN is a non-parametric algorithm, which means it does not make any assumption on underlying data.
🔵 It is also called a lazy learner algorithm because it does not learn from the training set immediately instead it stores the dataset and at the time of classification, it performs an action on the dataset.
Example:
Suppose, we have an image of a creature that looks similar to cat and dog, but we want to know either it is a cat or dog. So for this identification, we can use the KNN algorithm, as it works on a similarity measure. Our KNN model will find the similar features of the new data set to the cats and dogs images and based on the most similar features it will put it in either cat or dog category.
Below are some points to remember while selecting the value of K in the K-NN algorithm:
Pros | Cons |
---|---|
It is simple to implement. | Always needs to determine the value of K which may be complex some time. |
It is robust to the noisy training data | The computation cost is high because of calculating the distance between the data points for all the training samples. |
It can be more effective if the training data is large. | -- |