Once upon a time, babies’ first smiles would often be dismissed as “probably just gas.”

Now, scientists know better.

Starting nearly from birth, infants’ ethereal grins provide a window into their social and emotional development, researchers say. And the responses those enchanting and goofy expressions elicit can help program babies’ brains...