If God is sovereign, why does He express sorrow when man is bad? If God knows of everything, why did He repent in Genesis 6:5-7 and Exodus 32:12?
People have a hard time dealing with the infinite. An age-old puzzle is "If God is so powerful, can He create a rock that He cannot lift?" But the problem is the assertion that since God is all powerful, He can do anything. The assertion is false. God cannot lie (Titus 1:2). God cannot be faithless (II Timothy 2:13). In general, God cannot sin (James 1:13). Does this mean God is not all powerful? No. "Whatever the LORD pleases He does, in heaven and in earth, in the seas and in all deep places" (Psalms 135:6). The problem is in how we define "all powerful." We lump the negative in with the positive and think all is included, when it is not.
The same thing happens when when we talk about all knowing. We tend to skip over the fact that there just might be some things which are not knowable. The amount that God knows is beyond our grasp: "Great is our Lord, and mighty in power; His understanding is infinite" (Psalms 147:5). But does this mean He knows what cannot be known?
Take notice of what God said after stopping Abraham from killing Isaac. "And He said, "Do not lay your hand on the lad, or do anything to him; for now I know that you fear God, since you have not withheld your son, your only son, from Me"" (Genesis 22:12). Consider the impact that is made when God says, "now I know." It means that God did not know beforehand, else He would not have said, "now." It doesn't mean God chose not to know, it means that until Abraham made the final choice, Abraham's decision could not be known in advance.
What the Bible tells us is that God is so powerful, He made man in the image of God (Genesis 1:27). In His power, He gave us the power to make our own choices. "And if it seems evil to you to serve the LORD, choose for yourselves this day whom you will serve, whether the gods which your fathers served that were on the other side of the River, or the gods of the Amorites, in whose land you dwell. But as for me and my house, we will serve the LORD" (Joshua 24:15). The choice is not made for man in advance. Man has to make his own choices. "Therefore, my beloved, as you have always obeyed, not as in my presence only, but now much more in my absence, work out your own salvation with fear and trembling" (Philippians 2:12). That man must make choices means that until the choice is made, it is not known.
Consider when you were a child. Your parents had full authority over your life. Yet you had the ability to go against their authority. Did your bad choices make your parents less of an authority in your life? No! Their authority existed regardless of the choices you made.
The existence of unknowable things doesn't change the fact that God knows everything there is to know. The fact that God granted man the ability to choose doesn't mean He doesn't rule. In fact, it is because of God's sovereignty that we must answer to God for the choices we make.
Because our choices are not knowable in advance, that also means that God's responses to our choices are not predetermined either. God told us that He laid out the rules for what we must do, and He has set out major milestones along the way, but it doesn't mean there is no flexibility in some parts of God's plans. "Why should the Egyptians speak, and say, 'He brought them out to harm them, to kill them in the mountains, and to consume them from the face of the earth'? Turn from Your fierce wrath, and relent from this harm to Your people" (Exodus 32:12). Moses asked God to change His response to Israel's sin. God's decision in this matter would not change His plans. The Messiah would still come from the seed of Abraham if he wiped out Israel and started over with Moses. But there was enough flexibility in God's plan that He could go either way and meet all His objectives.
That is why God tells us to pray and that He will answer. "Ask, and it will be given to you; seek, and you will find; knock, and it will be opened to you. For everyone who asks receives, and he who seeks finds, and to him who knocks it will be opened" (Matthew 7:7-8). For God to be all powerful and sovereign, it does not mean every decision had to be made out in advance. God answers prayer because He will take into consideration our requests; things will change because of our prayers. God's overall will and objectives will not change. Sin will remain sin, Jesus will return, etc. But God, by His choice, allows flexibility in His plans. God can do this because He is all powerful.
Actually the folks who argue that everything is predetermined are actually making out God to be less powerful than He really is. Which is more impressive: to have every minute detail mapped out in advance, or to accomplish your ends no matter what billions of people decide over thousands of years? Mankind can build deterministic machines (that is what a computer is: a machine that you can determine its responses in advance). The reason computers don't think like people is the simple fact that we are non-deterministic (a person's response cannot be determined 100% of the time in advance). We don't know how to make a true non-deterministic machine. Likely, we never will. But God made non-deterministic man. That power is awesome!