Hacker News new | past | comments | ask | show | jobs | submit login

I found it more useful to control my Twillio interaction via a Finite State Transducer (FST - http://en.wikipedia.org/wiki/Finite_state_transducer) instead of a FSM.

An FST allows you to accurately model 'outputs' on state transitions (where those outputs can be side-effects like 'make a call' or 'send an invoice.' This allows you to prove things about what sort of side-effects/outputs will necessarily have occurred by the time the FST is in a certain state.

I started with an FSM but, found in practice, I was using it like a poorly written FST.




FST's are used a lot in natural language processing, for example in speech recognition and dialogue systems. In these cases the state transitions are given probabilities (weights), which makes it a weighted FST.

Sometimes I used FSM's during the design phase of a project to model system behavior, but I'd end up implementing them pretty crudely with spaghetti code or case statements. Looking back, it would have made more sense to explicitly implement the FSM in the code.




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

Search: