Find error and fixed, error is in the generatePath first if when the
agent arrived in the point to explore and the agent don't know if have
to continue in is direction or to explore