problem.getSuccessors(getStartState()) - it returns something like ( (4,5) , north, 1) - that means 3 things - tuple, direction,cost.
I'm using a dictionary ,closed = {}
Now I need to put the output of above function in the dictionary "closed" - how can I do that??
I need to use only dictionary because I need to return "action" i.e North, south....at the end of function. after doing some iterations, my dict is going to have multiple entries such as ((4,5),north,1) , ((3,4),south,1) and I need to extract the key from the dict i.e (4,5) .what shud I use?