In the Middle Ages, Jewish thinkers struggled to reconcile God's knowledge of the future with human choice.

A problem that exercised the minds of the medieval Jewish philosophers was that of reconciling God's foreknowledge with human free will.
This problem, called the problem of "knowledge versus free will," can be baldly stated. If God knows, as presumably He does, long before a man is born how he will behave throughout his life, how can that man be blamed and punished for his sinful acts and praised and rewarded for his virtuous acts?

Solution #1: God Has No Foreknowledge

Gersonides, unwilling to compromise in any way human free will, posits as a solution (The Wars of the Lord, iii. 6) that God does not know beforehand how a man will behave in particular circumstances. God knows beforehand all the choices open to a man but which of these he will follow depends entirely on his own free will. Gersonides' "solution" does provide for free will, but from the theological point of view it is surely odd to deny God's knowledge of the future in all its details.

Solution #2: Humans Have No Free Choice

[Hasdai] Crescas attempts to deal with the problem (The Light of the Lord, iv. 5) by distinguishing between fatalism, the notion that man must act in the way he does, and determinism, the notion that man is free to choose which acts he performs but the choice itself is determined. God's foreknowledge is of the choices man actually makes of his own free will. Crescas admits that, since his choices are determined by God's foreknowledge, man is not really free, and is obliged to face the problem of why, if this is so, there are rewards for virtuous living and punishments for vicious living.

Crescas tries to deal with this further problem by suggesting that the promise of reward and the threat of punishment are only to spur a man on to choose virtue and reject sin. The good man thus does not really deserve his reward nor the wicked man his punishment. Crescas is as unconventional in his qualification of human free will as is Gerso­nides in his qualification of divine foreknowledge.

Solution #3: Divine and Human Knowledge Are Incomparable

Maimonides (Mishneh Torah, Teshuvah, 5:5) holds that man has free will and God has fore­knowledge so that there is, indeed, a problem but it is one incapable of solution by the finite mind of man. Maimonides is not simply saying that there is an insoluble problem. If he were saying that, his critics would have been right in protesting that a wise man does not formulate problems of faith for which he has no solution and Maimonides should have kept silent on the whole question. But, in reality, Maimonides is putting forward a solution of his own, as is clear from his actual formulation.