Skip to content
The Chat Archive
Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written) OpenAssistant Conversations (oasst2)

Write me a pseudocode for a maze solving algorithm. Assume the agent navigating the maze…

In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
  1. User

    Write me a pseudocode for a maze solving algorithm. Assume the agent navigating the maze can only tell what's directly in front of them (a wall, an exit, or nothing). You can freely assume there are no loops in the maze.

  2. Assistant

    MAZE-SOLVING ALGORITHM

    Step 1: Start at the entrance of the maze

    Step 2: Move forward until you reach a wall, an exit, or you cannot move any further

    Step 3: If you reach a wall, turn right and go back to step 2

    Step 4: If you reach an exit, you have completed the maze and can exit

    Step 5: If you cannot move any further, turn around and go back to step 2