Here is Hawking’s solution:

“The only answer I can give to this problem is based on Darwin’s principle of natural selection. The idea is that in any population of self-reproducing organisms, there will be variations in the genetic material and upbringing that different individuals have. These differences will mean that some individuals are better able than others to draw the right conclusions about the world around them and act accordingly. These individuals will be more likely to survive and reproduce and so their pattern of behavior and thought will come to dominate.”