Brain twister? There’s no conundrum there at all. I know exactly what some people will do or say (anti-Catholics bigots here at FR are extremely predictable at times, for instance), and yet those people still have free will. Even though God is omnipotent, the principle is the same. God knows what we will choose, but He allows free will.
It's an amazing trick. Everyone should see how it works!
God could know, if he wanted to, but that doesn't imply that he does. For God's gift of free will to have meaning, he must be open to the possibility of being "surprised". If He were to make his decisions based upon knowledge of people's future actions, so as to ensure that nobody would ever have the power to do things that He would really dislike, then He would be substituting His own will for those of his people, and his gift would be meaningless.