So I understand breadth first search, but I am having trouble with the implementation. When there are multiple branches you are expanding the edges or successors of each branch on every iteration of the function. But when one of your nodes returns GOAL how do you get all of the previous moves to that location?
Do you create a list of actions you took, and if there is a fork in the path you create two new lists with the actions you took to get to the branch, plus the moves you will take while on the branch?
This is a pain in the butt to implement, especially in Python, in which I'm fairly new too. Is there a better way to organize this and get the path I need?