## Screenshot: Prompt Template for Maze Navigation Task
### Overview
The image displays a structured prompt template divided into three sections: **Task Description**, **Reasoning Guidance**, and **Problem**. It outlines a maze navigation problem where an agent (Bob) must rescue Alice by navigating connected rooms, using keys to unlock doors, and following constraints to find the optimal path.
---
### Components/Axes
#### Task Description
- **Task**: Help Bob navigate a maze of connected rooms to rescue Alice.
- **Maze Description**:
- Room connections (open/locked/closed doors).
- Door information (location, open/locked status).
- Key information (location, door unlock capability).
- Starting location (Bob's start room).
- Target location (Alice's room).
- **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').
- Example: `('move_to', 'B1')`.
- **Key Constraints**:
1. Moves must be between adjacent, connected rooms.
2. Keys must be picked up before use.
3. Optimal path minimizes actions/distance.
4. `use_key` action invalidates the key.
- **Output Format**: Python list of tuples (chronological actions).
- **Examples**:
- Input: Room connections, Bob in D5, Alice in C4.
- Output: Sequence of actions to reach Alice.
#### Reasoning Guidance
- **Steps to Complete Task**:
1. Find the shortest path from Bob to Alice.
2. Identify locked doors on the path.
3. For each locked door, find its required key.
4. Plan key collection order to ensure keys are available before reaching doors.
5. Track all actions while following rules.
6. Avoid unnecessary steps increasing path length.
- **Complex Path Handling**:
- Break into smaller segments.
- Solve each segment separately.
- Combine solutions while maintaining optimality.
#### Problem
- **Facts**:
- Room connections (e.g., A6-A5: open door; C6-D6: open door; D4-D5: closed/locked door requiring key 10).
- Key locations (e.g., key 10 in A5).
- Bob starts in F6; Alice is in C5.
- **Solution**: Not provided (to be derived by the agent).
---
### Detailed Analysis
#### Task Description
- **Room Connections**: Defined by open/locked/closed doors (e.g., C4-C3: open door; D4-D5: closed/locked door).
- **Key Usage**: Keys must be picked up before use and become invalid after use.
- **Output Example**: Chronological action list (e.g., `[('start', 'D5'), ('move_to', 'E5'), ...]`).
#### Reasoning Guidance
- **Optimality**: Emphasizes minimizing actions/distance and avoiding redundant steps.
- **Key Collection**: Requires planning to ensure keys are available before reaching locked doors.
#### Problem
- **Maze Complexity**: Includes both open and locked doors, with keys scattered across rooms.
- **Critical Path**: Bob must navigate from F6 to C5, unlocking doors (e.g., D4-D5) using key 10 from A5.
---
### Key Observations
1. **Action Constraints**: Keys are single-use and must be collected before use.
2. **Path Optimization**: The solution must balance shortest distance with key acquisition.
3. **Locked Doors**: Require specific keys (e.g., key 10 for D4-D5), adding complexity to pathfinding.
---
### Interpretation
The template simulates a constrained pathfinding problem with resource management (keys). The agent must:
- Prioritize key collection to unlock critical doors.
- Avoid paths that require backtracking or redundant actions.
- Ensure keys are used before they become invalid.
This structure mirrors real-world scenarios like logistics or escape room puzzles, where resource allocation and path optimization are critical. The absence of a provided solution forces the agent to apply logical reasoning and constraint satisfaction to derive the correct sequence of actions.