Set a custom goal callback for the specified task. The argument passed to the callback is the state to test for goal satisfaction. The return values must be a boolean indicating wether the goal is satisfied, and a float indicating the distance to the goal, i.e.:boolean satisfied, number distance=goalSatisfied(table state)If a distance to the goal is not known, a constant value can be used, but the performance of the algorithm will be worse.