2010-03-31 107 views
0

该系统实现了一个游戏“思考动物”。用决策树逻辑实现程序

主要用途的情况是:

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 system creates a new node and links it to yes or no of last active node. 

我在哪里可以得到一些信息和一些例子,在实施MS SQL Server和C#决策树逻辑的时候..? 任何信息将是有用的。 谢谢

+3

这听起来很像功课......是吗? – 2010-03-31 21:52:23

+1

在你的“这是一只熊”的例子问题中?如果答案为“是”,会导致像“是北极熊吗?”这样的问题。或者会承担系统的最终答案? – nategoose 2010-03-31 22:05:56

+0

这听起来像你试图重新实现20q.net。 – Cerin 2010-07-15 13:16:04

回答

1

如前所述,决策树生成算法就是您想要使用的算法。但是,由于系统会在每次与用户进行“会话”之后逐步“更新”自己,因此您可能需要使用incremental decision tree算法,因此不必每次都运行一次较长的批量更新。

2

你想要做的事情绝对不是微不足道的。至于决策算法你看看C4.5?我无法在C#中找到它的实现,所以你可能会自己做。 ID3也可能适合你。

Google b-tree for SQL Server的实现中存在大量信息,但实际实现可能在很大程度上取决于您的决策树实现。

祝你好运!