# 有限狀態機

參考資料:(<https://zh.wikipedia.org/wiki/%E6%9C%89%E9%99%90%E7%8A%B6%E6%80%81%E6%9C%BA>)

有限狀態機 FSM (finite-state machine)

表示有限個**狀態**，以及這些狀態之間的 **轉移、動作等行為**的數學模型。

## 狀態和術語

**狀態**儲存關於過去的資訊，就是說：它反映從系統開始到現在時刻的輸入變化。 **轉移**指示狀態變更，並且用必須滿足確使轉移發生的條件來描述它。 **動作**是在給定時刻要進行的活動的描述。有多種類型的動作：

**進入動作**（entry action）：在進入狀態時進行 **退出動作**：在退出狀態時進行 **輸入動作**：依賴於目前狀態和輸入條件進行 **轉移動作**：在進行特定轉移時進行


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://brianwu.gitbook.io/brian/brians-za-ji/guan-nian/hua-tu/you-xian-zhuang-tai-ji.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
