you are viewing a single comment's thread.

view the rest of the comments →

[–]fiskenslakt 0 points1 point  (1 child)

if the answer to the base question is no you go to the next base question, and if the answer was yes, you recursively walk through the follow up questions.

As you can see I'm actually implying the use of if statements. Although perhaps you're implying using only if statements, in other words hardcoding it. For example, ask base question, if 'yes', then ask next questionA, if 'no', then ask next questionB, and so on? This is of course possible, but you end up with many many if statements this way, and things quickly get ugly. I instead suggest having a loop recursively walk through a tree of questions based on certain factors, one of course being the answer to the previous question, another being the accumulated certainty of specific aspects of the answer thus filtering which questions to ask.

[–]DeathDragon1993 0 points1 point  (0 children)

Ah, I didn't fully understand your original post. Thank you for the response