Anticipations, uncertainty, and dynamic planning