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
newbie HELP!!
-
- Posts: 447
- Joined: Sat Jun 28, 2008 7:49 am
- Location: Austin, TX
- Contact:
Re: newbie HELP!!
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.
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/
Re: newbie HELP!!
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?
-
- Posts: 406
- Joined: Sat Mar 07, 2009 6:17 pm
- Location: Brazil
- Contact:
Re: newbie HELP!!
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.
Re: newbie HELP!!
You need to read up on 'Expert Systems'.
-
- Posts: 148
- Joined: Wed Jul 30, 2008 11:26 pm
Re: newbie HELP!!
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?
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.
Code: Select all
("Are you breathing?" ("Are you bleeding?" "You have a cut."
"You're fine.")
"You're dead.")