I am unimpressed by Robin's answer. With unlimited power there is no reason to think hard, seek advice or be careful. Just do whatever the hell you want, and if something bad results you can always undo. But of course, you don't need to undo because you have unlimited foresight. So, all you have to do is do a brute force search of the space of all possible actions, and then pick the one with the consequences that you like the most. Simple.