I'm drawing a Finite State Machine (which I'll have to implement later on) which is semi-automatic, i.e. some transitions require user input, some are decided on internal value.

The problem is that some transitions are decision trees with several possible transitions. How should I draw such cases? I am considering drawing something like submachine, representing the decision tree, but maybe there is some another more standard approach?

Decision trees apply only to user input. Decision tree is a series of yes/no questions and every answer might branch-off into another question or transition. There are no "empty" branches - transition will happen, though some transitions are duplicated, i.e. several decision paths may lead to the same transition.
The decision tree is at most 5 levels deep, therefore listing every combination of criteria on a transition is an overkill.

  • What factors decide which transition you take from the tree? – sydan Feb 17 '15 at 14:15
  • @sydan I've complemented my question with decision tree information – friendzis Feb 17 '15 at 14:28
  • Is is possible that each different point along a branch of the decision tree is simply another state? If you're suffering from the usual 'state explosion' issue of FSMs I would urge you to investigate Hierarchically State Machines: aigamedev.com/open/article/hfsm-gist as a possible solution. They can be a bit of a drudge at first but open up much strong solutions in the future. – sydan Feb 17 '15 at 14:57
  • I believe not. The FSM in question describes a control unit, that measures some parameters of a system. One transition requires visual inspection by a user and selection of a further transition. User intervention is required in other cases, but that I represent as a simple value transition. As I mention in my question, the transition in question has a ruleset for transition that is too complex to represent as a logical expression. This IS part of a hierarchical FSM :) – friendzis Feb 17 '15 at 15:20
  • My current approach involves a pseudo-state in which I display the transition algorithm (bunch of conditionals). Is this proper approach? – friendzis Feb 17 '15 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.