Combining self-motivation with planning and inference in a self-motivated cognitive agent framework