The case
God knows everything that can be known: every fact, every possibility and every heart. A free decision that has not been made is not yet a fact, so not knowing it is no more a limit on God than being unable to draw a square circle. Philosophers call this view open theism or dynamic omniscience.
Scripture reads this way when we take it at face value:
…for now I know that thou fearest God, seeing thou hast not withheld thy son, thine only son from me.Genesis 22:12
- "Where art thou?" (Genesis 3:9).
- "I will go down now, and see… and if not, I will know" (Genesis 18:21).
- "It repented the LORD that he had made man" (Genesis 6:6).
- God tested Israel "to know what was in thine heart, whether thou wouldest keep his commandments, or no" (Deuteronomy 8:2).
- "God left him, to try him, that he might know all that was in his heart" (2 Chronicles 32:31).
- "I said… Turn thou unto me. But she returned not" (Jeremiah 3:7). God expected one thing and got another.
Yet He sees inside us: "I the LORD search the heart, I try the reins" (Jeremiah 17:10). "The LORD looketh on the heart" (1 Samuel 16:7).
The philosophy. Aristotle asked whether "there will be a sea battle tomorrow" is true today. Open theists say it isn't true or false yet. Philosopher William Hasker argues that if God always believed you would do X, you could never have done otherwise, and free will disappears.
Sparring
"There is not a word in my tongue, but, lo, O LORD, thou knowest it altogether" (Psalm 139:4).
He knows my heart so completely He knows what I am about to say. That is heart-searching, not reading a fixed script.
Jesus predicted Peter's denial and Judas's betrayal.
Perfect knowledge of a person's heart lets you predict them. And God can always declare what He Himself will do: "I have purposed it, I will also do it" (Isaiah 46:11).
Classical theism says God sees all time at once. Molinists say He knows what you would freely do.
Then "now I know," the tests and God's regret become theater. I take the text at face value.
Sources: Internet Encyclopedia of Philosophy · Greg Boyd on Genesis 22:12 · Wikipedia