fixed the issue in the top left corner (invisible ghosts). Made algorithm work better by pacman taking first step in direction BFS started. Pacman now wins a lot. Only problem are still walls if running away from ghosts.