Realizing program with decision tree logics [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this questionThe system realizes a game “Think animal”.
Main use case is:
1. System offers user to think about any animal and the system will try to guess it
2. The system starts asking questions from the start of decision tree. Ex., “Question: It has fur?”, and provides possible answers – yes or no.
3. If the user answers Yes, the system proceeds to these steps:
a. System tries to guess animal that has that feature, ex. “My guess: Is it bear?” and provides with possible answers – yes or no.
b. If the user answer is Yes, the system offers to think off another animal
4. If the user answers is No, the system moves to No node in decision tree and moves to 2 step (and starts from asking from new node).
5. If system runs out of nodes (i.e., empty yes or no node was reached):
a. the system announces that it has given up, and ask user to enter:
i. What animal he had in mind
ii. What is his characteristic feature
b. User enters requested data
c. The开发者_JAVA技巧 system creates a new node and links it to yes or no of last active node.
Where i can get some information and some examples, when implementing decision tree logics in MS SQL Server and C#..? Any information will be usefull. Thanks
What you are trying to do is definitely not trivial. As for the decision making algorithm have you looked into C4.5 ? I was unable to find a implementation in C# for it so you may be on your own. ID3 may also work for you.
Google b-tree implementations for SQL Server there is tons of information out there, but the actual implementation may depend heavily on your decision tree implementation.
Good Luck!
As it's been mentioned, decision tree generating algorithms are what you'll want to use. However, since your system will want to incrementally "update" itself after each "session" with the user, you may want to use an incremental decision tree algorithm, so you don't have to run a long batch update each time.
精彩评论