This document provides an introduction to Prolog, including:
- Current popular Prolog implementations like SWI-Prolog.
- SWI-Prolog can be downloaded for free and runs on Windows and Linux.
- Prolog is a logical and declarative programming language, where programs logic to solve problems.
- Prolog has applications in areas like intelligent data retrieval, expert systems, machine learning, and robot planning by using facts, rules, queries, variables, and unification.
Python Modules
Python Package
Python File I/O
Modules refer to a file containing Python statements and definitions.
A file containing Python code, for e.g.: filename.py, is called a module and its module name would be filename.
We use modules to break down large programs into small manageable and organized files. Furthermore, modules provide reusability of code.
We can define our most used functions in a module and import it, instead of copying their definitions into different programs.
Python Session - 4
if
nested-if
if-else
elif (else if)
for loop (for iterating_var in sequence: )
while loop
break
continnue
pass
What is a function in Python?
Types of Functions
How to Define & Call Function
Scope and Lifetime of variables
lambda functions(anonymous functions)
Prolog, Prolog Programming IN AI. Prolog is an Artificial Intelligence programming language. Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Its applications include natural language understanding and expert systems. Prolog is notably a so-called nonprocedural, or declarative, language.
Python Modules
Python Package
Python File I/O
Modules refer to a file containing Python statements and definitions.
A file containing Python code, for e.g.: filename.py, is called a module and its module name would be filename.
We use modules to break down large programs into small manageable and organized files. Furthermore, modules provide reusability of code.
We can define our most used functions in a module and import it, instead of copying their definitions into different programs.
Python Session - 4
if
nested-if
if-else
elif (else if)
for loop (for iterating_var in sequence: )
while loop
break
continnue
pass
What is a function in Python?
Types of Functions
How to Define & Call Function
Scope and Lifetime of variables
lambda functions(anonymous functions)
Prolog, Prolog Programming IN AI. Prolog is an Artificial Intelligence programming language. Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Its applications include natural language understanding and expert systems. Prolog is notably a so-called nonprocedural, or declarative, language.
In this PDF you will find the basics of Turbo Prolog 2.0 with some good program and it's output. Also it's second part is coming in next month or week.
For any query ------------------> sohupatel8828@gmail.com
For programs ----------------> https://github.com/UltraHopeful/Turbo-Prolog-2.0
Mixi is one of the largest social networking services in Japan, providing various communication services for over 14M monthly active users. The latest internal mixi project is to replace the in-house search engine with Apache Solr. This session covers two topics; a simple packaging system for Solr that eases the installation process and daily operations, and implementation of a "Did you mean" facility for Japanese queries using a log mining tool. These tools have been released as OSS projects.
Workshop slides originally given at the WOPR Summit in Atlantic City. Use JavaScript parsers and generators like Shift combined with Puppeteer and Chrome to reverse engineer web applications
www.denizoguz.com-For an in company JDK 7 orientation I have prepared a presentation which summaries new features of JDK 7. I would like to make it public for everyone who needs it.
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxcargillfilberto
COMM 166 Final Research Proposal Guidelines
The proposal should contain well-developed sections (Put clear titles on the top of each section) of your outline that you submitted earlier. The proposal should have seven (7) major sections:
1. Introduction: A brief overview of all your sections. Approx. one page
2. A summary of the literature review. In this section you would summarize the previous research (summarize at least 8-10 scholarly research articles), and also your field data collection results (if it was connected to your proposal topic). Also indicate the gaps in the previous research, including your pilot study, and the need for your research study. Please devote around three pages in reviewing the previous research and finding the gaps.
3. Arising from the literature review, write the Purpose Statement of your research (purpose statement should have all its parts clearly written. Follow the examples from textbook).
4. Identify two to three main hypotheses or research questions (based on the quantitative/qualitative research design). Also give some of your supporting research questions. Follow the examples from textbook.
5. Describe the research strategy of inquiry and methods that you would use and why. The method part should be the substantial part of your paper, around three pages. Define your knowledge claims, strategies, and methods from the textbook (and cite), why you chose them, and how you will conduct the research in detail.
6. A page on the significance of your study.
7. A complete reference list of your sources in APA style.
The total length of the paper should be between 8-10 pages (excluding the reference and cover pages).
If you have further questions, please do not hesitate to contact me.
Best wishes
Dev
mportant notes about grading:
1. Compiler errors: All code you submit must compile. Programs that do not compile will receive an automatic zero. If you run out of time, it is better to comment out the parts that do not compile, than hand in a more complete file that does not compile.
2. Late assignments: You must submit your code before the deadline. Verify on Sakai that you have submitted the correct version. If you submit the incorrect version before the deadline and realize that you have done so after the deadline, we will only grade the version received before the deadline.
A Prolog interpreter
In this project, you will implement a Prolog interpreter in OCaml.
If you want to implement the project in Python, download the source code and follow the README file. Parsing functions and test-cases are provided.
Pseudocode
Your main task is to implement the non-deterministic abstract interpreter covered in the lecture Control in Prolog. The pseudocode of the abstract interpreter is in the lecture note.
Bonus
There is also a bonus task for implementing a deterministic Prolog interpreter with support for backtracking (recover from bad choices) and choice points (produce multiple results). Please refer to th.
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxdrandy1
COMM 166 Final Research Proposal Guidelines
The proposal should contain well-developed sections (Put clear titles on the top of each section) of your outline that you submitted earlier. The proposal should have seven (7) major sections:
1. Introduction: A brief overview of all your sections. Approx. one page
2. A summary of the literature review. In this section you would summarize the previous research (summarize at least 8-10 scholarly research articles), and also your field data collection results (if it was connected to your proposal topic). Also indicate the gaps in the previous research, including your pilot study, and the need for your research study. Please devote around three pages in reviewing the previous research and finding the gaps.
3. Arising from the literature review, write the Purpose Statement of your research (purpose statement should have all its parts clearly written. Follow the examples from textbook).
4. Identify two to three main hypotheses or research questions (based on the quantitative/qualitative research design). Also give some of your supporting research questions. Follow the examples from textbook.
5. Describe the research strategy of inquiry and methods that you would use and why. The method part should be the substantial part of your paper, around three pages. Define your knowledge claims, strategies, and methods from the textbook (and cite), why you chose them, and how you will conduct the research in detail.
6. A page on the significance of your study.
7. A complete reference list of your sources in APA style.
The total length of the paper should be between 8-10 pages (excluding the reference and cover pages).
If you have further questions, please do not hesitate to contact me.
Best wishes
Dev
mportant notes about grading:
1. Compiler errors: All code you submit must compile. Programs that do not compile will receive an automatic zero. If you run out of time, it is better to comment out the parts that do not compile, than hand in a more complete file that does not compile.
2. Late assignments: You must submit your code before the deadline. Verify on Sakai that you have submitted the correct version. If you submit the incorrect version before the deadline and realize that you have done so after the deadline, we will only grade the version received before the deadline.
A Prolog interpreter
In this project, you will implement a Prolog interpreter in OCaml.
If you want to implement the project in Python, download the source code and follow the README file. Parsing functions and test-cases are provided.
Pseudocode
Your main task is to implement the non-deterministic abstract interpreter covered in the lecture Control in Prolog. The pseudocode of the abstract interpreter is in the lecture note.
Bonus
There is also a bonus task for implementing a deterministic Prolog interpreter with support for backtracking (recover from bad choices) and choice points (produce multiple results). Please refer to th.
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxmonicafrancis71118
COMM 166 Final Research Proposal Guidelines
The proposal should contain well-developed sections (Put clear titles on the top of each section) of your outline that you submitted earlier. The proposal should have seven (7) major sections:
1. Introduction: A brief overview of all your sections. Approx. one page
2. A summary of the literature review. In this section you would summarize the previous research (summarize at least 8-10 scholarly research articles), and also your field data collection results (if it was connected to your proposal topic). Also indicate the gaps in the previous research, including your pilot study, and the need for your research study. Please devote around three pages in reviewing the previous research and finding the gaps.
3. Arising from the literature review, write the Purpose Statement of your research (purpose statement should have all its parts clearly written. Follow the examples from textbook).
4. Identify two to three main hypotheses or research questions (based on the quantitative/qualitative research design). Also give some of your supporting research questions. Follow the examples from textbook.
5. Describe the research strategy of inquiry and methods that you would use and why. The method part should be the substantial part of your paper, around three pages. Define your knowledge claims, strategies, and methods from the textbook (and cite), why you chose them, and how you will conduct the research in detail.
6. A page on the significance of your study.
7. A complete reference list of your sources in APA style.
The total length of the paper should be between 8-10 pages (excluding the reference and cover pages).
If you have further questions, please do not hesitate to contact me.
Best wishes
Dev
mportant notes about grading:
1. Compiler errors: All code you submit must compile. Programs that do not compile will receive an automatic zero. If you run out of time, it is better to comment out the parts that do not compile, than hand in a more complete file that does not compile.
2. Late assignments: You must submit your code before the deadline. Verify on Sakai that you have submitted the correct version. If you submit the incorrect version before the deadline and realize that you have done so after the deadline, we will only grade the version received before the deadline.
A Prolog interpreter
In this project, you will implement a Prolog interpreter in OCaml.
If you want to implement the project in Python, download the source code here and follow the README file. Parsing functions and test-cases are provided.
Pseudocode
Your main task is to implement the non-deterministic abstract interpreter covered in the lecture Control in Prolog. The pseudocode of the abstract interpreter is in the lecture note.
Bonus
There is also a bonus task for implementing a deterministic Prolog interpreter with support for backtracking (recover from bad choices) and choice points (produce multiple results). Please refer t.
Microsoft azure data fundamentals (dp 900) practice tests 2022SkillCertProExams
• For a full set of 450+ questions. Go to
https://skillcertpro.com/product/microsoft-azure-data-fundamentals-dp-900-exam-questions/
• SkillCertPro offers detailed explanations to each question which helps to understand the concepts better.
• It is recommended to score above 85% in SkillCertPro exams before attempting a real exam.
• SkillCertPro updates exam questions every 2 weeks.
• You will get life time access and life time free updates
• SkillCertPro assures 100% pass guarantee in first attempt.
In this PDF you will find the basics of Turbo Prolog 2.0 with some good program and it's output. Also it's second part is coming in next month or week.
For any query ------------------> sohupatel8828@gmail.com
For programs ----------------> https://github.com/UltraHopeful/Turbo-Prolog-2.0
Mixi is one of the largest social networking services in Japan, providing various communication services for over 14M monthly active users. The latest internal mixi project is to replace the in-house search engine with Apache Solr. This session covers two topics; a simple packaging system for Solr that eases the installation process and daily operations, and implementation of a "Did you mean" facility for Japanese queries using a log mining tool. These tools have been released as OSS projects.
Workshop slides originally given at the WOPR Summit in Atlantic City. Use JavaScript parsers and generators like Shift combined with Puppeteer and Chrome to reverse engineer web applications
www.denizoguz.com-For an in company JDK 7 orientation I have prepared a presentation which summaries new features of JDK 7. I would like to make it public for everyone who needs it.
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxcargillfilberto
COMM 166 Final Research Proposal Guidelines
The proposal should contain well-developed sections (Put clear titles on the top of each section) of your outline that you submitted earlier. The proposal should have seven (7) major sections:
1. Introduction: A brief overview of all your sections. Approx. one page
2. A summary of the literature review. In this section you would summarize the previous research (summarize at least 8-10 scholarly research articles), and also your field data collection results (if it was connected to your proposal topic). Also indicate the gaps in the previous research, including your pilot study, and the need for your research study. Please devote around three pages in reviewing the previous research and finding the gaps.
3. Arising from the literature review, write the Purpose Statement of your research (purpose statement should have all its parts clearly written. Follow the examples from textbook).
4. Identify two to three main hypotheses or research questions (based on the quantitative/qualitative research design). Also give some of your supporting research questions. Follow the examples from textbook.
5. Describe the research strategy of inquiry and methods that you would use and why. The method part should be the substantial part of your paper, around three pages. Define your knowledge claims, strategies, and methods from the textbook (and cite), why you chose them, and how you will conduct the research in detail.
6. A page on the significance of your study.
7. A complete reference list of your sources in APA style.
The total length of the paper should be between 8-10 pages (excluding the reference and cover pages).
If you have further questions, please do not hesitate to contact me.
Best wishes
Dev
mportant notes about grading:
1. Compiler errors: All code you submit must compile. Programs that do not compile will receive an automatic zero. If you run out of time, it is better to comment out the parts that do not compile, than hand in a more complete file that does not compile.
2. Late assignments: You must submit your code before the deadline. Verify on Sakai that you have submitted the correct version. If you submit the incorrect version before the deadline and realize that you have done so after the deadline, we will only grade the version received before the deadline.
A Prolog interpreter
In this project, you will implement a Prolog interpreter in OCaml.
If you want to implement the project in Python, download the source code and follow the README file. Parsing functions and test-cases are provided.
Pseudocode
Your main task is to implement the non-deterministic abstract interpreter covered in the lecture Control in Prolog. The pseudocode of the abstract interpreter is in the lecture note.
Bonus
There is also a bonus task for implementing a deterministic Prolog interpreter with support for backtracking (recover from bad choices) and choice points (produce multiple results). Please refer to th.
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxdrandy1
COMM 166 Final Research Proposal Guidelines
The proposal should contain well-developed sections (Put clear titles on the top of each section) of your outline that you submitted earlier. The proposal should have seven (7) major sections:
1. Introduction: A brief overview of all your sections. Approx. one page
2. A summary of the literature review. In this section you would summarize the previous research (summarize at least 8-10 scholarly research articles), and also your field data collection results (if it was connected to your proposal topic). Also indicate the gaps in the previous research, including your pilot study, and the need for your research study. Please devote around three pages in reviewing the previous research and finding the gaps.
3. Arising from the literature review, write the Purpose Statement of your research (purpose statement should have all its parts clearly written. Follow the examples from textbook).
4. Identify two to three main hypotheses or research questions (based on the quantitative/qualitative research design). Also give some of your supporting research questions. Follow the examples from textbook.
5. Describe the research strategy of inquiry and methods that you would use and why. The method part should be the substantial part of your paper, around three pages. Define your knowledge claims, strategies, and methods from the textbook (and cite), why you chose them, and how you will conduct the research in detail.
6. A page on the significance of your study.
7. A complete reference list of your sources in APA style.
The total length of the paper should be between 8-10 pages (excluding the reference and cover pages).
If you have further questions, please do not hesitate to contact me.
Best wishes
Dev
mportant notes about grading:
1. Compiler errors: All code you submit must compile. Programs that do not compile will receive an automatic zero. If you run out of time, it is better to comment out the parts that do not compile, than hand in a more complete file that does not compile.
2. Late assignments: You must submit your code before the deadline. Verify on Sakai that you have submitted the correct version. If you submit the incorrect version before the deadline and realize that you have done so after the deadline, we will only grade the version received before the deadline.
A Prolog interpreter
In this project, you will implement a Prolog interpreter in OCaml.
If you want to implement the project in Python, download the source code and follow the README file. Parsing functions and test-cases are provided.
Pseudocode
Your main task is to implement the non-deterministic abstract interpreter covered in the lecture Control in Prolog. The pseudocode of the abstract interpreter is in the lecture note.
Bonus
There is also a bonus task for implementing a deterministic Prolog interpreter with support for backtracking (recover from bad choices) and choice points (produce multiple results). Please refer to th.
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxmonicafrancis71118
COMM 166 Final Research Proposal Guidelines
The proposal should contain well-developed sections (Put clear titles on the top of each section) of your outline that you submitted earlier. The proposal should have seven (7) major sections:
1. Introduction: A brief overview of all your sections. Approx. one page
2. A summary of the literature review. In this section you would summarize the previous research (summarize at least 8-10 scholarly research articles), and also your field data collection results (if it was connected to your proposal topic). Also indicate the gaps in the previous research, including your pilot study, and the need for your research study. Please devote around three pages in reviewing the previous research and finding the gaps.
3. Arising from the literature review, write the Purpose Statement of your research (purpose statement should have all its parts clearly written. Follow the examples from textbook).
4. Identify two to three main hypotheses or research questions (based on the quantitative/qualitative research design). Also give some of your supporting research questions. Follow the examples from textbook.
5. Describe the research strategy of inquiry and methods that you would use and why. The method part should be the substantial part of your paper, around three pages. Define your knowledge claims, strategies, and methods from the textbook (and cite), why you chose them, and how you will conduct the research in detail.
6. A page on the significance of your study.
7. A complete reference list of your sources in APA style.
The total length of the paper should be between 8-10 pages (excluding the reference and cover pages).
If you have further questions, please do not hesitate to contact me.
Best wishes
Dev
mportant notes about grading:
1. Compiler errors: All code you submit must compile. Programs that do not compile will receive an automatic zero. If you run out of time, it is better to comment out the parts that do not compile, than hand in a more complete file that does not compile.
2. Late assignments: You must submit your code before the deadline. Verify on Sakai that you have submitted the correct version. If you submit the incorrect version before the deadline and realize that you have done so after the deadline, we will only grade the version received before the deadline.
A Prolog interpreter
In this project, you will implement a Prolog interpreter in OCaml.
If you want to implement the project in Python, download the source code here and follow the README file. Parsing functions and test-cases are provided.
Pseudocode
Your main task is to implement the non-deterministic abstract interpreter covered in the lecture Control in Prolog. The pseudocode of the abstract interpreter is in the lecture note.
Bonus
There is also a bonus task for implementing a deterministic Prolog interpreter with support for backtracking (recover from bad choices) and choice points (produce multiple results). Please refer t.
Microsoft azure data fundamentals (dp 900) practice tests 2022SkillCertProExams
• For a full set of 450+ questions. Go to
https://skillcertpro.com/product/microsoft-azure-data-fundamentals-dp-900-exam-questions/
• SkillCertPro offers detailed explanations to each question which helps to understand the concepts better.
• It is recommended to score above 85% in SkillCertPro exams before attempting a real exam.
• SkillCertPro updates exam questions every 2 weeks.
• You will get life time access and life time free updates
• SkillCertPro assures 100% pass guarantee in first attempt.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
2. 2
Introduction
CURRENT IMPLEMENTATIONS
SWI_PROLOG
Fundamentals of PROLOG
Applications
References
Objective
3. Prolog is the most popular language of the logic
programing languages.
It is goal based language, it has automatic
backtracking and uses recursion.
Prolog stands for programmation en logique", or
programming in logic.“
3
Introduction
4. CURRENT
IMPLEMENTATIONS
There are several popular Prolog interpreters
available. They include:
1.GNU Prolog (http://pauillac.inria.fr/vdiaz/gnuprolog/)
2. Visual Prolog (http://www.visualprolog.com/vip6/Download/Default.htm)
3. Bprolog
(http://www.cad.mse.kyutech.ac.jp/people/zhou/bpr
olog.html)
4. SWI_PROLOG
4
5. SWI-Prolog offers a comprehensive FREE
Software Prolog environment.
Link for downloading:
http://www.swi-prolog.org/download/stable
A Self-installing executable for Windows: swipl-win.exe
Works on Windows XP
LINUX versions are also available.
5
SWI_PROLOG
6. o Prolog is a logical and a declarative
programming language.
o The name itself, Prolog, is short for
Programming in Logics.
o Prolog is the major example of a fourth
generation
programming language supporting the
declarative programming paradigm.
6
What is Prolog ?
7. Applications of Prolog
Some applications of Prolog are:
Intelligent data base retrieval
Natural language understanding
Expert systems
Specification language
Machine learning
Robot planning
Problem solving
7
9. The Prolog system uses the facts to work out how
to accomplish the solution by searching through
the space of possible solutions.
It is defined by an identifier followed by an n-
tuple of constants.
A relation identifier is referred to as a predicate
When a tuple of values is in a relation we say the
tuple satisfies the predicate.
Names of relationship and objects must begin
with a lowercase letter.
9
Facts
10. 1. Specifies under what conditions a tuple of
values satisfies a predicate.
2. The basic building block of a rule is called an
atom
3. Atom :- Atom1, ..., Atomn
If each of Atom1,...,Atomn is true, then Atom is
also true.
10
Rules
11. There are two types of queries:
1.Ground Query
edge(a,b)
This query is called a ground query because it consists only of
value identifiers as parameters to the predicate.
a ground query is posed we expect a yes/no answer.
2. Non Ground Query
They have variables as parameters
tedge(a,X)
11
Query
12. Always begin with a capital letter
?- likes (john,X).
?- likes (john, Something).
But not
?- likes (john,something)
12
Variables
13. Example
Facts: ()
◦ likes(john,mary).
◦ likes(john,X). % Variables begin with capital
Queries
◦ ?- likes(X,Y).
◦ X=john, Y=Mary. % hit “;” for more
◦ ?- likes(X,X).
◦ X=john.
13
14. Prolog associates variables and values using a
process
known as unification
Variables that receive a value are said to be
instantiated
14
Unification
15. Arithmetic in prolog
Prolog provides a number of basic arithmetic tools.
Arithmetic examples Prolog Notation
6 + 2 = 8 8 is 6+2.
6 *2 = 12 12 is 6*2.
Answers to arithmetic questions by using ariables.
For example:
?- X is 6+2.
X=8
15