Does God know all future contingencies?
If yes, does he control them? If not, then we have just posited an area that is not God and is outside his control. The alternatives are Calvinism or Manicheanism.
On the other hand, we can deny the proposition above and opt for open theism or middle knowledge. In this case, every day God learns even more, since the realm of unknown/uncontrolled contigencies gets bigger (more people; more potential decisions; more instantiations of free will, etc). Remember, God is responding to my free will.
This is why atheists die laughing at most Christian apologetics. Positing free will as a theodicy merely removes the problem one step.
A Bit More Seriously
Middle Knowledge: God’s foreknowledge about future contingent events whose truth depend not on God’s free decree (being anterior to this), but upon the liberty of the creature (which God certainly foresees). As Turretin clarifies,
Whether besides the natural knowledge of God (which is only of things possible) there is in God a middle knowledge of men and angels where he knows what they may without a special decree preceding (I: 214).
Turretin responds: things not true cannot be foreknown as true. Now, conditional future things are not true apart from the determination of the divine will; for example, the Sidonians would have repented if the powers had been supplied to them, for they would have been indifferently disposed in their nature to repend or not repent, those powers being given. ..
No effect can be understood as future without the divine decree, so no future conditional can be knowable before the decree.
Again, knowledge either makes the event certain or foresees it as certain…