About KnowledgeWorks
Hi,
I'm trying KnowledgeWorks now.
Could you tell me how to consult " male (X) .." or " father (X , Y)." on Common Prolog?
I'd appreciate your help.
- Hiroki
I'm trying KnowledgeWorks now.
I'd like to run a example of family tree.
The fact file(familytree.pl) is:
******************************************************************************************
male(dicky).
male(dicky).
male(randy).
male(mike).
male(don).
male(elmer).
female(anne).
female(rosie).
female(esther).
female(mildred).
female(greatgramma).
male(blair).
male(god).
female(god).
parent(don,randy).
parent(don,mike).
parent(don,anne).
parent(rosie,randy).
parent(rosie,mike).
parent(rosie,anne).
parent(elmer,don).
parent(mildred,don).
parent(esther,rosie).
parent(esther,dicky).
parent(greatgramma,esther).
parent(randy,blair).
father(X,Y) :- male(X),parent(X,Y).
mother(X,Y) :- female(X),parent(X,Y).
son(X,Y) :- male(X),parent(Y,X).
daughter(X,Y) :- female(X),parent(Y,X).
******************************************************************************************
To consult the file, I type "male(X). " on SWI-prolog's console,
To consult the file, I type "male(X). " on SWI-prolog's console,
and the Prolog find the fact and fill in names on by one by typing " ; " .
On KnowledgeWorks, I launch KnowledgeWorks Listener, and load the "familytree.pl" through "consult" button of the menu.
On KnowledgeWorks, I launch KnowledgeWorks Listener, and load the "familytree.pl" through "consult" button of the menu.
But I don't know how to ask some questions to "*.pl" file on KnowledgeWorks.
Could you tell me how to consult " male (X) .." or " father (X , Y)." on Common Prolog?
I'd appreciate your help.
- Hiroki