DOC: perfect foresight functions