Your SlideShare is downloading. ×
Week 1
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Week 1

242
views

Published on

Published in: Education, Spiritual, Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
242
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
35
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Week 1
  • 2. 9-10 10-11 11-12 12-1 1-2 2-3 3-4 4-5 5-6 6-7Monday Group 1 Group 2Tuesday Group 3Wednesda Group 4 Group 5 Group 6yThursdayFriday (9 MAKE UP 1 MAKE UP 2 MAKE UP 3Dec)Saturday
  • 3. Head lines of the day:1. The installation (fast review)2. Introduction to SWI prolog I. Making a new file II. Editing and compiling file III. Testing the results IV. Common mistakes3. A Family Tree example4. THE NECK 1. Rules 2. Simple Predecessor
  • 4. Navigate to this addresshttp://www.swi-prolog.org/
  • 5. Click on download
  • 6. Help
  • 7. pam tom bob lizann pat jim
  • 8. Neck the symbol :-, used in a Prolog rule to separate the head from the body. Usually read as if.hasachild(X) :- parent(X, Y).
  • 9. Head Body parent(X,Y),female(X).mother(X,Y)
  • 10. In this example the idea is to write … in threedifferent lines.To separate the writeln command, we use “,” andat the end of the program we have to like always,put full stop.
  • 11. man(adam).man(peter).man(paul).woman(marry).woman(eve).parent(adam,peter).parent(eve,peter).parent(adam,paul).parent(marry,paul).
  • 12. man(adam).man(peter). father(F,C):-man(paul). man(F),parent(F,C).woman(marry). mother(M,C):-woman(eve). woman(M),parent(M,C).parent(adam,peter).parent(eve,peter).parent(adam,paul).parent(marry,paul).
  • 13. man(adam).man(peter). father(F,C):-man(paul). man(F),parent(F,C).woman(marry). mother(M,C):-woman(eve). woman(M),parent(M,C).parent(adam,peter).parent(eve,peter).parent(adam,paul).parent(marry,paul).
  • 14. Now, make the rules: parent(paul,jake). sisterman(adam). parent(soozi,jake). brotherman(peter). parent(jake,margaret). grand_paman(paul).woman(marry). Grand_mawoman(eve). grand_sonparent(adam,peter) . grand_daughterparent(eve,peter).parent(adam,paul).parent(marry,paul).

×