Pdf

340 views

Published on

حل واجب (1) مقرر ذكاء اصطناعي
عملي

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
340
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Pdf

  1. 1. Visual Prolog (Lab)Represent the following in Prolog:• Ali is Dancer.dancer(ali).• Mohamed is a doctor .doctor(mohamed).• Rami is a student .student(rami).• Lolo is a vet .vet(lolo).• Lolo and rami are married .married(lolo,rami).• Sawsan loves everyone who is a good dancerLoves(sawsan,Every_one):- good_dancer(Every_one).• Lolo eats anything that is nutritious or tasty.eat(lolo,Any_thing):- nurtitious(Any_thing);tasty(Any_thing).
  2. 2. Represent the following Knowledge Base inProlog:– in This Uni we Have the Following Students :• Rami is a student he is 21 age from Aleppo his Id is 10.• Samer is a student he is 19 age from Homs his Id is 11.• John is a student he is 20 age from Damascus his Id is 12• Lolo is a student he is 20 age from Damascus his Id is 13- In this uni we have the following Course:• Mohamed Teach Nlp, Nlp Id Is C1.• Ahamed Teach Image-proc, Image-Proc Id Is C2.• Peter Teach Artificial-Intell, Artificial-Intell Id Is C3.–At the final Exam we have the following Mark : Student ID Course ID Mark 10 C1 67 10 C2 59 10 C3 80 11 C2 52 11 C3 49 12 C2 56 12 C3 54 13 C1 72 13 C2 65 13 C3 68
  3. 3. Program:
  4. 4. Formulate queries to retrieve the followinginformation from the previous Knowledge Base,using anonymous variables to replace unnecessarilynamed variables:• What is the name of the student who comes from Damascus?• What mark did rami get in course c3?• What mark did lolo get in NLP?Output: Asmaa Almalki

×