In Udacity's Self-Driving Car Engineer online course, one instructor claims that "[Finite State Machines are] not necessarily the most common [approach for behavior planning] anymore, for reasons we will discuss later." I suppose the later assertions that FSM's are easily abused and become harder to understand and maintain as the state set increases amount for the "reasons", but we're never told what's used in its place.

I have been using FSM's for years, mostly for parsing-related problems in enterprise systems programming, but more recently for behavior planning problems. In my experience they're great for breaking down complex problems into manageable parts, not only when modelling but also in implementation – I usually implement each state as a separate class or function, allowing me to concentrate on the respective behavior and transition rules in relative isolation to the rest of the architecture.

That's why I find it frustrating that the lesson failed to discuss what is currently used instead of FSM's for behavior modelling: if a better approach exists for keeping track of a system's context and adjusting its behavior in response, I'm yet to hear of it, and I'd very much like to.

  • $\begingroup$ they may be referring to some form of a neural network (self-learning AI) $\endgroup$ – jsotola Jun 18 '18 at 2:29
  • $\begingroup$ Thank you, but I'm actually looking for a concrete, definite alternative, that has equivalent advantages to FSM's while addressing its weaknesses. I'm afraid "some form of neural network" doesn't really help with that. $\endgroup$ – xperroni Jun 18 '18 at 11:43

Finite state machines are, by definition, "finite" -- they have a predefined set of states and some rules to change from one state to another, which might work in some kind of restricted environment, but totally fails in the very unpredictable real world, especially working on such complex problem as self-driving.

The current approaches include modelling and predicting the behaviour, then evaluating the possible outcomes and choosing the behaviour that gives the best evaluation. You may check Model predictive control (MPC) on Google or watch some of the videos, that use MPPI (Multipath prediction, when they simulate hundreds of possible trajectories and then select the best one) -- you'll never get the similar results using FSM:



  • $\begingroup$ I can see MPC / MPPI being useful for actuator control and even route planning, but for high-level behavior planning – where there are only a few modes of interest and transition rules between them are well-defined – FSM's still look the preferable alternative to me. Especially since, as constraints accumulate, it gets increasingly difficult to predict the behavior of optimizing methods – in contrast, FSM transition rules can be bound to each separate state, making them comparatively easier to follow. $\endgroup$ – xperroni Jun 18 '18 at 12:05
  • $\begingroup$ @xperroni please, give me a sample of "high-level behavior planning – where there are only a few modes of interest and transition rules between them are well-defined" ? then we can talk about that in details. now I have just no idea what you have in mind. $\endgroup$ – lenik Jun 18 '18 at 14:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.