PRAKTIKUM _#5 Expert System CLIPS [lanjutan]. WildCard Pattern.

Slides:



Advertisements
Similar presentations
Expert systems CLIPS Seyed Hashem Davarpanah
Advertisements

Ozone Level ppb (parts per billion)
PRAKTIKUM 04 SISTEM PAKAR
Cover from album Abbey Road. About The Beatles  The Beatles were an English rock band.  This band had 4 members: -Paul McCartney -John Lennon -Ringo.
Travelling to Wales ? ? ? ? Great Britain What is the capital of … ? Scotland Northern Ireland Wales England Edinburgh Belfast Cardiff London.
The CLIPS Programming Tool History of CLIPS –Influenced by OPS5 and ART –Implemented in C for efficiency and portability –Developed by NASA, distributed.
November 2, 2004AI: CLIPS Language Tutorial1 CLIPS Michael Scherger Department of Computer Science Kent State University.
ROCK N’ ROLL The Beatles. The Beatles made their American Debut on the Ed Sullivan Show on February 7, 1964 Their first hit song in America.
Samad Paydar Ferdowsi University of Mashhad.  C Language Integrated Production System (CLIPS)  A tool for building expert systems  An expert system.
November 2, 2004AI: CLIPS Language Tutorial1 Artificial Intelligence CLIPS Language Tutorial Michael Scherger Department of Computer Science Kent State.
Chapter 8 Pattern Matching
© C. Kemke CLIPS 1 1 COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
The Beatles. The band was formed in 1960 by four members: John Lennon, Ringo Starr, George Harrison and Paul McCartney. They were known as the Fab four.
The Beatles By Evie Nulty. Who are the Beatles ? John Lennon Paul McCartney Ringo Starr George Harrison.
Introduction to CLIPS (Chapter 7) Fact List (contains data) Knowledge Base (contains rules) Inference Engine (controls execution)
Mary Lou Maher MIT Fall 2002 Jess: A Production System Language Agent-Based Virtual Worlds.
© C. Kemke CLIPS 1 1 COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
Chapter 8: Advanced Pattern Matching Expert Systems: Principles and Programming, Fourth Edition.
The Beatles. The Beatles is British rock band from Liverpool which was founded in 1960.
British Invasion Review Study Guide. Question 1 Name the main four main bands that made up the British Invasion of Rock ‘N’ Roll in the 1960’s.
1 01/12/2011Knowledge-Based Systems, Paula Matuszek More Intro to CLIPS Paula Matuszek CSC 9010, Spring, 2011.
Review Topics Test 1. Background Topics Definitions of Artificial Intelligence & Turing Test Physical symbol system hypothesis vs connectionist approaches.
Expert System Topic 2.
John Lennon Spreading Peace From 1940 to In this picture is part of the John Lennon Museum In Japan. John Lennon had a passion for music since he.
By Bradley Davies THE BEATLES.  The Beatles was the 1950s rock and was very popular especially Liverpool their home town.  The Beatles gained their.
Those who have brought the huge contribution to culture of music.
The Beatles A presentation by Joe Porter and Matthew Everett.
OUTSTANDING PEOPLE Of Great Britain by Igol’nikova T. 6A.
OŠ Eugena Kvaternika Rakovica The Beatles Student: Jelena Hodak 7.b Teacher: Snježana Oštrina Panić.
The legend of rock. The Beatles were an English rock band that formed in Liverpool, in 1960 with John Lennon, Paul McCartney, George Harrison, and Ringo.
© 2011 wheresjenny.com THE BEATLES John Lennon George Harrison Paul McCartney Ringo Starr THE BEATLES.
Paul McCartney John Lennon Ringo Starr George Harrison The Band.
TRUE OR FALSE? 1.The Beatles Story Museum was founded by Paul McCartney. 2.This museum was founded in You can buy souvenirs, cups with.
M USIC Q UESTIONNAIRE. H ERE ARE YOUR QUESTIONS What was the first rock band to successfully combine their music with the music of different cultures?
Expert Systems Chapter 7 Introduction to CLIPS Entering and Exiting CLIPS A> CLIPS  CLIPS (V6.5 09/01/97) CLIPS> exit exit CLIPS> (+ 3 4)  7 CLIPS>
Advanced Pattern Matching. Field constraints Used to restrict the values of a field on LHS of a rule Used to restrict the values of a field on LHS of.
Born Liverpool, England Began playing music in a group 1960 Became a world famous rock band Ringo Starr (aka Richard Starkey )drummer George Harrison,
THE HISTORY OF MUSIC! DANIELLE FREENEY AND VICKY HORSEY.
Inma Jiménez Palma 1ºESO Eiffel. Members John Lennon Paul McCartey George Harrison Ringo Starr.
The Beatles were the most famous pop and rock group of the 1960s. Their music was popular not only in Britain, but all over the world.
The Beatles were the most famous pop and rock group of the 1960s. Their music was popular not only in Britain, but all over the world.
Artificial Intelligence Lecture No. 23 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Presented by: Zach Fogg Project 13: My Favorite Band 5/24/12
The effects of history on culture: Part 1 “The Beatles”
The Beatles What do you know about the 1960s pop group ‘The Beatles’?
By Lilian Marchesoni. Where was John Lennon born? Liverpool 1940 – Oct. 9 – John Lennon was born in Liverpool. Who did John Lennon join in 1955? “Quarryman”
Liverpool The Beatles The Beatles names are : Paul McCartney, John Lennon, George Harrison and Richard Starkey (also named Ringo Starr ) John, Paul and.
Подготовил ученик 10 класса Дедов Алексей Учитель Фомина Н.В.
THE BEATLES. Ringo Starr George Harrison Paul McCartney John Lennon.
Mostly adopted from Jason Morris notes (Morris Technical Solutions)
Artificial Intelligence Lecture No. 22 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Mr. Postman BY: Hannah Godward. Band Members John Lennon- Born: October 9, 1940 Died: December 8, 1980 Musical Instrument: Rhythm guitar.
Intelligent systems Lecture 11 Tools for development of Expert Systems.
The CLIPS Expert System Shell Dr Nicholas Gibbins
Summary for final exam Agent System..
The Beatles were an English rock band that formed in Liverpool, in The members of the group were John Lennon ( ), Paul McCartney (born 1942),
Yellow Submarine autor: Robert Kočí. In 1966 the Beatles made a great song called Yellow Submarine. It became the title song for the 1968 animated film,
Introduction to CLIPS 2 Session 13 Course: T0273 – EXPERT SYSTEMS Year: 2014.
Intelligent Systems JESS constructs.
By: Kayla Martin.
Travelling to.
Chapter 7: Introduction to CLIPS
In the 1960s in Great Britain, in Liverpool a new band was created
Chapter 8: Advanced Pattern Matching
بسم الله الرحمن الرحیم آموزش نرم افزار CLIPS
Let the Music Begin.
Jess Knowledge, Influence, Behavior
Author: Natália Hofierková
Computer Based Tutoring
THE BEATLES.
Presentation transcript:

PRAKTIKUM _#5 Expert System CLIPS [lanjutan]

WildCard Pattern

•Used to take the place of a symbol on the left hand side of a rule. •? -> match any one symbol •$?-> match zero or more symbols •?name-> only match one symbols

bands.CLP • (deftemplate member_bands (multislot member-of)) • (deffacts nama_band (member_bands (member-of beatles john_lennon paul_mccartney george_harrison ringo_starr)) (member_bands (member-of who roger_daltrey pete_townsend keith_moon)) (member_bands (member-of ebtg tracey_thorn ben_watt))) • (defrule bands (member_bands (member-of ?groupband ?member1 $?)) => (printout t "there is a band called " ?groupband “anggota1 adalah“ ?member1 crlf))

bands_member.CLP • (deftemplate member_bands (multislot member-of)) • (deffacts nama_band (member_bands (member-of beatles john_lennon paul_mccartney george_harrison ringo_starr)) (member_bands (member-of who roger_daltrey pete_townsend keith_moon)) (member_bands (member-of ebtg tracey_thorn ben_watt))) • (defrule band-members (member_bands (member-of ?band $? ?member $?)) => (printout t ?member " is a member of " ?band crlf))

multi_member.CLP • (deftemplate member_bands (multislot member-of)) • (deffacts nama_band (member_bands (member-of beatles john_lennon paul_mccartney george_harrison ringo_starr)) (member_bands (member-of who roger_daltrey pete_townsend keith_moon)) (member_bands (member-of ebtg tracey_thorn ben_watt))) • (defrule band-members (member_bands (member-of ?band $?members)) => (printout t "The members of " ?band " are " $?members crlf))

VARIABEL

variabel.CLP (deftemplate variabel (slot number)) (deftemplate jumlah (slot total)) (deffacts nilai (variabel (number 4)) (variabel (number 6))) (defrule addup (variabel (number ?x)) (variabel (number ?y)) => (bind ?total (+ ?x ?y)) (printout t ?x " + " ?y " = " ?total crlf) (assert (jumlah (total ?total))))

defglobal.CLP (defglobal ?*var1* = 17 ?*oranges* = "seven") (deftemplate variabel (slot number)) (deftemplate jumlah (slot total)) (deffacts nilai (variabel (number 24))) (defrule addup (variabel (number ?x)) => (bind ?total (- ?x ?*var1*)) (printout t ?x " - " ?*var1* " = " ?total "(" ?*oranges* ")" crlf) (assert (jumlah (total ?total))))

Function Templates and Conditions

birthday.CLP (defrule birthday_is ?ulang_tahun <- (ultah (birthday ?name)) ?data-fact <- (personal-data (name ?name) (age ?age)) => (modify ?data-fact (age (+ ?age 1))) (retract ?ulang_tahun))

tes_weight.CLP (deftemplate personal-data (slot name) (slot age) (slot weight) (slot height) (multislot blood-pressure)) (deffacts people (personal-data (name Andrew) (age 20) (weight 180) (height 188) (blood-pressure )) (personal-data (name Cyril) (age 63) (weight 70) (height 1678) (blood-pressure ))) (defrule lardy-bugger (personal-data (name ?name) (weight ?weight)) (test (> ?weight 100)) => (printout t ?name " weighs " ?weight " kg - the fat sod." crlf))

print_age.CLP (deftemplate personal-data (slot name) (slot age) (slot weight) (slot height) (multislot blood-pressure)) (deffacts people (personal-data (name Andrew) (age 120) (weight 80) (height 188) (blood- pressure )) (personal-data (name Cyril) (age 63) (weight 70) (height 1678) (blood- pressure ))) (defrule print-ages (and (personal-data (name ?name) (age ?age)) (personal-data (name ?name) (weight ?weight))) => (printout t ?name " weighs " ?weight " at " ?age " years old." crlf))

umbrella.CLP (deftemplate umbrella (slot weather)) (deffacts cuaca (umbrella (weather raining)) (umbrella (weather snowing)) ; mencoba dihilangkan fakta ini (umbrella (weather sunny))) (defrule take-an-umbrella (or (umbrella (weather raining)) (umbrella (weather snowing))) => (printout t "Take an umbrella" crlf)) (defrule notTake-an-umbrella (not (umbre lla (weather sunny))) => (printout t “Not Take an umbrella" crlf))

not_birthday.CLP (deftemplate personal-data (slot name) (slot age) (slot weight) (slot height) (multislot blood-pressure)) (deftemplate ultah (slot birthday)) (deffacts is_ultah (ultah (birthday Andrew))) (deffacts people (personal-data (name Andrew) (age 120) (weight 80) (height 188) (blood-pressure )) (personal-data (name Cyril) (age 63) (weight 70) (height 1678) (blood-pressure ))) (defrule not-birthday (personal-data (name ?name) (weight ?weight)) (not (ultah (birthday ?name))) => (printout t "It's not " ?name "'s birthday" crlf))

pointless.CLP (defrule pointless (test (> 6 5)) => (printout t "Six is indeed greater than five" crlf))

exist_forall.CLP (deftemplate personal-data (slot name) (slot age) (slot weight) (slot height) (multislot blood-pressure)) (deffacts people (personal-data (name Andrew) (age 20) (weight 80) (height 188) (blood-pressure )) (personal-data (name Cyril) (age 63) (weight 70) (height 1678) (blood-pressure ))) (defrule person-exists (personal-data (name ?name)) => (printout t "Rule person exists reports there is a person called " ?name crlf))

Lanjutan (defrule are-there-people (exists (personal-data (name ?name))) => (printout t "Rule are-there-people reports there is at least one person" crlf)) (defrule check-each-person (forall (personal-data (name ?name) (age ?umur)) (personal-data (name ?name) (weight ?berat))) => (printout t "Rule check-each-person reports that all persons have a name" crlf))

Summary •(deftemplate (slot slotname1) (slot slotname1)) •(and (predicate1) (predicate2)) •(or (predicate1) (predicate2)) •(not (predicate1)) •(test (predicate1)) •(exists (pattern)) •(forall (pattern1) (pattern2) )