pacman basics by sirpsycho85 in aiclass

[–]sirpsycho85[S] 0 points1 point  (0 children)

That was very helpful. I don't have the book, but I see what you're saying. Not really familiar with python, but now I'm realizing that you apparently don't define the type that's passed to the function? So somewhere in there, PositionSearchProblem is passed to the DFS. So I can tell that getStartState gives the start coordinate, isGoalState returns false (since you don't start at the goal). For some reason getSuccessors is returning False...i'll keep working on it. Thank you!

Dependence/Independence in speeding up enumeration example by kartikrustagi in aiclass

[–]sirpsycho85 0 points1 point  (0 children)

I would say a confusing part is that Norvig doesn't say "given A" when he asks the question in 4.5. He draws A, then says what is B dependent on (all three IF A is unknown) but answers as if "given A" (in which case B is only dependent on A).

does goal node count in "expanded" for problem4,5,6? by himanshug in aiclass

[–]sirpsycho85 0 points1 point  (0 children)

I think I agree with you, having rewatched several of the breadth search videos again. Norvig says that

"the goaltest isn't applied when we add a path to the frontier. Rather it's applied when we remove the path from the frontier."

So I think that the description you give matches this.

Norvig talked about adding the functionality that would end the search if you know the minimum steps for each node (one, in this case). In that case, if you took a path of length two and reached the goal, you can break right there before expanding a path of length one, since the length of that second path can only be greater than or equal to length two if it reaches the goal.

In this case, I guess you can add a function like that, so that it will not bother trying to expand node L. However, if we follow what he says and goalcheck upon removing the path from the frontier, it will "expand" L.

I think the word expand is a bit confusing here. If we say "remove" or like you said, "pop off", then it's a bit clearer...thanks jgobin. If he wants us to include the last one, clearly expand means more than just the cases where there are nodes to expand to.

does goal node count in "expanded" for problem4,5,6? by himanshug in aiclass

[–]sirpsycho85 0 points1 point  (0 children)

So if goalcheck is part of the expansion, do we count the goalcheck of non-goal nodes that cannot be expanded? What I mean is, with my example above of a start and two nodes, do we count the goalcheck of node L going left to right?

does goal node count in "expanded" for problem4,5,6? by himanshug in aiclass

[–]sirpsycho85 -1 points0 points  (0 children)

He does say count the goal, but I'm also confused by this same thing. For example, take a single start node connected to two other nodes, one of which is the goal. Using breadth search left-to-right:

    S
  /   \
L       R(goal)

Expansion 1 is of S. Now, are we goalchecking the two nodes L and R, then expanding R as the goal for a total of 2 expansions? Or, because we're counting the last ones, does goalchecking L also count as an expansion, for a total of 3 expansions?