Jump to content

win prolog


redo

Recommended Posts

haii have a task about expert systemfor instance...user choose a few symptom then my system will generate the disease.i really dont know anything about expert system.However i found that in order to develop expert system i can use win prolog and flex.So anyone who have sample coding or anything about that.Please help me i really need it

Link to comment
Share on other sites

Are you kidding? Have you ever seen Prolog? I spent more then a month studying Prolog in college and still don't know it very well, you think a few examples are going to allow you to write a program?Here, here's a Prolog program that will figure out who is a son or daughter or parent or aunt or grandparent or whatever of someone else. Good luck.

man(adam). man(peter). man(paul).   woman(marry). woman(eve).parent(adam,peter).parent(eve,peter). parent(adam,paul). parent(marry,paul).father(F,C):-man(F),parent(F,C). mother(M,C):-woman(M),parent(M,C).is_father(F):-father(F,_). is_mother(M):-mother(M,_).son(S,P):-man(S),parent(P,S). daughter(D,P):-woman(D),parent(P,D).   siblings(A,B):-parent(P,A),parent(P,B),A\=B.  full_siblings(A,B):- parent(F,A),parent(F,B),parent(M,A),parent(M,B),A\=B, F\=M.  full_siblings2(A,B):- father(F,A),father(F,B),mother(M,A),mother(M,B),A\=B.  uncle(U,N):-man(U),siblings(U,P),parent(P,N).aunt(A,N):-woman(A),siblings(A,P),parent(P,N).  grand_parent(G,N):-parent(G,X),parent(X,N).

Link to comment
Share on other sites

  • 2 weeks later...

lol the point justsomeguy is making is don't use prolong.PHP (or ASP.Net) is perfectly capable (and much easier) for creating a knowledge base system.You will need to knowHTMLCSSPHPMySQLHTML and CSS will make up the structure and presentation of your pages. PHP and MySQL will store, retrieve, and display the data.

Link to comment
Share on other sites

Prolog is a great language for things like this, it's pretty much what it's specifically designed for. They call it PROgramming in LOGic, a lot of AI systems use this because the program can eventually start to teach itself facts from what it learns.But this isn't something you post on a forum and just figure out. This is something you spend two years in college studying and working on, it's pretty complex stuff. There's a reason why they call these "expert systems". If you're going to create an expert, you probably need to be one yourself.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...