Prolog CH4 Flashcards
1
Q
Prolog
A
short for “programming logic” associated with AI and computational linguistics
- its based on the concepts of predicate logic
- logical inference engine
2
Q
The basic elements of Prolog
A
- Facts - fundamental assertions that represent truths about the world
- Rules - define logical relationships and allow for inference
- Queries - are questions posed to extract info based on the available facts and rules
- Variables - can represent any prolog term
- Lists - important data structures to store sequences of elements
3
Q
Elements of prolog P2
A
- Arithmetic Operators - mathematical elements
- Predicates - building blocks of prolog programs
- Recursions - a powerful concept in prolog, where a rule can call different arguments
- Backtracking - tries different possibilities automatically
- Cut Operator - is used to control backtracking
4
Q
parent(john, paul) John is Paul’s parent.
What example is this
A
Facts
5
Q
% Sibling rule
sibling(x,y)
what example is this
A
Rules
6
Q
dog(fido)
cat(whiskers)
bird(tweety)
examples of what?
A
Facts and Queries
7
Q
parent(alice,bob) alice is bob’s parent
parent(bob,carol) bob is carol’s parent
examples of what?
A
Recursion
- can handle recursive relationships
8
Q
member(bob, [alice,bob,carol])
examples of?
A
Lists and Operations