Discussion of Common Lisp
-
knightz
Post
by knightz » Sun Apr 05, 2009 1:38 am
hi i just started learning LISP like 1 months ago. so i'm just really not that good with it.
anyways, i'm suppose to do like program about disease and their symptoms using common lisp.basically the program will ask if the patient have this symptoms or not, the patient suppose to answer yes or no,then the system will just tell the patient of their disease. i did a few try but failed though. so this is my last resort. if none of you guys know.. im not gonna try anymore. haha.. maybe i should give up on LISP and take on VB instead. lol
-
findinglisp
- Posts: 447
- Joined: Sat Jun 28, 2008 7:49 am
- Location: Austin, TX
-
Contact:
Post
by findinglisp » Tue Apr 07, 2009 8:54 am
You might want to buy the book
Paradigms of Artificial Intelligence Programming. It's a great book both about AI as well as Common Lisp. All the examples in the book are done in CL, including a pretty sophisticated medical diagnosis program (based on some of the MYCIN work, if I remember right). If you want to do a simpler version of that, then the basic "what animal am I thinking of?" program might be what you're looking for. Try Paul Graham's
On Lisp, which you can find online.
-
Jasper
- Posts: 209
- Joined: Fri Oct 10, 2008 8:22 am
- Location: Eindhoven, The Netherlands
-
Contact:
Post
by Jasper » Tue Apr 07, 2009 9:25 am
You mean multiple choice questions, like ones where you have a bunch of boxes with questions with lines yes/no leading to other boxes? And those eventually leading to some kind of advice?
-
gugamilare
- Posts: 406
- Joined: Sat Mar 07, 2009 6:17 pm
- Location: Brazil
-
Contact:
Post
by gugamilare » Tue Apr 07, 2009 10:35 am
This is a very simple task. I'm not going to make everything for you, but, if you can make an algorithm (e.g. in pseudo-language) then it is very simple to transform it into Common Lisp. If you have the algorithm and cannot translate it into CL, you should try learning a bit of CL first.
-
Balooga
- Posts: 14
- Joined: Tue Jul 15, 2008 1:20 pm
Post
by Balooga » Tue Apr 07, 2009 12:02 pm
You need to read up on 'Expert Systems'.
-
Paul Donnelly
- Posts: 148
- Joined: Wed Jul 30, 2008 11:26 pm
Post
by Paul Donnelly » Tue Apr 07, 2009 1:09 pm
You should approach this from a data-directed angle. If you have a tree like the following, how would you write a function that read out the questions and took the right branch based on the answer?
Code: Select all
("Are you breathing?" ("Are you bleeding?" "You have a cut."
"You're fine.")
"You're dead.")
Or you might choose a different data representation based on what you like. This is just to illustrate that if you put the data in the right format for your problem, the program will practically write itself.