需要关于此作业的帮助?欢迎联系我

C4Agent

You are a renowned treasure hunter on a quest to find a hidden artifact. The artifact isrumored to be located in a complex labyrinth, and you have been tasked with developingan algorithm to find the shortest path from the entrance of the labyrinth to the artifact. Toaccomplish this, you decide to use bidirectional search, a technique that explores thelabyrinth from both the entrance and the artifact simultaneously. The input will consist of a labyrinth represented as a two-dimensional grid, where eachcel can be either a wall (represented by #) or an empty space (represented by '.'). Theentrance will be denoted by the character 'E', and the artifact by the character 'A'. Thedimensions of the labyrinth will not exceed 100 rows and 100 columns.This input will be in the form of a single argument to your python function. Your methodmust be called bidirectional search(labyrinth). The statementfrom collections import will be included at the top of your solution.Your algorithm should output the shortest path from the entrance to the artifact in thelabyrinth, represented as a sequence of coordinates. Each coordinate should be in theformat (row, column). If there is no path from the entrance to the artifact, the output shouldbe "No path found."

Paths should start at E and end at A

For example:

def bidirectional_search(labyrinth):