I read a book called God's Third Strategy which advanced an interesting theory. It is premised, granted, on dropping the notion of God's infallibility though.
The basic argument is that God's goal is to reunite with humanity which has chosen sin (Adam, Eve and all that jazz). First he does with with the OT strategy of pummeling peope in various ways, releasing floods and so on. This doesn't really work very well. So then he he attempts the whole love and understanding thing that Jesus does. This works better but not well enough, because the demands on faith are simply too high. So then he switches over to a third one - disappearing. The idea there is basically that by disappearing people were eventually forced to think for themselves, drop fatalism and come up with ideas of their own to solve practical problems, such as curing diseases or preventing starvation. Eventually, however, we will have solved or nearly solved those problems but still be stuck with moral problems. Then, having exhausted the scientific approaches people will turn to God again and be truly prepared to join Him again.
It's a bit out there, but I found to be an interesting approach to the subject.
Actually, that argument doesn't require that God have tried various strategies and then discovered that they failed. Under that premise, the Old Testament is basically God making the case to mankind that unless He eliminates free will, he can't simply pummel mankind into submission, since when He had done that, people still fall away from His teachings. Hence God could have known all along that the Hebrews would keep straying.