import graph_search
g = graph_search.GridMap('./map0.txt')
file = open('output0.txt', 'a')
[[path, action_path],visited]=graph_search.bfs(g.init_pos , g.transition , g.is_goal, graph_search._ACTIONS)
file.write("Project-1_2_2.2_BFS on map10: path        = "+str(path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: action_path = "+str(action_path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: visited     = "+str(visited) + "\n")
print(path)
print(action_path)
print(visited)
g.display_map(path,visited,"Project-1_2_2.1_BFS on map0")
file.close()

import graph_search
g = graph_search.GridMap('./map1.txt')
file = open('output1.txt', 'a')
[[path, action_path],visited]=graph_search.bfs(g.init_pos , g.transition , g.is_goal, graph_search._ACTIONS)
print(path)
print(action_path)
print(visited)
file.write("Project-1_2_2.2_BFS on map11: path        = "+str(path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: action_path = "+str(action_path) + "\n")
file.write("Project-1_2_2.2_BFS on map11: visited     = "+str(visited) + "\n")
g.display_map(path,visited,"Project-1_2_2.2_BFS on map1")
file.close()

import graph_search
g = graph_search.GridMap('./map2.txt')
file = open('output2.txt', 'a')
[[path, action_path],visited]=graph_search.bfs(g.init_pos , g.transition , g.is_goal, graph_search._ACTIONS)
file.write("Project-1_2_2.2_BFS on map1: path        = "+str(path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: action_path = "+str(action_path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: visited     = "+str(visited) + "\n")
g.display_map(path,visited,"Project-1_2_2.3_BFS on map2")
file.close()
dc5c90de3d9d7b9ed5f7d46a7e1032db378ba085
<mask token>

<mask token>
file.write('Project-1_2_2.2_BFS on map10: path        = ' + str(path) + '\n')
file.write('Project-1_2_2.2_BFS on map1: action_path = ' + str(action_path) +
    '\n')
file.write('Project-1_2_2.2_BFS on map1: visited     = ' + str(visited) + '\n')
print(path)
print(action_path)
print(visited)
g.display_map(path, visited, 'Project-1_2_2.1_BFS on map0')
file.close()
<mask token>
print(path)
print(action_path)
print(visited)
file.write('Project-1_2_2.2_BFS on map11: path        = ' + str(path) + '\n')
file.write('Project-1_2_2.2_BFS on map1: action_path = ' + str(action_path) +
    '\n')
file.write('Project-1_2_2.2_BFS on map11: visited     = ' + str(visited) + '\n'
    )
g.display_map(path, visited, 'Project-1_2_2.2_BFS on map1')
file.close()
<mask token>
file.write('Project-1_2_2.2_BFS on map1: path        = ' + str(path) + '\n')
file.write('Project-1_2_2.2_BFS on map1: action_path = ' + str(action_path) +
    '\n')
file.write('Project-1_2_2.2_BFS on map1: visited     = ' + str(visited) + '\n')
g.display_map(path, visited, 'Project-1_2_2.3_BFS on map2')
file.close()

<mask token>
g = graph_search.GridMap('./map0.txt')
file = open('output0.txt', 'a')
[[path, action_path], visited] = graph_search.bfs(g.init_pos, g.transition,
    g.is_goal, graph_search._ACTIONS)
file.write('Project-1_2_2.2_BFS on map10: path        = ' + str(path) + '\n')
file.write('Project-1_2_2.2_BFS on map1: action_path = ' + str(action_path) +
    '\n')
file.write('Project-1_2_2.2_BFS on map1: visited     = ' + str(visited) + '\n')
print(path)
print(action_path)
print(visited)
g.display_map(path, visited, 'Project-1_2_2.1_BFS on map0')
file.close()
<mask token>
g = graph_search.GridMap('./map1.txt')
file = open('output1.txt', 'a')
[[path, action_path], visited] = graph_search.bfs(g.init_pos, g.transition,
    g.is_goal, graph_search._ACTIONS)
print(path)
print(action_path)
print(visited)
file.write('Project-1_2_2.2_BFS on map11: path        = ' + str(path) + '\n')
file.write('Project-1_2_2.2_BFS on map1: action_path = ' + str(action_path) +
    '\n')
file.write('Project-1_2_2.2_BFS on map11: visited     = ' + str(visited) + '\n'
    )
g.display_map(path, visited, 'Project-1_2_2.2_BFS on map1')
file.close()
<mask token>
g = graph_search.GridMap('./map2.txt')
file = open('output2.txt', 'a')
[[path, action_path], visited] = graph_search.bfs(g.init_pos, g.transition,
    g.is_goal, graph_search._ACTIONS)
file.write('Project-1_2_2.2_BFS on map1: path        = ' + str(path) + '\n')
file.write('Project-1_2_2.2_BFS on map1: action_path = ' + str(action_path) +
    '\n')
file.write('Project-1_2_2.2_BFS on map1: visited     = ' + str(visited) + '\n')
g.display_map(path, visited, 'Project-1_2_2.3_BFS on map2')
file.close()

import graph_search
g = graph_search.GridMap('./map0.txt')
file = open('output0.txt', 'a')
[[path, action_path], visited] = graph_search.bfs(g.init_pos, g.transition,
    g.is_goal, graph_search._ACTIONS)
file.write('Project-1_2_2.2_BFS on map10: path        = ' + str(path) + '\n')
file.write('Project-1_2_2.2_BFS on map1: action_path = ' + str(action_path) +
    '\n')
file.write('Project-1_2_2.2_BFS on map1: visited     = ' + str(visited) + '\n')
print(path)
print(action_path)
print(visited)
g.display_map(path, visited, 'Project-1_2_2.1_BFS on map0')
file.close()
import graph_search
g = graph_search.GridMap('./map1.txt')
file = open('output1.txt', 'a')
[[path, action_path], visited] = graph_search.bfs(g.init_pos, g.transition,
    g.is_goal, graph_search._ACTIONS)
print(path)
print(action_path)
print(visited)
file.write('Project-1_2_2.2_BFS on map11: path        = ' + str(path) + '\n')
file.write('Project-1_2_2.2_BFS on map1: action_path = ' + str(action_path) +
    '\n')
file.write('Project-1_2_2.2_BFS on map11: visited     = ' + str(visited) + '\n'
    )
g.display_map(path, visited, 'Project-1_2_2.2_BFS on map1')
file.close()
import graph_search
g = graph_search.GridMap('./map2.txt')
file = open('output2.txt', 'a')
[[path, action_path], visited] = graph_search.bfs(g.init_pos, g.transition,
    g.is_goal, graph_search._ACTIONS)
file.write('Project-1_2_2.2_BFS on map1: path        = ' + str(path) + '\n')
file.write('Project-1_2_2.2_BFS on map1: action_path = ' + str(action_path) +
    '\n')
file.write('Project-1_2_2.2_BFS on map1: visited     = ' + str(visited) + '\n')
g.display_map(path, visited, 'Project-1_2_2.3_BFS on map2')
file.close()

import graph_search
g = graph_search.GridMap('./map0.txt')
file = open('output0.txt', 'a')
[[path, action_path],visited]=graph_search.bfs(g.init_pos , g.transition , g.is_goal, graph_search._ACTIONS)
file.write("Project-1_2_2.2_BFS on map10: path        = "+str(path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: action_path = "+str(action_path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: visited     = "+str(visited) + "\n")
print(path)
print(action_path)
print(visited)
g.display_map(path,visited,"Project-1_2_2.1_BFS on map0")
file.close()

import graph_search
g = graph_search.GridMap('./map1.txt')
file = open('output1.txt', 'a')
[[path, action_path],visited]=graph_search.bfs(g.init_pos , g.transition , g.is_goal, graph_search._ACTIONS)
print(path)
print(action_path)
print(visited)
file.write("Project-1_2_2.2_BFS on map11: path        = "+str(path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: action_path = "+str(action_path) + "\n")
file.write("Project-1_2_2.2_BFS on map11: visited     = "+str(visited) + "\n")
g.display_map(path,visited,"Project-1_2_2.2_BFS on map1")
file.close()

import graph_search
g = graph_search.GridMap('./map2.txt')
file = open('output2.txt', 'a')
[[path, action_path],visited]=graph_search.bfs(g.init_pos , g.transition , g.is_goal, graph_search._ACTIONS)
file.write("Project-1_2_2.2_BFS on map1: path        = "+str(path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: action_path = "+str(action_path) + "\n")
file.write("Project-1_2_2.2_BFS on map1: visited     = "+str(visited) + "\n")
g.display_map(path,visited,"Project-1_2_2.3_BFS on map2")
file.close()