newbie HELP!!

Discussion of Common Lisp

newbie HELP!!

Postby 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 :lol:

Re: newbie HELP!!

Postby 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.
Cheers, Dave
Slowly but surely the world is finding Lisp.
Posts: 440
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX

Re: newbie HELP!!

Postby 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?
Posts: 209
Joined: Fri Oct 10, 2008 8:22 am
Location: Eindhoven, The Netherlands

Re: newbie HELP!!

Postby 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.
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil

Re: newbie HELP!!

Postby Balooga » Tue Apr 07, 2009 12:02 pm

You need to read up on 'Expert Systems'.
Posts: 14
Joined: Tue Jul 15, 2008 1:20 pm

Re: newbie HELP!!

Postby 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.
Paul Donnelly
Posts: 148
Joined: Wed Jul 30, 2008 11:26 pm

Return to Common Lisp

Who is online

Users browsing this forum: No registered users and 3 guests