## Document Type: Prompt Template
### Overview
This image presents a "Prompt Template" designed to guide a problem-solving agent through a maze navigation task. It outlines the task description, provides reasoning guidance, includes an example input/output, and presents a new problem for the agent to solve. The document is structured into distinct sections to clearly convey instructions, constraints, and expected output format.
### Components/Axes
The document is laid out with a main title at the top and four distinct content panels arranged in a 2x2 grid, with two panels on the left and two on the right. Each of the four main content panels has a vertical, rotated label on its outer side.
* **Header (Top-Center):** "Prompt Template"
* **Left Column, Top Panel:** Labeled "Task Description" (rotated vertically on the left edge). This panel contains the core problem statement, maze details, valid actions, syntax, constraints, and output format requirements.
* **Right Column, Top Panel:** Labeled "Reasoning Guidance" (rotated vertically on the right edge). This panel provides a step-by-step approach and advice for solving the task.
* **Left Column, Bottom Panel:** Labeled "Examples" (rotated vertically on the left edge). This panel provides a concrete example of input facts and the corresponding expected output.
* **Right Column, Bottom Panel:** Labeled "Problem Facts" (rotated vertically on the right edge). This panel presents a new set of facts for a specific problem instance, followed by a placeholder for "YOUR SOLUTION".
### Detailed Analysis
The document is composed entirely of text, structured into logical sections.
**Top-Left Panel: Task Description**
* **Introductory Statement:** "You are a problem solving agent that thinks carefully step by step based on provided facts and follows instructions closely."
* **TASK:** "Help Bob navigate through a maze of connected rooms to rescue Alice. Bob starts in a specified room and needs to find the optimal path to reach Alice's location, following the maze's rules about room connections and door locks."
* **MAZE DESCRIPTION CONTAINS:**
1. "Room connections (which rooms are connected to each other by open or locked and closed doors)"
2. "Door information (open or locked)"
3. "Key information (where they are located and which doors they unlock)"
4. "Starting location: Where Bob is at the start"
5. "Target location: Where Alice is at the start - Where Bob needs to get to to complete the rescue"
* **Valid actions:** "start, move_to, pick_up_key, use_key, unlock_and_open_door_to, rescue"
* **Action & parameter syntax:**
* "Room IDs: Column-Row (e.g., 'A1')"
* "Key IDs: positive integers (e.g., '1')"
* "start/move_to: room ID"
* "pick_up_key/use_key: key ID"
* "unlock_and_open_door_to: room ID"
* "rescue: 'Alice'"
* **KEY 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. "use_key action always come right before unlock_and_open_door_to"
6. "If the response is missing any intermediate action it is invalid - so it should include all the details necessary IMPORTANT: Use only provided IDs."
* **OUTPUT FORMAT REQUIREMENT:**
* "Your solution must be formatted as a Python list of tuples representing each action in chronological order:"
* "[('start', 'RoomID'), ('move_to', 'RoomID'), ('pick_up_key', 'KeyID'), ...]"
* "Example format: [('start', 'A1'), ('move_to', 'B1'), ('pick_up_key', '3'), ('use_key', '3'), ('unlock_and_open_door_to', 'C1'), ('rescue', 'Alice')]"
**Top-Right Panel: Reasoning Guidance**
* **TO COMPLETE THIS TASK FOLLOW THESE 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 steps that increase the total path length."
* **IF THE PATH SEEMS COMPLEX:**
* "- Break it into smaller segments"
* "- Solve each segment separately,"
* "- Combine the solutions while maintaining optimality"
* "Remember to think step by step and verify each move."
* "Proceed to provide your solution as a list of tuples in chronological order."
**Bottom-Left Panel: Examples**
* **EXAMPLES:**
* **INPUT:**
* **FACTS:** "Room C4 and C3 are connected by an open door. Room C3 and D3 are connected by an open door. Room D5 and E5 are connected by an open door. Room A2 and A1 are connected by an open door. Room A3 and B3 are connected by an open door. Room A1 and B1 are connected by an open door. Room A4 and A3 are connected by an open door. Room E5 and E4 are connected by an open door. Room D4 and D3 are connected by an open door. Room A5 and B5 are connected by an open door. Room D4 and E4 are connected by an open door. Bob is in room D5. Alice is in room C4."
* **OUTPUT:**
* "[('start', 'D5'), ('move_to', 'E5'), ('move_to', 'E4'), ('move_to', 'D4'), ('move_to', 'D3'), ('move_to', 'C3'), ('move_to', 'C4'), ('rescue', 'Alice')]"
* "END OF EXAMPLES"
**Bottom-Right Panel: Problem Facts**
* **PROBLEM:**
* **FACTS:** "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 C5 and C4 are connected by an open door. Room C4 and D4 are connected by an open door. Room D6 and D5 are connected by a closed and locked door. The locked door between D6 and D5 requires key 10. Key 10 is in room A5. Room D6 and E6 are connected by an open door. Room D5 and D4 are connected by an open door. Room E6 and F6 are connected by an open door. Room A4 and A3 are connected by an open door. Bob is in room F6. Alice is in room C5."
* **YOUR SOLUTION:** (This area is blank, awaiting a solution)
### Key Observations
* The document is a comprehensive instruction set for a pathfinding and object interaction problem within a maze environment.
* It explicitly defines the agent's role, the task, the maze's components, valid actions, their syntax, and critical constraints.
* The output format is strictly defined as a Python list of tuples, with an example provided for clarity.
* Reasoning guidance emphasizes optimality, step-by-step thinking, and handling complexity by segmentation.
* The "Examples" section serves as a clear demonstration of the expected input and output, which is crucial for understanding the task.
* The "Problem Facts" section presents a new, unsolved instance of the problem, indicating that the document is a template for a task to be completed.
* Room IDs use a "Column-Row" format (e.g., 'A1'), and Key IDs are positive integers.
### Interpretation
This "Prompt Template" is designed to elicit a structured, optimal solution from a problem-solving agent (likely an AI or a human programmer) for a complex maze navigation and key-collection task. The detailed instructions, constraints, and reasoning guidance aim to ensure that the agent understands the problem thoroughly and produces a solution that adheres to all rules and formatting requirements.
The problem itself is a variation of a shortest path problem, complicated by the introduction of locked doors and keys. The agent must not only find a path but also strategically collect keys to unlock necessary doors, all while minimizing the total number of actions. The emphasis on "optimal path" and "minimizes actions/distance" suggests that efficiency is a primary concern.
The inclusion of an example is critical for clarifying the expected behavior and output format, especially for the Python list of tuples. The "Reasoning Guidance" acts as a meta-instruction, guiding the thought process rather than just the task itself, which is particularly useful for complex AI tasks where the agent needs to demonstrate logical reasoning.
The document effectively segments the information into digestible parts: what to do, how to think about it, an illustration, and a new challenge. This structure facilitates a clear understanding of the problem and the expectations for the solution, making it a robust template for evaluating problem-solving capabilities in a constrained environment.