Okay, perhaps slightly false advertising, but here goes.

Person A picks a number between 1 and 1,000,000
Person B must ascertain what the number is by asking a maximum of twenty yes/no questions.

Very simple, but surprisingly addictive. But the thread does not stop there.

What I want to know is something much more complicated; is it possible to win every time and if so, how would would one go about it? What's the minimum number of guesses without any "luck" involved?

Thanks for your time.
Mack