How the very devil do you play a superintelligent villain (or other magnificently intelligent NPC) with only your own pedestrian intellect to go on?
Well, there’s two or three things you can do to simulate someone smarter than yourself.
The Wisdom of Crowds
If you have some other friends who don’t play in your games (or at least aren’t playing in this one), you can get in touch with them and lay out the situation. You can then get their input on what’s going on and their suggestions for diabolical schemes and contingencies.
Unfortunately, groups of advisors also tend to ‘go off on one’, in much the same way that players do when coming up with their own plans. It can get wild, crazy and amusing, but isn’t necessarily useful exactly.
Include the Big Bad Evil Guy’s sceheming in your prep time for the game. Take the time to consider how they might set things up to favour themselves, what sort of fallbacks and escape plans they might have. Try and anticipate the players, their spells and powers, what they’re likely to do and what precautions the BBEG is likely to take. Right down to the choice of henchmen to pair off against each adventurer to the best effect (EG: Spell resistant creatures to attack spellcasters).
Make a note of the plans and the triggers that will set off the BBEG’s adaptation and keep them in mind. BBEGs don’t fight fair, and just that outlook can make a big different to an encounter.
There’s no way you can prepare for everything, but a superintelligent BBEG certainly can. So what you can do is wait for the players to enact their scheme, and then have the villain have the perfect counter because they anticipated that.
To give it a little structure and to make it a little more fair, give the BBEG the opportunity to make an Intelligence Save (in D&D terms) to have a contingency you didn’t think of, but the villain did. Each time they make the save to counter something, increase the DC by 5. When they fail they’re out of plans.