Artificial Intelegence Pertemuan 5

advertisement
Kuliah Sistem Pakar
Pertemuan V
“Representasi Pengetahuan”
Tujuan Pembelajaran




Mengerti perang proses RPL terhadap Rekayasa Pengetahuan
Mengerti Representasi Pengetahuan, tipe-tupe
Mengetahui Tipe – Tipe Representasi Pengetahuan
Mampu menjelaskan konsep Skema Representasi Pengetahuan
Proses Rekayasa Pengetahuan
(Knowledge Engineering Process)
Validasi
Pengetahuan
Sumber
Pengetahuan
Akuisisi
Pengetahuan
Basis
Pengetahuan
Representasi
Pengetahuan
Pengkodean
Justifikasi
Penjelasan
Inferensi
Knowledge Representation

Knowledge Representation is concerned with
storing large bodies of useful information in a
symbolic format.


Most commercial ES are rule-based systems
where the information is stored as rules.
Frames may also be used to complement rule-based
systems.
Tipe-tipe Pengetahuan berdasar
Sumber

Deep Knowledge
(formal knowledge)

Shallow /Surface Knowledge
(non formal knowledge)
Penjelasan ………

Deep
knowledge
atau
pengetahuan
formal,
pengetahuan bersifat umum yang terdapat dalam
sumber pengetahuan tertentu (buku, jurnal, buletin ilmiah
dsb) dan dapat diterapkan dalam tugas maupun kondisi
berbeda.

Shallow knowledge atau pengetahuan non formal,
pengetahuan-pengetahuan praktis dalam bidang tertentu
yang diperoleh seorang pakar pengalamannya pada
bidang dalam jangka waktu cukup lama.
Tipe-tipe Pengetahuan berdasar Cara
Merepresentasikan

Pengetahuan Heuristik

Pengetahuan Prosedural

Pengetahuan Deklaratif
Representasi Pengetahuan






Propotional Logic (logika proposional)
Semantic Network (jaringan semantik)
Script, List, Table, dan Tree
Object, Attribute, dan Values
Production Rule (kaidah produksi)
Frame
Representation in Logic and
Other Schemas




General form of any logical process
Inputs (Premises)
Premises used by the logical process to
create the output, consisting of
conclusions (inferences)
Facts known true can be used to derive
new facts that also must be true

Two Basic Forms of Computational Logic


Propositional logic (or propositional calculus)
Predicate logic (or predicate calculus)

Symbols represent propositions, premises or
conclusions
Statement: A = The mail carrier comes Monday
through Friday.
Statement: B = Today is Sunday.
Conclusion: C = The mail carrier will not come
today.

Propositional logic: limited in representing
real-world knowledge
Propositional Logic



A proposition is a statement that is either true or
false
Once known, it becomes a premise that can be used
to derive new propositions or inferences
Rules are used to determine the truth (T) or falsity (F)
of the new proposition
Propotional Logic

Logic dapat digunakan untuk melakukan penalaran :
Input
Premise
atau
Fakta-Fakta
Proses
Logik
Output
Inferensi
atau
Konklusi
Contoh :
Pernyataan A = Pak Pos datang hari Senin
sampai Sabtu
Pernyataan B = Hari ini hari Minggu
Kesimpulan C = Pak Pos tidak akan datang hari ini
Predicate Calculus




Predicate logic breaks a statement down into
component parts, an object, object
characteristic or some object assertion
Predicate calculus uses variables and
functions of variables in a symbolic logic
statement
Predicate calculus is the basis for Prolog
(PROgramming in LOGic)
Prolog Statement Examples
 comes_on(mail_carrier, monday).
 likes(jay, chocolate).
(Note - the period “.” is part of the statement)
Jaringan Semantik




Merupakan gambaran pengetahuan
berbentuk grafis dan menunjukkan
hubungan antar berbagai obyek.
Obyek, berupa benda atau peristiwa
Nodes
Obyek
Arc (Link)
Keterhubungan
(Relationships)
* is a
* has a
Contoh :
1)
Human
Being
Boy
Needs
Goes to
School
Woman
Joe
Food
Has
a child
Kay
16
2)
ANAK
LAKILAKI
adalah
adala
h
SEKOLAH
pergi
ke
PEREMPUAN
adala
h
JOE
perlu
adala
h
LAKILAKI
KAY
mempunya
i
anak
kawin
dengan
merk
berwarna
MERCEDES
BENZ
buatan
PERAK
JERMAN
MAKANAN
adalah
punya
MOBIL
MANUSIA
jabatan
SAM
bermain
GOLF
adalah
OLAHRAGA
WAKIL
PRESDIR
bekerja
di
ACME
anak
perusahaa
n
AJAX
Script, List, Table, dan Tree
Scripts
SCRIPT,


skema representasi pengetahuan yang
menggambarkan urutan dari kejadian. Elemen-elemen
script terdiri dari :
Elements include
 Entry Conditions
 Props
 Roles
 Tracks
 Scenes
Contoh : Script “Ujian Akhir Semester”
List



LIST,
daftar
tertulis
dari
item-item
yang
saling
berhubungan.
Umumnya digunakan untuk merepresentasikan
hirarki pengetahuan dimana suatu obyek
dikelompokan, dikategorikan sesuai dengan
 Rank or
 Relationship
Contoh : berupa daftar orang yang anda kenal,
benda-benda yang harus dibeli di pasar swalayan,
hal-hal yang harus dilakukan minggu ini, atau
produk-produk dalam suatu katalog.
Decision Tabel


DECISION TABLE, pengetahuan yang diatur dalam
format lembar kerja atau spreadsheet, menggunakan
kolom dan baris.
Attribute List
Conclusion List
Different attribute configurations are matched against
the conclusion
Contoh :… ?
Decision Trees

DECISION TREE, tree yang berhubungan dengan decision

table namun sering digunakan dalam analisis sistem komputer
(bukan sistem AI).
Contoh :… ?




Related to tables
Similar to decision trees in decision theory
Can simplify the knowledge acquisition process
Knowledge diagramming is frequently more
natural to experts than formal representation
methods
Object, Attribute, Values
OBJECT :
 OBJECT dapat berupa fisik atau konsepsi.
ATTRIBUTE :
 ATTRIBUTE adalah karakteristik dari object.
VALUES :
 VALUES adalah ukuran spesifik dari attribute dalam
situasi tertentu
Object
Attribute
Values
Rumah
Kamar tidur
2,3,4, dsb.
Rumah
Warna
Hijau, Putih,
Coklat dsb.
Diterima di
Universitas
Nilai Ujian
masuk
A, B, C atau D
Pengendalian
persedian
Level persediaan
15, 20, 25, 35,
dsb.
Kamar tidur
Ukuran
3x4, 5x6, 4x5,
dsb.
Production Rules
PRODUCTION RULES:

Production system dikembangkan oleh
Newell dan Simon sebagai model dari
kognisi manusia. Ide dasar dari sistem ini
adalah pengetahuan digambarkan sebagai
production rules dalam bentuk pasangan
kondisi-aksi.
Production Rules

Condition-Action Pairs
 IF this condition (or premise or antecedent)
occurs,
 THEN some action (or result, or conclusion, or
consequence) will (or should) occur
 IF the stop light is red AND you have stopped,
THEN a right turn is OK




Each production rule in a knowledge base represents
an autonomous chunk of expertise
When combined and fed to the inference engine, the
set of rules behaves synergistically
Rules can be viewed as a simulation of the cognitive
behavior of human experts
Rules represent a model of actual human behavior
Contoh : Production Rules

RULE 1 :
JIKA konflik internasional mulai
MAKA harga emas naik

RULE 2 :
JIKA laju inflasi berkurang
MAKA harga emas turun

RULE 3
:
JIKA konflik internasional
berlangsung lebih dari tujuh
hari dan
JIKA konflik terjadi di Timur
Tengah
MAKA beli emas
Production Rules

Condition-Action Pairs
 IF this condition (or premise or
antecedent) occurs,
 THEN some action (or result, or
conclusion, or consequence) will (or
should) occur

IF the stop light is red AND you have
stopped, THEN a right turn is OK




Each production rule in a
knowledge base represents an
autonomous chunk of expertise
When combined and fed to the
inference engine, the set of rules
behaves synergistically
Rules can be viewed as a
simulation
of
the
cognitive
behavior of human experts
Rules represent a model of actual
human behavior
Forms of Rules

IF premise, THEN conclusion
 IF your income is high,
 THEN your chance of being audited by the
IRS is high

Conclusion, IF premise
 Your chance of being audited is high, IF
your income is high


Inclusion of ELSE
 IF your income is high, OR your deductions are
unusual, THEN your chance of being audited by
the IRS is high, OR ELSE your chance of being
audited is low
More Complex Rules
 IF credit rating is high AND salary is more than
$30,000, OR assets are more than $75,000, AND
pay history is not "poor," THEN approve a loan up
to $10,000, and list the loan in category "B.”
 Action part may have more information: THEN
"approve the loan" and "refer to an agent"
Frame

FRAME adalah struktur data yang berisi semua
pengetahuan tentang obyek tertentu. Pengetahuan
ini diatur dalam suatu struktur hirarkis khusus yang
memperbolehkan diagnosis terhadap independensi
pengetahuan. Frame pada dasarnya adalah aplikasi
dari pemrograman berorientasi objek untuk AI dan
ES.

Setiap frame mendefinisikan satu objek, dan terdiri
dari dua elemen : slot (menggambarkan rincian dan
karakteristik obyek) dan facet.
Frames





Frame: Data structure that includes all the
knowledge about a particular object
Knowledge organized in a hierarchy for diagnosis of
knowledge independence
Form of object-oriented programming for AI and ES.
Each Frame Describes One Object
Special Terminology
Contoh Frame
Automobile Frame
Class of : Transportation
Name of Manufacturer : Audi
Origin of Manufacturer : Germany
Model : 5000 turbo
Type of Car : Sedan
Weight : 3000 lbs.
Wheelbase : 105.8 inches
Number of doors : 4 (default)
Transmission : 3-speed (automatic)
Number of wheels : 4 (default)
Gas mileage : 22 mpg average (procedural attachment)
Engine Frame
Cylinder bore : 3.19 inches
Cylinder stroke : 3.4 inches
Compression ratio : 7.8 to 1
Fuel system : Injection with turbocharger
Horsepower : 140 hp
Torque : 160 ft/Lbs
Hirarki Frame (exp : Vehicle)
Vehicle
Frame
Train
Frame
Boat
Frame
Car
Frame
Airplane
Frame
Submarine
Frame
Passenger
Car Frame
Truck
Frame
Bus
Frame
Compact
Car Frame
Toyota
Corolla Frame
Mary’s Car
Frame
Midsize
Car Frame
Mitsubishi
Lancer Frame
Jan’s Car
Frame
Advantages and Disadvantages of Different Knowledge
Representations
Scheme
Advantages
Disadvantages
Production
rules
Simple syntax, easy to
understand, simple
interpreter, highly modular,
flexible (easy to add to or
modify)
Hard to follow hierarchies,
inefficient for large systems,
not all knowledge can be
expressed as rules, poor at
representing structured
descriptive knowledge
Semantic
networks
Easy to follow hierarchy,
easy to trace associations,
flexible
Meaning attached to nodes
might be ambiguous,
exception handling is
difficult, difficult to
program
Frames
Expressive power, easy to set Difficult to program,
up slots for new properties
difficult for inference, lack
and relations, easy to create
of inexpensive software
specialized procedures, easy
to include default information
and detect missing values
Formal logic
Facts asserted independently
of use, assurance that all and
only valid consequences are
asserted (precision),
completeness
Separation of
representation and
processing, inefficient with
large data sets, very slow
with large knowledge bases
Sampai Jumpa
di
Pertemuan VI
Selamat Belajar
Download