Jump to content

Decision tree programming


kmaid

Recommended Posts

Hello, I could use some help. I am currently trying to code a decision tree into PHP where by the user answers a question and the next set of questions is given to them based on their previous answer(s).

 

Currently I am storing all the user’s answers in a database and running it all through case statements each time however in all honesty I would like to do it another way as  I think it is a pretty poor approach.

 

So far I have read about “Expert Systems” which are border line AI and very complicated for this situation. The other thing I was thinking *could* work is using parent child method to build the menus and store all the answers and upon running out of questions simply if through every possible outcome which is only marginally better.

 

Thanks for reading  :D

Kmaid

Link to comment
Share on other sites

Heh ^^; Dowdy is my colleague i hadn’t realised he already posted on the subject here. I am currently googling about what you suggested but and was wondering if you knew of any good simple examples of these systems for me to have a look at.

 

Thanks

Kmaid

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.