Expand(u)
children = {}
for each move ∈ moves do
child = move.doMove(u)
if child ≠ null and not OccursOnPath(child, u)
then d[child] = d[u] + 1
pred[child] = u
add child to children
return children