Kamis, 24 Desember 2009

Development of Simple Expert System for Market Lodging in The City of Surabaya

INTRODUCTION
As hard to find lodging in the city that we do not know, for example Budi from Mataram to be in college in the city of Surabaya, but he was puzzled to find lodging. From the example of this event we have an idea to create a market for the city of Surabaya lodging very useful for people new or old are hard to find lodging in Surabaya. So people like that make it easier to find lodging in the city of Surabaya because here we provide complete address information, contact person, price, and the status of lodging room.

WHAT IS EXPERT SYSTEM
An expert system is software that attempts to provide an answer to a problem, or clarify uncertainties where normally one or more human experts would need to be consulted. Expert systems are most common in a specific problem domain, and is a traditional application or subfield of artificial intelligence. A wide variety of methods can be used to simulate the performance of the expert however common to most or all are 1) the creation of a so-called "knowledgebase" which uses some knowledge representation formalism to capture the Subject Matter Expert's (SME) knowledge and 2) a process of gathering that knowledge from the SME and codifying it according to the formalism, which is called knowledge engineering. Expert systems may or may not have learning components but a third common element is that once the system is developed it is proven by being placed in the same real world problem solving situation as the human SME, typically as an aid to human workers or a supplement to some information system.

There are various expert systems in which a rulebase and an inference engine cooperate to simulate the reasoning process that a human expert pursues in analyzing a problem and arriving at a conclusion. In these systems, in order to simulate the human reasoning process, a vast amount of knowledge needed to be stored in the knowledge base. Generally, the knowledge base of such an expert system consisted of a relatively large number of "if then" type of statements that were interrelated in a manner that, in theory at least, resembled the sequence of mental steps that were involved in the human reasoning process.

EXPERT SYSTEM DESIGN
This expert system uses the search system lodging in the city of Surabaya is done by entering the desired name of village and will produce a complete address information, contact person, price, and the status of lodging rooms.

EXPERT SYSTEM DEVELOPMENT
Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics. Prolog has its roots in formal logic, and unlike many other programming languages, Prolog is declarative : The program logic is expressed in terms of relations, represented as facts and rules. Execution is triggered by running queries over these relations.

While initially aimed at natural language processing, the language has since then stretched far into other areas like theorem proving, expert systems, games, automated answering systems, ontologies and sophisticated control systems. Modern Prolog environments support the creation of graphical user interfaces, as well as administrative and networked applications.

FACT and RULES





EXPERT SYSTEM TEST CASE AND RESULT
Bellows are the example of test case result, it can determine the desease:





CONCLUSION
The Expert system can effectively help people in distress looking for lodging surabaya city.

Selasa, 22 Desember 2009

INPUT AND OUTPUT in PROLOG part.2

1. menampilkan kuadrat dari integers N1 sampai N2. Misalnya N1=6 dan N2=12, maka hasilnya :
36
49
64
81
100
121
144
end.
base – case nya adalah jika first = last , output_values (12,12) jika sudah tercapai kondisi ini, looping berhenti dan tampilkan last*last. Kalau kondisi masih First < last, maka first ditambah 1 terus. lalu tampilkan fisrt*first.
definisi predikat dengan notepad, lalu save dengan *pl.



Setelah itu consult di prolog, maka ouputputnya :



2. program berikut ini untuk membaca characters yang dimasukkan oleh user satu persatu dan menampilkannya kembali. Looping pembacaan karakter berhenti jika sampai pada new line atau pada “?”
contoh:



test dengan mengetikkan go, lalu ketikkan sembarang kata. Bisa dilihat bahwa jika yang dimasukkan yaya? karakter “?” tidak dibaca.



3. Untuk menyelesaikan masalah ini kita harus membuat klausa. Karena yang akan dimunculkan itu adalah profesi dan ada ketentuan umur, maka minimal kita membuat 2 klausa. Nama klausanya bebas maka contoh yang kami berikan adalah :
nama(reza,ibab,18,mataram,mahasiswa).
nama(deno,ucup,42,bali,polisi).
nama(tery,teko,55,maluku,pedagang).
nama(alshaf,pepenk,27,sidoarjo,satpam).
nama(rizky,tono,60,makassar,dokter).
Penulisan argument dalam klausa harus huruf kecil.
Agar klausa tadi dapat digunakan maka harus dibuat predikat formatnya seperti dibawah ini. Kata-kata yang ada boleh diganti.
cariProfesi:- orang(_,_,umur,_,Prof),umur>40,write(‘Profession adalah ‘),write(Prof),nl,fail.
cariProfesi:
Agar bisa digunakan maka harus ditulis dalam notepad dengan cara seperti dibawah ini :



Kemudian setelah di consult hasilnya :




Setelah di consult hasilnya yang keluar hanya dokter, polisi, pedagang, hal ini karena yang memiliki profesi ini umurnya lebih dari 40 ,sesuai yang diinginkan soal no 3.

INPUT AND OUTPUT in Prolog

1. Mengubah dari Upper ke Lower
- pertama buat predikat make lower dengan notedpad dan rumus agar tulisan huruf bessar bisa menjadi huruf kecil. Contoh :



Angka 65>=X<=90, dimana huruf besar itu berada dalam ambang 65-90(menurut ASCII). Angka 32 itu untuk mencetak spasi.
- simpan dalam .pl
- buka prolog dan consult
- ketik makelower, diakhiri titik(.)
- Tulis kata-kata yang diinginkan dengan huruf besar,contoh :

SISTEM INFORMASI dan Institut Teknologi Sepuluh Nopember.
- Maka hasilnya :

2. Sama seprti no. 1 membuat predikat dan rumusnya di dalam notepad, contoh :

- simpan dalam .pl
- buka prolog dan consult
- ketik copyterms yang diakhiri titik(.)
- Maka hasilnya :


3. Membuat predikat readfile di dalam notepad

- simpan dalam .pl
- buka prolog dan consult
- ketik readfile yang diakhiri titik(.)
- Tulis abcde fghij
- Maka hasilnya :

4. buat dua file text seperti berikut :

lalu buat file .pl seperti di bawah ini :

maka, hasil outputnya seperti ini :

Jumat, 20 November 2009

RESUME CHAPTER 4

1. Arithmetic
Prolog menyediakan fasilitas untuk melakukan penghitungan aritmatik menggunakan notasi-notasi yang mirip dengan aljabar dasar. Pada perhitungan aritmatika menggunakan built in perdikat ,dimana argumen 1 terikat pada argumen 2 sedangkan argumen 2 berupa angka atau tanda aritmatik lainnya.

2. Operators
Ada bentuk lain untuk menulis suatu predikat selain bentuk standar yang sudah dipelajari pada bab sebelumnya.

a. Operator Aritmatika
Adalah operator yang biasanya digunakan dalam pemrgograman menggunakan prolog. Berikut adalah operator-operatornya:
1. X+Y (penjumlahan dari X ditambah Y)
2. X-Y (selisih dari X dikurangi Y)
3. X*Y (hasil perkalian dari X dan Y)
4. X/Y (hasil pembagian dari X dibagi oleh Y)
5. X//Y the 'integer quotient' of X and Y (the result is truncated to the nearest integer between it and zero)
6. X^Y (nilai dari X pangkat Y)
7. -X (nilai negatif dari X)

b. Fungsi Aritmatika
Adalah fungsi yang biasanya digunakan dalam proses aritmarika dengan menggunakan prolog. Berikut contoh penggunaan dari masing-masing fungsi:
contoh penggunaan dari masing-masing fungsi :
sin(X) (nilai sinus dari X untuk X dalam derajat)
cos(X) (nilai cosinus dari X untuk X dalam derajat)
abs(X) (nilai absolut dari X)
max(X,Y) (menentukan mana yang lebih besar antara X dan Y)
sqrt(X) (nilai dari X akar pangkat dua)

c. Pengutamaan Operator Dalam Ekspresi Aritmatika
Dalam prolog, proses aritmatika juga menggunakan konsep aljabar.
Contoh:
a-b*c+d
proses di atas akan dibaca sebagai berikut, b dikali c kemudian dikurang a dan ditambah d. Hal ini sesuai dengan konsep aljabar yang selama ini kita telah pelajari. Di sini juga berlaku proses pengkhususan menggunakan dalam kurung.
Contoh:
(a+b)*(c+d)
proses di atas akan dibaca sebagai berikut, a ditambah b, c ditambah d dan kemudian kedua hasil akan dikalikan.

d. Relational Operators
Operator seperti =, !=, >,>=, <, =<, dapat digunakan di Prolog. Digunakan untuk membandingkan dua variabel. Contoh: a != b artinya a tidak sama dengan b a<= b artinya a lebih kecil sama dengan b 3. Operator Pembanding Berikut merupakan daftar dari equality operators yang digunakan dalam prolog beserta fungsi dari masing-masing operator. --> Arithmetic Expression Inequality =\=
--> Arithmetic Expression Equality =:=
--> Terms Not Identical \==
--> Terms Identical ==
--> Terms Identical With Unification =
--> Non-Unification Between Two Terms \=

4. Operator Logika
a. Operator Not
Operator not dapat ditempatkan sebelum predikat untuk memberikan negasi. Predikat yang dinegasikan bernilai benar jika predikat yang asli salah dan bernilai salah jika predikat yang asli benar. Berikut contoh penggunaan operator not :
dog(fido).
?- not dog(fido).
no
?- dog(fred).
no
?- not dog(fred).
yes
?- X=0,X is 0.
X = 0
?- X=0,not X is 0.
no

b. Operator Disjungsi
Operator disjungsi (;) digunakan sebagai operator ‘atau’. Contoh :
?- 6<3;7>
yes

?- 6*6=:=36;10=8+3.
yes

Kamis, 19 November 2009

OPERATOR AND ARITHMETIC

Jawaban Exercise 4 no 1

1. Langkah pertama, copy dulu rulenya dalam notepad dan simpan dalam format .pl seperti pada contoh gambar di bawah


2. Kemudian melalui prolog buka file tersebut
3. Untuk menjalankan prolognya ketik contoh(5,6).atau pred(5,6). kemudian enter
4. Dan hasilnya dapat dilihat pada gambar di bawah ini.

Jawaban Exercise 4 no 2

1. Langkah pertama sama seperti di atas, kita copy dahulu rulenya di notepad kemudian save dalam format .pl seperti gambar di bawah


2. Kemudian melalui prolog buka file tersebut
3. Untuk menjalankan prolog ini ketikan X chase Y. sehingga tampilan prolog seperti pada gambar di bawah ini

EXPERT SYSTEM

An expert system is software that attempts to provide an answer to a problem, or clarify uncertainties where normally one or more human experts would need to be consulted. Expert systems are most common in a specific problem domain, and is a traditional application and/or subfield of artificial intelligence. A wide variety of methods can be used to simulate the performance of the expert however common to most or all are 1) the creation of a so-called "knowledgebase" which uses some knowledge representation formalism to capture the Subject Matter Expert's (SME) knowledge and 2) a process of gathering that knowledge from the SME and codifying it according to the formalism, which is called knowledge engineering. Expert systems may or may not have learning components but a third common element is that once the system is developed it is proven by being placed in the same real world problem solving situation as the human SME, typically as an aid to human workers or a supplement to some information system.

The following general points about expert systems and their architecture have been illustrated.

1. The sequence of steps taken to reach a conclusion is dynamically synthesized with each new case. It is not explicitly programmed when the system is built.

2. Expert systems can process multiple values for any problem parameter. This permits more than one line of reasoning to be pursued and the results of incomplete (not fully determined) reasoning to be presented.

3. Problem solving is accomplished by applying specific knowledge rather than specific technique. This is a key idea in expert systems technology. It reflects the belief that human experts do not process their knowledge differently from others, but they do possess different knowledge. With this philosophy, when one finds that their expert system does not produce the desired results, work begins to expand the knowledge base, not to re-program the procedures.

There are various expert systems in which a rulebase and an inference engine cooperate to simulate the reasoning process that a human expert pursues in analyzing a problem and arriving at a conclusion. In these systems, in order to simulate the human reasoning process, a vast amount of knowledge needed to be stored in the knowledge base. Generally, the knowledge base of such an expert system consisted of a relatively large number of "if then" type of statements that were interrelated in a manner that, in theory at least, resembled the sequence of mental steps that were involved in the human reasoning process.

Because of the need for large storage capacities and related programs to store the rulebase, most expert systems have, in the past, been run only on large information handling systems. Recently, the storage capacity of personal computers has increased to a point where it is becoming possible to consider running some types of simple expert systems on personal computers.

In some applications of expert systems, the nature of the application and the amount of stored information necessary to simulate the human reasoning process for that application is just too vast to store in the active memory of a computer. In other applications of expert systems, the nature of the application is such that not all of the information is always needed in the reasoning process. An example of this latter type application would be the use of an expert system to diagnose a data processing system comprising many separate components, some of which are optional. When that type of expert system employs a single integrated rulebase to diagnose the minimum system configuration of the data processing system, much of the rulebase is not required since many of the components which are optional units of the system will not be present in the system. Nevertheless, earlier expert systems require the entire rulebase to be stored since all the rules were, in effect, chained or linked together by the structure of the rulebase.

When the rulebase is segmented, preferably into contextual segments or units, it is then possible to eliminate portions of the Rulebase containing data or knowledge that is not needed in a particular application. The segmenting of the rulebase also allows the expert system to be run with systems or on systems having much smaller memory capacities than was possible with earlier arrangements since each segment of the rulebase can be paged into and out of the system as needed. The segmenting of the rulebase into contextual segments requires that the expert system manage various intersegment relationships as segments are paged into and out of memory during execution of the program. Since the system permits a rulebase segment to be called and executed at any time during the processing of the first rulebase, provision must be made to store the data that has been accumulated up to that point so that at some time later in the process, when the system returns to the first segment, it can proceed from the last point or rule node that was processed. Also, provision must be made so that data that has been collected by the system up to that point can be passed to the second segment of the rulebase after it has been paged into the system and data collected during the processing of the second segment can be passed to the first segment when the system returns to complete processing that segment.

The user interface and the procedure interface are two important functions in the information collection process.

Another major distinction between expert systems and traditional systems is illustrated by the following answer given by the system when the user answers a question with another question, "Why", as occurred in the above example. The answer is:

A. I am trying to determine the type of restaurant to suggest. So far Chinese is not a likely choice. It is possible that French is a likely choice. I know that if the diner is a wine drinker, and the preferred wine is French, then there is strong evidence that the restaurant choice should include French.

It is very difficult to implement a general explanation system (answering questions like "Why" and "How") in a traditional computer program. An expert system can generate an explanation by retracing the steps of its reasoning. The response of the expert system to the question WHY is an exposure of the underlying knowledge structure. It is a rule; a set of antecedent conditions which, if true, allow the assertion of a consequent. The rule references values, and tests them against various constraints or asserts constraints onto them. This, in fact, is a significant part of the knowledge structure. There are values, which may be associated with some organizing entity. For example, the individual diner is an entity with various attributes (values) including whether they drink wine and the kind of wine. There are also rules, which associate the currently known values of some attributes with assertions that can be made about other attributes. It is the orderly processing of these rules that dictates the dialog itself.

Kamis, 15 Oktober 2009

TUTORIAL


1. ketik di notepad:
tony(100).
tono(80).
tony(75).
tono(60).

2. save dengan format .pl

3. lalu masuk prolog,pilih consult,ketik tono(X),tony(Y).
tekan enter dan tekan ;
sampai habis

Rabu, 14 Oktober 2009

Biografi Alshaf Febrianggara


Saya alsaf ato biasa dipanggil Pepenx syalala...
saya lahir di Sidoarjo tanggal 1 February 1991
saya menempuh pendidikan di SDN Pucabg 1 Sidoarjo, SMP 3 Sidoarjo dan SMAN 3 Sidoarjo
saat ini saya kuliah di ITS Surabaya dan mengambil jurusan sistem Informasi dan Pelajaran Favorite saya adalah matematika diskrit

Biografi Reza Putra Jawara


Saya biasa dipanggil ibab...
saya lahir di Mataram tanggal 4 juli 1991, Saya SD, SMP dan SMA di Mataram
dan sekarang saya kuliah di ITS surabaya, saya mengambil jurusan Sistem Informasi dan menjadi komting 2009
E-mail : reza_naughtyghost2017@yahoo.com

Biografi Terry Oktora


Hallo semua nama saya Terry...
saya lahir di Mataram tanggal 16 oktober 1990, saya sekolah di SD 7 Ampenan setelah itu melanjutkan ke SMP 2 Mataram dan SMA 1 Mataram
setelah lulus SMA saya memutuskan untuk masuk ITS dan mengambil jurusan Sistem Informasi
E-mail : trey182x@gmail.com