> For the complete documentation index, see [llms.txt](https://state-factory.gitbook.io/state-factory/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://state-factory.gitbook.io/state-factory/state-factory.md).

# State Factory

In this documentation, we will be covering installation, usages within the game, and some examples to see how the vision of State Factory comes to life.

## What is a Finite State Machine?

Finite State Machines (FSM) have been an efficient and popular method within the FTC Community for use in both autonomous and tele-operated sequences. This is because FSMs allow for multiple *actions* to run at the same time within one *state*. Essentially, a finite state machine is a collection of states where in each state something different may execute and it can transition to another state.&#x20;

More detail can be found at [https://gm0.org](https://gm0.org/en/latest/docs/software/concepts/finite-state-machines.html).

***

<figure><img src="/files/2SwLOuVPwvJzSNPV6A2t" alt=""><figcaption><p><strong>A diagram of the finite state machine used by team</strong> <a href="https://www.wolfpackmachina.com/"><strong>18438 Wolfpack Machina</strong></a><strong>.</strong></p></figcaption></figure>

***

{% hint style="info" %}
A key feature of a finite state machine is the ability to run in a non-linear order. This means that your autonomous can go back to previous states/steps, allowing for a much more adaptive system.
{% endhint %}

***

Credits: Vikram - Don't Blink & Adam - Phantom

We wanted to give a special thank you to Noah who created Jotai, the main inspiration behind this project, and Wolfpack Machina who showed us the potential behind these systems. \
\
If you have more questions or have some recommendations that should be added, feel free to reach out to <mark style="color:red;">@.vvk.</mark> or <mark style="color:blue;">@doublebubble\_</mark> on Discord.
