Homework #3: Search
def search(initialState, orderingFn=None) :Search should repeatedly dequeue the front node in the search queue, expand its children, check to see if they are in your closed list (i.e. they've already been visited) and then place them in the queue according to your ordering function. Nodes that cannot lad to a solution may be discarded without expanding. For example, if you reach a node in which all four members are on the left after 20 minutes, there is no way this can lead to the goal, and so you may throw it away without expanding it.
### should place newState at the appropriate place in the queue. def BFS(newState, stateQueue, limit)Hint: be sure you use list operations that actually change the list being passed in, and don't create a copy. Experiment on a test program first!