# Technical Document Extraction: Prompting Architectures
This document provides a detailed technical breakdown of the provided image, which illustrates two distinct logic architectures for Large Language Model (LLM) prompting in a gaming or strategic context: **State Machine Prompting** and **Behavior Tree Prompting**.
---
## 1. State Machine Prompting (Top Section)
The top half of the diagram illustrates a Finite State Machine (FSM) consisting of two primary states and the logic governing the transitions between them.
### Components and States
* **State: aggressive** (Red rounded rectangle, left side)
* **Associated Action:** A red rectangular box below the state contains the text: `action: <All_Units_Attack()>`.
* **State: defensive** (Blue rounded rectangle, right side)
* **Associated Action:** A blue rectangular box below the state contains the text: `action: <All_Units_Defend()>`.
### Transitions and Logic
The states are connected by two directional arrows representing transition logic:
1. **Aggressive to Defensive:** A blue-to-red gradient arrow points from "aggressive" to "defensive". Above it is a text box stating: `switch to defensive when there are insufficient remaining troops`.
2. **Defensive to Aggressive:** A red-to-blue gradient arrow points from "defensive" to "aggressive". Below it is a text box stating: `switch to aggressive when there are sufficient troops`.
---
## 2. Behavior Tree Prompting (Bottom Section)
The bottom half of the diagram illustrates a hierarchical Behavior Tree (BT) structure used for decision-making regarding unit production.
### Root Node
* **Shape:** Green oval.
* **Text:** `root: units training`.
* **Function:** The starting point of the logic tree, branching into three sequences.
### Level 1: Sequences
The root branches into three green oval nodes, processed from left to right:
1. **sequence: carrier**
2. **sequence: voidray**
3. **sequence: other units**
### Level 2: Conditions and Actions
Each sequence contains specific logic paths:
#### Sequence: Carrier (Left Branch)
* **Condition:** A green rectangle stating: `condition: carrier requirements are fulfilled`.
* **Action:** A green rectangle stating: `action: <Train_Carrier()>`.
* **Visual Asset:** An image of a "Carrier" unit from StarCraft II is placed next to the action box.
#### Sequence: Voidray (Middle Branch)
* **Condition:** A green rectangle stating: `condition: voidray requirements are fulfilled`.
* **Action:** A green rectangle stating: `action: <Train_VoidRay()>`.
* **Visual Asset:** An image of a "Void Ray" unit from StarCraft II is placed next to the action box.
#### Sequence: Other Units (Right Branch)
* **Logic:** This branch leads directly to a black square containing a white question mark (**?**), indicating an undefined or default fallback action for units not specified in the primary sequences.
---
## 3. Summary of Textual Information
| Category | Extracted Text / Labels |
| :--- | :--- |
| **Headers** | State Machine Prompting, Behavior Tree Prompting |
| **States/Roots** | aggressive, defensive, root: units training |
| **Sequences** | sequence: carrier, sequence: voidray, sequence: other units |
| **Conditions** | switch to defensive when there are insufficient remaining troops, switch to aggressive when there are sufficient troops, condition: carrier requirements are fulfilled, condition: voidray requirements are fulfilled |
| **Actions** | action: <All_Units_Attack()>, action: <All_Units_Defend()>, action: <Train_Carrier()>, action: <Train_VoidRay()> |
| **Symbols** | ? (Question mark) |
---
## 4. Visual/Spatial Analysis
* **Separation:** A dashed horizontal line separates the two prompting methodologies.
* **Color Coding:**
* **State Machine:** Uses Red (Aggressive/Attack) and Blue (Defensive/Defend) to distinguish between opposing tactical mindsets.
* **Behavior Tree:** Uses shades of Green for all nodes, suggesting a unified logic flow or "Go" conditions for production.
* **Flow Direction:** The State Machine is cyclical/bi-directional. The Behavior Tree is top-down/hierarchical.