[Qt-interest] question about QStateMachine setTargetStates() - how deterministic is it?

Kent Hansen khansen at trolltech.com
Wed Apr 14 11:11:52 CEST 2010


Hi Alan,
It's not a bug, but I've created 
http://bugreports.qt.nokia.com/browse/QTBUG-9842 to make it more clear 
what the meaning of multiple target states is.
You might also want to take a look at http://www.w3.org/TR/scxml/; 
appendix B in particular ("Algorithm for SCXML interpretation"). Oh, and 
appendix C ("Probabilistic State Machines"), which is essentially the 
solution Sean proposed. :-)

Regards,
Kent

Alan Ezust wrote:
> I'm trying to understand how QStateMachine works, and whether I can
> use a spontaneous transition to multiple possible states as a
> "randomizer" for a rock-scissors-paper game.
>
> I notice that there is some randomness to choosing t's next state when
> t is fired the first time,
> but on repeated firings, t keeps bringing me to the same state it
> picked the first time.
>
> Is that a bug?
>   




More information about the Qt-interest-old mailing list