QSMM, the "QSMM State Machine Model", is a framework for development of non-deterministic intelligent state models and systems with spur-driven behavior. It includes low-level functions for generating optimal actions by the system and high-level functions for building multinode models. In a multinode model, nodes represent components of a system you develop which choose optimal actions using the framework and can correspond to entities external to the system and which behavior is to be learnt. A node can choose optimal actions based on a current node state which is either set manually by your program or is identified automatically by the framework. Probability profiles for a state transition matrix and an action emission matrix of the node can be specified using an assembler program with a user-defined instruction set.