Sei sulla pagina 1di 9

Artificial Intelligence

Programming Python
Contents
1. What is Artificial Intelligence?....................................................................................................1

2. Problems in AI.............................................................................................................................1

a. Reasoning and Problem Solving.................................................................................................2

b. Knowledge Representation.........................................................................................................2

c. Planning.......................................................................................................................................2

d. Learning......................................................................................................................................3

e. Natural Language Processing......................................................................................................3

f. Perception....................................................................................................................................3

g. Motion and Manipulation............................................................................................................3

h. Social Intelligence.......................................................................................................................3

i. General Intelligence.....................................................................................................................3

3. Approaches to Artificial Intelligence...........................................................................................3

a. Cybernetics and Brain Simulation...............................................................................................4

b. Symbolic.....................................................................................................................................4

c. Sub-Symbolic .............................................................................................................................. 4

d. Statistical Learning ..................................................................................................................... 4

4. Python AI Tutorial - Artificial Intelligence Tools.........................................................................4

a. Search and Optimization.............................................................................................................5

b. Logic...........................................................................................................................................5

c. Probabilistic Methods for Uncertain Reasoning.........................................................................5

d. Classifiers and Statistical Learning Methods..............................................................................5

e. Artificial Neural Networks..........................................................................................................6

f. Evaluating Progress.....................................................................................................................6

5. Python AI Tutorial - Applications of Artificial Intelligence.........................................................6


Python AI Tutorial

Artificial
Intelligence With
<, Python

1. What is Artificial Intelligence?


Artificial Intelligence, often dubbed AI, is the intelligence a machine demonstrates. With
machine intelligence, it is possible to give a device the ability to discern its environment
and act to maximize its chances of success in achieving its goals. In other words, AI is
when a machine can mimic cognitive functions like learning and problem-solving.
“AI is whatever hasn’t been done yet.”
As we said, an AI takes in its environment and acts to maximize its chances of success in
achieving its goals. A goal can be simple or complex, explicit or induced. It is also true
that many algorithms in AI can learn from data, learn new heuristics to improve and write
other algorithms.
One difference to humans is that AI does not possess the features of human
commonsense reasoning and folk psychology. This makes it end up making different
mistakes than a human would.

2. Problems in AI
When simulating or creating AI, we may run into problems around the following
traits-

1
https://data-flair.training/big-data-hadoop/
Python AI Tutorial

^|Data
EM FUir

General

Problems in AI Intelligenc
e

Social
Intelligence

Reasoning
and Problem
Learning Perception
Solving

Natural
Knowledge Language .
Representatio Processing Motion and
n Manipulation

a. Reasoning and Problem Solving


Earlier, algorithms mimicked step-by-step reasoning that humans display. AI research later
introduced methods to work with incomplete and uncertain information. However, as the
problems grew larger, these algorithms became exponentially slower. Humans often use fast,
intuitive judgments instead of a step-by-step deduction.

b. Knowledge Representation
Some expert systems accumulate esoteric knowledge from experts. A comprehensive
commonsense knowledge base holds many things including- objects, properties, categories,
relations between objects, situations, events, states, time, causes, effects, knowledge about
knowledge, and other domains. When we talk about ontology, we talk about what exists.
Under knowledge representation, we observe the following domains-

• Default reasoning; Qualification problem


• Breadth of commonsense knowledge
• Subsymbolic form of some commonsense knowledge

c. Planning
An intelligent agent should be capable of setting goals, achieving them, and visualizing the
future. Assuming it is the only system in the world, an agent can be certain of their actions’
consequences. If there are more actors, the agent should be able to reason under uncertainty.
For this, it should be able to assess its environment, make predictions, evaluate predictions,
and adapt according to its assessment. With multi-agent planning, we observe multiple agents
cooperate and compete to achieve a goal.

2
https://data-flair.training/big-data-hadoop/
Python AI Tutorial

d. Learning
AI is related to Machine Learning in some way. We have often talked about unsupervised
learning- the ability to take a stream of input and find patterns in it. This includes
classification and numerical regression. We classify things into categories and produce a
function that describes how inputs and outputs relate and change each other. These function
approximators.

e. Natural Language Processing


NLP is an area of Computer Science that gives machines the ability to read the human
language and understand it. With it, we can retrieve information, mine text, answer questions,
and translating using machines. We use strategies like keyword spotting and lexical affinity.

f. Perception
With machine perception, we can take input from sensors like cameras, microphones, and
lidar to recognize objects. We can use it for applications like speech recognition, facial
recognition, and object recognition. We can also analyze visual input with Computer Vision.

g. Motion and Manipulation


With AI, we can develop advanced robotic arms and more for modern factories. These can
use the experience to learn to deal with friction and gear slippage. The term Motion Planning
means dividing a task into primitives like individual joint movements.

h. Social Intelligence
“Should I go to bed, Siri?”, I ask as I reach home from a busy day. “I think you should sleep
on it”, Siri quips back. Affective Computing, an umbrella term, encompasses systems that
can recognize, interpret, process, or simulate human affects/ emotions. In this domain, we
have observed textual sentiment analysis and multimodal affect analysis. The aim is to allow
AI to understand others’ motives and emotional states to predict their actions. It can mimic
human emotion and expressions to appear sensitive and interact with humans. A robot with
rudimentary social skills is Kismet, developed at MIT by Dr. Cynthia Breazeal.

i. General Intelligence
Lately, many AI researchers have begun working on tractable narrow AI applications like a
medical diagnosis. The future could hold machines with Artificial General Intelligence(AGI)
that combines such narrow skills. Google’s DeepMind will be an example of this.

3. Approaches to Artificial Intelligence


We observe four different approaches to AI-

3
https://data-flair.training/big-data-hadoop/
Python AI Tutorial

Python AI Tutorial - AI Approaches

a. Cybernetics and Brain Simulation


Some machines exist that use electronic networks to display rudimentary intelligence.

b. Symbolic
This approach considers reducing human intelligence to symbolic manipulation. This
includes cognitive simulation, logic-based, anti-logic or scruffy, and knowledge-based
approaches.

c. Sub-Symbolic
For processes of human cognition like perception, robotics, learning, and pattern recognition,
sub-symbolic approaches came into picture. This includes approaches like embodied
intelligence and computational intelligence and soft computing.

d. Statistical Learning
Statistical learning techniques like HMM and neural networks deliver better accuracy in
practical domains like data mining. Limitations of HMM include that it cannot model the
infinite possible combinations of natural language.

4. Python AI Tutorial - Artificial Intelligence Tools

For AI, we have the following tools-

4
https://data-flair.training/big-data-hadoop/
Python AI Tutorial

>«i^Data
>-1 ( jf Flair

Search and
Optimization
02 r
Logic

Probabilistic Classifiers and


Artificial
Methods for
Uncertain
04 Statistical
Learning
Intelligen
.Reasoning Methods
ce
Artificial Neural
Networks
06
Evaluating
Progress
Tools
_i

Python AI Tutorial - Artificial Intelligence Tools

a. Search and Optimization


To intelligently search through possible solutions and use reasoning to do so is a tool for AI.
For real-world problems, simple exhaustive searches rarely suffice. This is because these
have really large search spaces. This leads to a slow search or one that never ends. To get
around this, we can use heuristics.

b. Logic
AI research uses different forms of logic. Propositional logics use truth functions like ‘or’ and
‘not’. The fuzzy set theory holds a degree of truth (values between 0 and 1) to vague
statements. First-order logic adds quantifiers and predicates. Fuzzy logic helps with control
systems to contribute vague rules.

c. Probabilistic Methods for Uncertain Reasoning


We often use tools like Bayesian networks for reasoning, learning, planning, and perception.
We can also use probabilistic algorithms to filter, predict, smoothen, and explain streams of
data.

d. Classifiers and Statistical Learning Methods


Classifiers and controllers work together. Consider an object. If it is shiny, the classifier
knows it is a diamond. If it is shiny, the controller picks it up. But before inferring an action,
a controller classifies conditions. As a function, a classifier matches patterns to find the
closest match. Supervised learning puts each pattern into a predefined class.

5
https://data-flair.training/big-data-hadoop/
Python AI Tutorial

e. Artificial Neural Networks


ANNs are collections of nodes that are interconnected- inspired by the huge network of
neurons in the human brain.

Python AI Tutorial - Artificial Neural Networks


Under these, we have categories like feedforward neural networks and recurrent neural
networks. We will take up ANNs as a separate topic in another tutorial.

f. Evaluating Progress
Since AI is general purpose, there is no way to find out which domains it excels in. Games
are a good benchmark to assess progress. Some of these include AlphaGo and StarCraft.

5. Python AI Tutorial - Applications of Artificial Intelligence


Like we said, AI is pretty general-purpose. Here are a few domains it finds use in-

• Automotive
• Healthcare
• Video games

6
https://data-flair.training/big-data-hadoop/
Python AI Tutorial

• Military
• Finance and Economics
• Art
• Auditing
• Advertising

So, this was all in Python AI Tutorial. Hope you like our explanation.

Next step to follow

• Copy in Python - Shallow Copy and Deep Copy


• NLTK Python Tutorial (Natural Language Toolkit)
• Python Assert Statements | Assertion Error in Python
• Python Speech Recognition - Artificial Intelligence

7
https://data-flair.training/big-data-hadoop/

Potrebbero piacerti anche