CA 208 Logic Ex8 Describe (i.e. axiomatise, define) the following situation as a Prolog programme (use parent/2 and john, mary etc. as your vocabulary):

Slides:



Advertisements
Similar presentations
Unit 3 This is my sister.
Advertisements

This is my sister. Mary Unit 3-1 plane catcat peach desk home dogdog milk kite busbus music.
Unit 3 This is my sister. Period 2 Family.
Knowledge Representation using First-Order Logic
English?? Yes!! Alice Borges 5º4 nº1.
Prolog The language of logic. History Kowalski: late 60’s Logician who showed logical proof can support computation. Colmerauer: early 70’s Developed.
Vocabulary For. newborn just born; only a few days or weeks old.
Who do you have in your family? parents father mother.
Family Relationships ‘cause the apple doesn’t fall far from the tree.
FAMILYVOCABULARY Vocabulary Unscramble This True or False Questions
1.Who is he? He is my brother. (my brother) mother. father. sister. uncle. She is He is she? my Who is he? 1.Who is he? (my brother) He is my brother.
Introduction to family trees and a review of family vocabulary terms.
Учитель английского языка Монгуш Ш.А..  Grandmother mother daughter elder sister younger sister aunt cousin niece wife grandfather father son elder brother.
1 Prolog I. 2 Syllogisms “Prolog” is all about programming in logic. –Socrates is a man. –All men are mortal. –Therefore, Socrates is mortal.
Section B 1—2c Section B 1—2c Unit 3 白塔寺中学 刘杨 Review Dave Introduce ( 介绍) Dave’s family.
Hello ! I’m Xiaowanzi. Can you introduce my family and my friends?
First-Order Logic Chapter 8.
Unit 3 This is my sister. 1.My father’s mother is my ________. 2.My father’s father is my ________. 3.My father’s parents are my ________. 4.My father.
This is my family. Lesson 2 - Mattayom 1.
Contributions to staff members from SMS in various circumstances.
Unit 2 This is my sister. Section A Period 2 (3a-3c)
What do you want to be? Lesson 14.
Module 11 Me, the parent. Module 11: Me, the parent Parents play an important role in the development of their babies and young children The child’s well-being.
What are the most important things in people’s life?
Play Me. For the Teacher  Simple activity- teach the members of the family: Click on each picture in slide 1, then click on the.
My Family Tree.
MB: 26 Feb 2001CS Lecture 11 Introduction Reading: Read Chapter 1 of Bratko Programming in Logic: Prolog.
What do you want to be? Lesson 16. He is a teacher He is a teacher. He is a teacher.
Составила: Е.Н.Крапивина
Artificial Intelligence CIS 342 The College of Saint Rose David Goldschmidt, Ph.D.
Unit 2 My family Welcome-Speaking. This is my dog. He is Spotty.
Family Tree Project and Vocabulary
Unit 3 This is my sister. What’s this? It’s … How do you spell it? a baseball. B-A-S-E-B-A-L-L.
Prolog Fundamentals. 2 Review Last Lecture A Prolog program consists of a database of facts and rules, and queries (questions). –Fact:.... –Rule:... :-....
按要求写出下列单词或句子。 1. sister ( 复数 ) _______ 2. parent ( 复数 ) ______ 3. this ( 复数 ) _______ 4. those ( 单数 ) ______ 5. it ( 复数 ) _______ 6. 谁;什么人 _______ sisters.
MEME MEME MEME MEME MEME MEME MEME.
RELD Family Members Pictures Adapted From:
A 家庭,家人 There are three. There are …people in my family.
Unit 3 This is my sister. Section B. sister son cousin grandfather mother aunt / grandmother (1) (2) (3) (5) (6) father / uncle / daughter ( ) (brother)
Module 4 My family Unit 1 there in your family? 1.Are there any … in our classroom? 2.Is there a(n) …on my desk? 3.How many students are there in your.
LOGO Identify people 辨认人物 Introduce people 介绍他人.
长湴小学 彭李梅 审定 : 天河区天府路小学 林韵. look at … 看 …… family 家庭 tree family tree 树 家谱 three 三.
HW: Copy the Kinship symbols and kin type association for your notes
grandparents grandmother mother grandmother
My family.
Family Grandfather Grandmother Mother Father Aunt Uncle Sister Brother
Unit 2 This is my sister..
My Family Tree 2018.
Prolog and Logic Programming
3a Life Changes.
Problem I: Cousin’s Aunt
Vocabulary For.
} D o Kinship diagram symbols male female parent-child husband-wife or sibling.
By __________________
The Family The Father The Dad The Mother The Mom The Parents The Brother The Sister The siblings (Brothers and Sisters) The Grandfather The Grandmother.
The Family The Father The Dad The Mother The Mom The Parents The Brother The Sister The siblings (Brothers and Sisters) The Grandfather The Grandmother.
(My Family) Please copy the following terms into your notebook
My Family Tree 2017.
Unit 3 Language in use Family. Unit 3 Language in use Family.
Men Women Younger Older Mixed Bag
FAMILY TIES.
His father his mother his brothers his sister. his father his mother his brothers his sister.
Complete the following sentences with the name of the relative.
JOHN’S FAMILY.
Here’s the Simpson family!
WE AS A FAMILY.
Sequence One FIRST TERM PROJECT: One
The Family The Father The Dad The Mother The Mom The Parents The Brother The Sister The siblings (Brothers and Sisters) The Grandfather The Grandmother.
THE FAMILY.
© DynEd International, Inc.
Presentation transcript:

CA 208 Logic Ex8 Describe (i.e. axiomatise, define) the following situation as a Prolog programme (use parent/2 and john, mary etc. as your vocabulary): John is a parent of Kate. Mary is a parent of Kate. John is a parent of Mike. Mary is a parent of Mike. Kate is a parent of Lucy. Tom is a parent of Lucy. Lucy is a parent of Sean. Charles is a parent of Sean. Sean is a parent of Tracy. Fiona is a parent of Tracy. Given this, add information (use male/1 and female/1 predicates) to express that: John is male. Mary is female. Kate is female. Mike is male. Lucy is female. Tom is male. Sean is male. Charles is male. Tracy is female. Conor is male. Given your Prolog programme, add clauses defining the following relations: child(X,Y) % if X is a child of Y father(X,Y) % if X is a father of Y mother(X,Y) % if X is a mother of Y grandfather(X,Y) % if X is a grandfather of Y grandmother(X,Y) % if X is a grandmother of Y ancestor(X,Y) % if X is an ancestor of Y (define recursively) relative(X,Y) % if X is a relative of Y sibling(X,Y) % if X is a sibling of Y sister(X,Y) % if X is a sister of Y brother(X,Y) % if X is a brother of Y aunt(X,Y) % if X is an aunt of Y uncle(X,Y) % if X is an uncle of Y For some of these relations you may want to use negation “\+” to rule out that e.g. sombody is their own sister “\+(X=Y)”. Load you programme into Prolog, debug it and test it out using a number of queries.

CA 208 Logic Ex8 Which of the following (sequences of) unifications/matches succeed? (use Prolog to check ...) a = a. a = b. a = X. X = a. X = Y. X = Y, X = a. X = a, X = Y, Y = b. like(john,mary) = like(john,X). like(john,mary) = like(Y,X). like(john,mary) = like(X,X). like(john,mary) = like(Y,X,Z). like(john,mary) = like(X). line(point(2,2),point(2,5)) = line(point(X,X),point(X,5)). line(point(2,2),point(2,5)) = line(point(X,Y),point(Z,5)). line(X,point(2,5)) = line(point(2,2),point(2,5)). line(X,Y) = line(point(2,2),point(2,5)). line(X,X) = line(point(2,2),point(2,5)). line(X,point(2,5)) = line(point(2,2),point(2,Y)). line(X,point(2,5)) = line(point(2,2),point(X,Y)).