Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A finite state machine is actually not a great solution for this particular problem (in fact, FSMs are often over-used), IMHO. An expert system is a far better solution (as one commenter mentioned). The problem with a FSM is that you still must explicitly specify ALL of the nodes (without some complex algorithm to automate such a task). An expert system, like prolog, only requires you to state all of the rules, and then it will figure out any query for you (via propositional logic, backwards chaining, etc). The number of nodes typically grows exponentially with the number of rules (if the rules are inter-related), so for a problem of any significant size an expert system would probably be the method of choice.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: