Attacks on God's fundamental attributes, such as His omniscience, don't always come exclusively from atheists. Sometimes, as just recently happened to me, they come from professing Christians. According to a woman I recently met on a Christian social network, the early Church did not believe God knew all things, but only "all things that are knowable", which, in her estimation, does not include the future. According to her, God is intelligent and faithful enough to govern unpredictable people, but He does not know what they will do. She claimed there are multiple examples in the Old Testament of God not knowing something, saying "Do you remember when the Israelites were throwing their children into the mouth of Molech? Do you remember what God said about it? You can look it up yourself but He said that it never occurred to Him that they would do such a thing. Why would He say that if He knew? The OT is full of examples of things He didn't know and also the many times. He changed His mind due to the behavior of His people."
So, let us examine her claim. Is it true that God did not know things in the Old Testament? Does God's statement in Jeremiah 7:31, the verse she alluded to, prove that God didn't know something? As we're about to demonstrate, not only is this a faulty interpretation, but it would contradict other scriptures if this was the case.
The first thing we need to consider is that there are a grand total of 0 reputable translations (and indeed, no translations at all that I could find) that render this verse "which I commanded them not, nor did I know they would do it". No, the phrase is almost invariably along the lines of "I did not command it, nor did it come into my heart". There are exceptions. Some render it "nor did it enter my mind", while others say "heart or mind". The HCSB is particularly interesting, as it renders the verse as "...a thing I did not command; I never entertained the thought."
Right there, we have the answer. God is not speaking about His knowledge, but His desire. This is seen in the connection with a command. Think of it this way: God does not command Christians to celebrate Christmas. But might it come into His heart? Do we imagine God is displeased when we dedicate an entire season to celebrating His birth? By contrast, God is surely displeased by the sacrificing of infants to the false gods such as Molech, and so He is beyond justified to call this "a thing I did not command, nor did it enter my heart".
But did God know this would happen? That He did is indisputable. The scriptures make it clear that He is omniscient; knowing all things, not only past, but also future. Take, for example, Isaiah 46:10, where God says "Declaring the end from the beginning, and from ancient times the things that are not yet done, saying, My counsel shall stand, and I will do all my pleasure:" None of this is possible without omniscience. How can God declare the end from the beginning if the end is not known to Him from the beginning? How can God declare from ancient times, or indeed at all, things not yet done, if the things not yet done are not known to Him from ancient times? The very concept of prophecy requires that God knows the future.
But then how does He change His mind? For this, we need to add the concept of condescension to God's omniscience. Condescension is the idea that God, whose thoughts are higher than our thoughts, and whose ways are higher than our ways (Isaiah 55:8-9), "condescends" to us in order to become more accessible to us. To dumb that down a bit, He dumbs Himself down a bit.
See, scripture says that God does not change His mind (Numbers 23:19). This verse seriously undermines this woman's whole theory. First of all, if God genuinely changed His mind, that would contradict Numbers 23:19. But second, if God really didn't know the future, Numbers 23:19 would be an example of God being really rather foolish. Just as we are told it is folly to speak as if we know the future when we don't (James 4:13-15), so also would it be folly for God to speak as if He knew the future if He didn't.
But because God knows the future, He never truly changes His mind. But He does know every way we might change ours. In fact, contrary to this woman's assertions, there are examples of Him knowing every possible outcome of every possible scenario. Take, for example, Sodom. In Matthew 11:23, Jesus compares Sodom to Capernaum. He claims that had He done His miracles there, Sodom "...would have remained until this day".
Does this sound like Sodom was unpredictable to God? Far from it. To me, it sounds like Jesus was so capable of predicting Sodom that He knew what people who never even got the chance to exist would have done if He had done things differently. If He had done things differently.
This returns us to Isaiah 46:10, where God not only says He declares the end from the beginning, but also "My counsel shall stand, and I will do all my pleasure:". One thing we cannot afford to forget is that while we do have free will, our will is not the only one in play. God may not be perfectly governing unpredictable people, but He is perfectly governing predictable people. Everything we do, He not only knows, but adequately accounts for in order to achieve His purpose. Sometimes, God directly influences events. This may be through a command, but it may also be by doing something Himself (or not, as is the case with Sodom).
What this means is that sometimes, God "changing His mind" is actually a case of God bringing about His will by, shall we say, loading up a gun He never intends to fire. The threat of God's wrath is often enough to cause the repentance that avoids it. This, in effect, causes God to appear to change His mind. In God's omniscience, He knows that He will not be delivering His wrath after all, because He knows the people will repent. But how does this repentance come about? Because God threatens His wrath.
So then are we really free? Absolutely. God may know what choice you will make, but He also knows what choices you could make, and if you did make one of those, He would know that instead. Just as you may know your own past. Think back to any choice you made in the past. Even the choice to click on and read this article. Were you free to read it? Were you free to ignore it? You know now that you did read it, but that does not take away the fact that you chose to do so. In the same way, God's knowledge of your choices, and even His ordinance of your every day before one of them came to be, does not remove your freedom. It merely obligates you to make choices pleasing to Him, ensuring that the future which He knows you have is a future better than the alternatives you could choose.
So, was this woman correct? Is God ignorant of our future choices, or is He omniscient? Are we unpredictable to Him, or does He know what we will do before we do it? I think it is quite clear which view the scriptures present. Let us therefore accept that view, surrendering our understanding to the God who is far wiser than we could ever hope to be.