If God knew everything before he created it then why was He repentant that He ever created man? In other words if there was no other possible outcome and God knew it why be repented when it happens?
Gen 6:6
And it repented the LORD that he had made man on the earth, and it grieved him at his heart.
5And God saw that the wickedness of man was great in the earth, and that every imagination of the thoughts of his heart was only evil continually.
6And it repented the LORD that he had made man on the earth, and it grieved him at his heart.
7And the LORD said, I will destroy man whom I have created from the face of the earth; both man, and beast, and the creeping thing, and the fowls of the air; for it repenteth me that I have made them.
8But Noah found grace in the eyes of the LORD.
Does this say God didn't know it would happen? No, it says He repented had a change of mind, that He had created man. But he also saw Noah and Noah found Grace or salvation from God and God made a plan to save mankind. Nothing in this says God was shocked or surprised, He knew it would happen but Moses put it into human terms the only way he knew how to term it. God knew and He also knew about Noah and the other 7.