Carl Sagan said this quote

The entire evolutionary record on our planet, particularly the record contained in fossil endocasts, illustrates a progressive tendency toward intelligence. There is nothing mysterious about this:smart organisms by and large survive better and leave more offspring than stupid ones.