\n
## Diagram: Maze Solving Agent Prompt Template
### Overview
The image presents a diagram outlining a prompt template for a problem-solving agent tasked with navigating a maze. The diagram is structured as a flowchart, visually representing the steps and considerations for the agent's reasoning process. It's divided into sections labeled "Task Description", "Reasoning Guidance", "Problem Facts", and "Example Responses".
### Components/Axes
The diagram is not a chart with axes, but a structured flowchart. Key components include:
* **Task Description:** Outlines the agent's goal – to find the optimal path through a maze.
* **Reasoning Guidance:** Lists steps the agent should follow (1-6).
* **Problem Facts:** Provides specific details about the maze (room connections, door states).
* **Example Responses:** Shows the expected format of the agent's solution.
* **Labels:** Numerous labels describing actions, constraints, and components.
* **Flow Arrows:** Indicate the sequence of steps and dependencies.
### Detailed Analysis or Content Details
**Task Description:**
* **TASK:** Help Bob navigate a maze of connected rooms to rescue Alice.
* **MAZE DESCRIPTION CONTAINS:** Room connections (open/closed doors), door information (lock/unlock keys), starting location (Where Bob is at the start), target location (Where Alice is at the start).
* **Valid actions:** start, move_to, pick_up, use_key, unlock, open_door, to_rescue
* **Action & parameter syntax:** Room IDs: Column-Row (e.g., "A1"). Key IDs: positive integers (e.g., "1").
* **Task Constraints:**
1. Each move must be between adjacent and connected rooms.
2. Keys must be picked up before use.
3. Locked doors require use of their specific key to unlock.
4. Optimal path minimizes actions/distance.
5. Actions must be in correct order (move, unlock, open_door).
* **OUTPUT FORMAT REQUIREMENT:** A Python list of tuples representing each action in chronological order: `[('start', 'RoomID'), ('move_to', 'RoomID'), ...]`
**Reasoning Guidance (Steps):**
1. Find the shortest path from Bob to Alice.
2. Identify any locked doors on this path.
3. For each locked door, find its required key.
4. Plan key collection order to ensure you have each key before reaching its door.
5. Track all actions while following the rules.
6. Avoid unnecessary actions that increase the total path length.
* **IF THE PATH SEEMS COMPLEX:** Break it into smaller segments, solve each segment separately, combine solutions while maintaining optimality.
**Problem Facts:**
* **PROBLEM:** Room A6 and A5 are connected by an open door. Room A6 and B6 are connected by an open door. Room B6 and C6 are connected by an open door. Room C6 and D6 are connected by an open door. Room D6 and E6 are connected by an open door. Room E6 and F6 are connected by an open door. Room F6 and G6 are connected by an open door. Room G6 and H6 are connected by an open door. Room H6 and I6 are connected by an open door. Room D5 and C4 are connected by a locked door. The locked door requires key 10. Room A5 and B5 are connected by a locked door. The locked door requires key 1. Room B5 and C5 are connected by an open door. Room C5 and D5 are connected by an open door. Room D4 and C4 are connected by a locked door. The locked door requires key 7. Room A1 is where Bob starts. Room I6 is where Alice is at the start.
**Example Responses:**
* **Your solution must be formatted as a Python list of tuples representing each action in chronological order:** `[('start', 'A1'), ('move_to', 'A5'), ('pick_up', '1'), ('unlock', '1'), ...]`
### Key Observations
The diagram is highly structured and detailed, providing a comprehensive framework for the agent's task. The emphasis on constraints and output format suggests a need for precise and well-defined solutions. The inclusion of a complex path scenario highlights the importance of efficient planning and key management.
### Interpretation
This diagram serves as a blueprint for a maze-solving AI agent. It's not presenting data *about* a maze, but rather *instructions* for an agent *to solve* a maze. The diagram's strength lies in its explicit breakdown of the problem into manageable steps, emphasizing logical reasoning and adherence to constraints. The inclusion of example output demonstrates the desired level of precision and formality. The "Reasoning Guidance" section is particularly important, as it outlines the cognitive processes the agent should employ. The "Problem Facts" section provides a concrete scenario for testing the agent's capabilities. The diagram is a clear example of how to translate a complex problem into a structured, solvable format for an AI agent. It's a design document for an AI system, not a data visualization.