- **Epistemic status:** #budding A Finite State Machine (FSM) is a model of computation that, among a finite number of states, it can only be at one state at a single time. It can transition to a different state by responding to events, such as a user clicking a button as an example. To model an FSM you need a defined list of states, its initial state, and the events that trigger each transition. It is often modeled using diagrams with either squares or circles to describe its various states and events. ![[Pasted image 20221025093139.png]] Photo retrieved from [Microsoft Dev Blogs](https://devblogs.microsoft.com/wp-content/uploads/sites/44/2019/03/FSM_IMG.01.png) The behavior of FSM can be observed not only in computing, but other devices in society with a pre-defined set of actions. They can be mechanical, such as a vending machine, or as simple as a routine that a person has. --- ## References - “Finite-State Machine.” In _Wikipedia_, October 3, 2022. <https://en.wikipedia.org/w/index.php?title=Finite-state_machine&oldid=1113737413>. - Thomas, David, and Andrew Hunt. _The Pragmatic Programmer, 20th Anniversary Edition: Journey to Mastery_. Second edition. Boston: Addison-Wesley, 2019. - _Understanding State Machines, Part 1: What Are They?_, 2014. <https://www.youtube.com/watch?v=-Yicg2TTMPs>. - _Understanding State Machines, Part 2: Why Use Them?_, 2014. <https://www.youtube.com/watch?v=0z0XGXBtI3A>.