问题
Does anyone know of any good resources for probabilistic finite state machines / automata in Clojure? I know of https://github.com/ztellman/automat and https://github.com/cdorrat/reduce-fsm (but I do not think they do what I want).
See here: https://en.wikipedia.org/wiki/Probabilistic_automaton
My problem is fairly simply (I think): I have multiple states, and transition between them is singular i.e. for now it is just a simple fixed distribution. I am still trying to gain clarity as to if this is really an FSM problem.
An almost identical example to my problem:
Suppose I have these states: Q = {rain,snow,hail,fog,sun}
Each of these has an associated probability of transitioning into a particular state, i.e. a transition function D = [0.1 0.1 0.6 0.1 0.1]
. This is not quite an HMM since I do not have any observations, I would just like to simulate the state dynamics i.e. say sample the FSM for maybe 100 time steps: simulation = {rain,snow,hail,hail,sun,sun,sun,sun,sun,sun,...}
. The state transition table looks something like this:
rain,snow,hail,fog,sun
rain 1 ,1 ,0 ,1 ,1
snow 1 ,1 ,0 ,1 ,0
hail 0 ,1 ,0 ,0 ,1
fog 1 ,1 ,0 ,0 ,1
sun 0 ,1 ,0 ,1 ,1
where 1
is a valid transition and 0
is not. Confusingly I have both a state transition table of valid transitions and a transition probability. Now I am aware that having both is a bit nonsensical (the probabilities are just approximations to the true thing, and the transition table just rounds, in the real problem, to zero).
I suppose I am wondering, where does this fall in the great FSM world (complete novice here). Please feel free to disregard either the transition function or the transition table, whichever makes more sense in FSM world. That being said my problem is of the nature that my system dwells in one state almost all the time - this I do not know how to model without D
but I also do happen to know what valid state transitions are (which granted could just be built into the state transition function).
来源:https://stackoverflow.com/questions/35440220/probabilistic-automata-finite-state-machines-in-clojure