King Pyrrhus of Epirus was planning an attack on Rome. A confidante didn’t think it was necessary, or that it would turn out well. And what if we should beat Rome, what then? The king vowed that he would attack the rest of Italy. And then? Libya and Carthage. Then all of Greece! And then? “We will live at our ease, my dear friend,” said the king, “and drink all day, and divert ourselves with pleasant conversation.”

Replied the adviser, “And what hinders Your Majesty from doing so now?”

Pondering the essence of a good life may not seem to be an economic question. “How to Be Good,” “How to Be Happy,” “How to Be Loved” and (maybe especially) “How to Be Lovely” sound like dopey chapter titles from a self-help book or an especially insipid magazine. And yet they’re the central questions of a book by an empirically minded, free-market-loving, libertarian-leaning economist, Russ Roberts. Who in turn traces his education to the very godfather of capitalism in “How Adam Smith Can Change Your Life.”

But let’s back up. For more than 200 years, readers have debated the “problem” of “the two Adam Smiths”: the Scottish Enlightenment philosopher is best known for the (seemingly amoral) capitalist manifesto “The Wealth of Nations” yet also celebrated for 1759’s “The Theory of Moral Sentiments,” which explained how the good, upstanding, moral life was not necessarily a matter of pounds and pence, citing anecdotes like the one about King Pyrrhus.

Smith’s lesser-known book, says Roberts, “helped me understand my affection for my iPad and my iPhone, why talking to strangers about your troubles can calm the soul, and why people can think monstrous thoughts but rarely act upon them. He helped me understand why people adore politicians and how morality is built into the fabric of the world.”

Among our central goals, Smith said, was to be loved — by which he meant not just romance, but the respect of our communities — and to be lovely, meaning deserving of love. Bernie Madoff didn’t go to bed happy with himself because he knew that he didn’t deserve the adulation of his clientele. (Madoff was said to be relieved when he was finally caught.)

How do we stay loved and lovely? Feedback from the community. And community standards are an emergent order, a living, democratic, grassroots phenomenon that works like a marketplace.

Consider apples. How does your store know how many to stock? How much should they cost? Why are there almost always enough apples to go around, at a reasonable price, without a National Apple Council giving detailed instructions to the growers, the pickers, the truckers and the retailers? Because each of us plays a tiny but important role in sending signals to the marketplace. Complex networks of individual actions form a more complete pattern of the apple market than any central entity could ever design.

Just as the market works on feedback — if the price of apples rises, fewer people will buy them — so do social norms.

Roberts marvels at how, in the marketplace of standards, the once-common practice of spanking your children has all but disappeared, at least in his upper middle class circle. “I have never struck my kids,” he writes. “I’m very glad for that. I’m not alone. Most of my friends don’t hit their kids. This quiet revolution in parenting has happened without any legislation.”

It happened as Smith predicted. Man has an innate need to “respect the sentiments and judgments of his brethren; to be more or less pleased when they approve of his conduct, and to be more or less hurt when they disapprove of it.” Just as the market works on feedback — if the price of apples rises, fewer people will buy them — so do social norms.

Smith’s message, Roberts writes, was that “Being trustworthy and honest and a reliable friend or parent or child doesn’t just lead to pleasant interactions with people around you . . . being trustworthy and honest maintains and helps to extend the culture of decency beyond your own reach.”

That’s how you make the world a better place: by recognizing that you are part of a system and simply being a better person.

And yet the villain of “Moral Sentiments” is the “man of system” — the one who seeks to redesign everything according to some master plan, as if society were pieces on a chess board. Such men don’t understand that each individual chess piece has a mind and goal and aspirations of his own, perhaps “altogether different from that which the legislature might choose to impress upon it,” Smith wrote.

Moreover, thanks to self-deceit, men of system might even be reluctant to admit when their plans fail. “Those leaders themselves,” warned Smith, “become many of them in time the dupes of their own sophistry.”

A master visionary who can never confess to being wrong? Nah. Surely one of those will never come along.