Introduction to AI using Prolog
By: Jyoti Sachdeva
Software Consultant
Knoldus Inc.
1
Agenda
● What is AI?
● Goals of AI
● Disciplines of AI
● Types of AI
● ML vs. DL
● Distinguishing features
● Applications of AI
● What is Prolog?
● Fundamentals of Prolog
● Demo
2
What is AI?
Artificial Intelligence is a way of making a computer, a computer-controlled
robot, or a software think intelligently, in the similar manner the intelligent
humans think.
Developing computer systems that equal or exceed human intelligence is
the crux of artificial intelligence.
Difference between Human and Machine Intelligence is humans perceive by
patterns whereas the machines perceive by set of rules and data.
Goals of AI
The primary goals of AI include deduction and reasoning, knowledge
representation, planning, natural language processing (NLP), learning,
perception, and the ability to manipulate and move objects.
Long-term goals of AI research include achieving Creativity, Social
Intelligence, and General (human level) Intelligence.
● To Create Expert Systems
● To Implement Human Intelligence in Machines
4
Disciplines of AI
5
● Philosophy
● Psychology
● Computer engineering
● Mathematics
● Neuroscience
● Linguistics
● Big Data
Types of AI
● ANI: The intelligence learns about a single task which it has to perform
efficiently and with smartness(intelligently).
● AGI: AGI has the same capabilities as a human.
● ASI: Type of intelligence that is smarter than humans.
Artificial Superintelligence is the reason why many prominent scientists and
technologists, including Stephen Hawking and Elon Musk, have raised
concerns about the possibility of human extinction.
6
Types of AI
● Reactive
● Limited Memory
● Theory of Mind
● Self Awareness
7
Traditional Programming vs ML
9
Machine Learning: ML uses algorithms to parse data,learn from data and makes informed
decisions based on what it has learned.It focuses on the development of computer
programs that can change when exposed to new data.
Deep Learning: DL structures algorithms in layers to create ANN that can learn and make
intelligent decisions on its own.Because the most exciting application of AI today gives
computers the ability to “learn” how to carry out a task from data, without being
programmed to do that task, each layer can represent increasingly abstract features.
Artificial intelligence is the field of science covering how computers can make decisions as
well as humans. But machine-learning refers to the popular, modern-day technique for
creating software that learns from data.
10
ML vs. DL
● Data Dependency
● Hardware Dependency
● Problem Solving
● Execution Time
● Interoperability
Distinguishing features
Applications of AI
● Gaming
● Robotics
● Expert Systems
● Speech Recognition
● Handwriting Recognition
● Natural Language Processing
● Intelligent Robots
● Vision Systems
12
What is Prolog?
● Programming in Logic
● Declarative
● Widely used in AI
13
Fundamentals of Prolog
● Facts: Clauses with empty bodies are called facts.
Example: likes(john, susie). /* John likes Susie */
● Rules: A rule is a predicate expression that uses logical implication (:-) to
describe a relationship among facts.
Rule is in form- Head:-Body
Example: friends(X,Y) :- likes(X,Y),likes(Y,X).
● Query: The Prolog interpreter responds to queries about the facts and
rules represented in its database.
14
List in Prolog
● Prolog also has a special facility to split the first part of the list (called the
head) away from the rest of the list (known as the tail).
Example:
● [a,b,c] unifies with [Head|Tail] resulting in Head=a and Tail=[b,c].
● p([a], X, Y). x=[a],y=[]
15
References
16
● https://www.techopedia.com/definition/190/artificial-intelligence-ai
● https://searchenterpriseai.techtarget.com/definition/AI-Artificial-Intelligence
● https://github.com/delly84/basic_sentiment_analysis_prolog
● https://www.tutorialspoint.com/prolog_in_artificial_intelligence/index.asp
● http://www.cse.unsw.edu.au/~billw/cs9414/notes/prolog/intro.html
17

Introduction To AI Using Prolog

  • 1.
    Introduction to AIusing Prolog By: Jyoti Sachdeva Software Consultant Knoldus Inc. 1
  • 2.
    Agenda ● What isAI? ● Goals of AI ● Disciplines of AI ● Types of AI ● ML vs. DL ● Distinguishing features ● Applications of AI ● What is Prolog? ● Fundamentals of Prolog ● Demo 2
  • 3.
    What is AI? ArtificialIntelligence is a way of making a computer, a computer-controlled robot, or a software think intelligently, in the similar manner the intelligent humans think. Developing computer systems that equal or exceed human intelligence is the crux of artificial intelligence. Difference between Human and Machine Intelligence is humans perceive by patterns whereas the machines perceive by set of rules and data.
  • 4.
    Goals of AI Theprimary goals of AI include deduction and reasoning, knowledge representation, planning, natural language processing (NLP), learning, perception, and the ability to manipulate and move objects. Long-term goals of AI research include achieving Creativity, Social Intelligence, and General (human level) Intelligence. ● To Create Expert Systems ● To Implement Human Intelligence in Machines 4
  • 5.
    Disciplines of AI 5 ●Philosophy ● Psychology ● Computer engineering ● Mathematics ● Neuroscience ● Linguistics ● Big Data
  • 6.
    Types of AI ●ANI: The intelligence learns about a single task which it has to perform efficiently and with smartness(intelligently). ● AGI: AGI has the same capabilities as a human. ● ASI: Type of intelligence that is smarter than humans. Artificial Superintelligence is the reason why many prominent scientists and technologists, including Stephen Hawking and Elon Musk, have raised concerns about the possibility of human extinction. 6
  • 7.
    Types of AI ●Reactive ● Limited Memory ● Theory of Mind ● Self Awareness 7
  • 8.
  • 9.
  • 10.
    Machine Learning: MLuses algorithms to parse data,learn from data and makes informed decisions based on what it has learned.It focuses on the development of computer programs that can change when exposed to new data. Deep Learning: DL structures algorithms in layers to create ANN that can learn and make intelligent decisions on its own.Because the most exciting application of AI today gives computers the ability to “learn” how to carry out a task from data, without being programmed to do that task, each layer can represent increasingly abstract features. Artificial intelligence is the field of science covering how computers can make decisions as well as humans. But machine-learning refers to the popular, modern-day technique for creating software that learns from data. 10 ML vs. DL
  • 11.
    ● Data Dependency ●Hardware Dependency ● Problem Solving ● Execution Time ● Interoperability Distinguishing features
  • 12.
    Applications of AI ●Gaming ● Robotics ● Expert Systems ● Speech Recognition ● Handwriting Recognition ● Natural Language Processing ● Intelligent Robots ● Vision Systems 12
  • 13.
    What is Prolog? ●Programming in Logic ● Declarative ● Widely used in AI 13
  • 14.
    Fundamentals of Prolog ●Facts: Clauses with empty bodies are called facts. Example: likes(john, susie). /* John likes Susie */ ● Rules: A rule is a predicate expression that uses logical implication (:-) to describe a relationship among facts. Rule is in form- Head:-Body Example: friends(X,Y) :- likes(X,Y),likes(Y,X). ● Query: The Prolog interpreter responds to queries about the facts and rules represented in its database. 14
  • 15.
    List in Prolog ●Prolog also has a special facility to split the first part of the list (called the head) away from the rest of the list (known as the tail). Example: ● [a,b,c] unifies with [Head|Tail] resulting in Head=a and Tail=[b,c]. ● p([a], X, Y). x=[a],y=[] 15
  • 16.
    References 16 ● https://www.techopedia.com/definition/190/artificial-intelligence-ai ● https://searchenterpriseai.techtarget.com/definition/AI-Artificial-Intelligence ●https://github.com/delly84/basic_sentiment_analysis_prolog ● https://www.tutorialspoint.com/prolog_in_artificial_intelligence/index.asp ● http://www.cse.unsw.edu.au/~billw/cs9414/notes/prolog/intro.html
  • 17.