This story appears in the June 2018 issue of National Geographic magazine.

I teach undergraduate psychology courses at the University of Maryland, and my classes draw students with diverse interests. But every one of them perks up when I pose this question: Do you want two extra-credit points on your term paper, or six points?

I tell my students that the extra-credit offer is part of an exercise illustrating the interconnectedness of choices individuals make in communities. I explain that the exercise was inspired by an ecologist named Garrett Hardin and an address that he delivered 50 years ago this summer, describing what he called “the tragedy of the commons.” Hardin said that when many individuals act in their own self-interest without regard for society, the effects can be catastrophic. Hardin used the 19th-century convention of “the commons”—a cattle-grazing pasture that villagers shared—to warn against the overexploitation of communal resources.

I’m hoping that my students will grasp the connections between the classroom exercise, Hardin’s ideas, and our planet’s most pressing problems (including climate change). I allow them to choose between two points or six points of extra credit—but there’s a catch. I stipulate that if more than 10 percent of the class members choose six points, no one gets any points. The extra-credit points are analogous to water, fuel, grazing pasture (from Hardin’s analysis), or any natural resource.

According to some free market economic theories, if everyone strives for maximum personal benefit, then societies will thrive. By this logic the student’s rational choice would be to pick six points, just as the shepherd’s rational choice would be to use as much grazing pasture as possible. And those who maximize personal consumption aren’t greedy—they’re strategic.

But when everyone chooses this path, the common resource is overtaxed, and societies end up with overharvesting, water shortages, or climate change.

A possible solution seems simple: If everyone just moderated their consumption, we’d have sustainability. As many of my students say, “If everyone chooses two points, we’ll all get the points.” And yet, for the first eight years I used this exercise, only one class—of the dozens I taught—stayed under the 10 percent threshold. All the other classes failed.

This exercise was developed more than 25 years ago. Professor Steve Drigotas of Johns Hopkins University had been using it for some time when he administered it to me and my classmates in 2005. My class failed too—and I, who had chosen two points, was incredibly frustrated with my peers who had chosen six.

In 2015 one of my students tweeted about the exercise—“WHAT KIND OF PROFESSOR DOES THIS”—and his lament went viral. People around the globe weighed in: Does so many people choosing six points mean it’s human nature to be greedy and selfish?

Actually most people aren’t. But it’s very tricky to get people to cooperate, especially in large groups of complete strangers. After all, if someone else is taking more for themselves (running more water or choosing six points), why shouldn’t I? But if we all think this way, eventually we’ll all lose.

Hardin suggested that education might make a difference—that if we teach people about the consequences of taking too much, they might not. I’ve been skeptical about this idea. When my student’s tweet went viral, some colleagues said that I wouldn’t be able to use the exercise again (because students would already know how it works). I laughed. If it were only that easy! My suspicion was justified. Even after the exercise got wide exposure, my students still failed the challenge to get the extra-credit points.

Despite this I remain optimistic. After all, most of my students, about 80 percent, choose two points—just as most people choose to cooperate in real-world situations. Most of us want to do what’s right. But that alone won’t solve our problems, so we need to think creatively and use behavioral science to find solutions.

In 2016 I decided to change things up. In hopes of finding a way to increase cooperation, I drew from the scientific literature on social groups and introduced a third option: Students could choose two points, six points—or zero points. That’s right. Zero. Why would anyone do that? Well, for each student who chose zero points, one of the six-point choosers (selected randomly) would lose everything, reducing the total number of six-point choosers by one.

The zero-point option is self-sacrificial; students forgo points for themselves in order to help the group by restraining those who take too much. In behavioral experiments this type of action is called altruistic punishment, a term coined by economists Ernst Fehr and Simon Gächter. Their research documented people willingly giving up some of their own resources in order to punish those who behave selfishly in a group context—and doing so in the belief that every individual profits from increased cooperation.

Usually a few of my students each semester choose the zero-point option, and sometimes that’s all it takes. Just a handful of people can make a huge difference—that is, a few self-sacrificing students can bring down the total number of six-point choosers to below the 10 percent threshold. This additional element has dramatically increased cooperation in my courses. Now roughly half my classes receive the extra-credit points. In my opinion this is a remarkable turnaround. And some of my classes have done this without anyone actually choosing the zero-point option; simply knowing it was available was enough to increase cooperation.

Though this type of solution may work on the small scale of a classroom, won’t we need much larger action to curb global problems like climate change? Yes, but the principle is the same–it’s about collective action and reducing overconsumption. For example, recently I started volunteering with Citizens’ Climate Lobby (CCL), an organization that advocates for a policy known as carbon fee and dividend. This plan would put a steadily rising fee on fossil fuels and distribute the money raised back to American households (to protect families against rising costs). Ultimately this would reduce fossil fuel consumption by making this type of energy more expensive to use—so reducing consumption would be better for both our wallets and the environment. At CCL, volunteers meet with lawmakers and conduct outreach to the community. Through our efforts—again, collective action—we gain allies in Congress and the public. By early this year the House’s bipartisan Climate Solutions Caucus had 70 members (half Democrats and half Republicans) from states across the country.

As I write these words, I’m sitting next to my three-month-old daughter, Amelia. Though the planet faces daunting problems, I’m determined to help her have a bright future—so I have to believe that action by even a few people can make a significant difference. A few students can help an entire class of hundreds gain a leg up in the course. A few people who recycle or compost can have a contagious effect on others’ lifestyles. A few politicians’ votes can alter national and international policies that affect millions.

The challenge that Garrett Hardin described 50 years ago remains today: Our survival depends on each of us and all of us conserving the commons. I choose to remind myself of that with these wise and hopeful lines from the Beatles: “All the world is birthday cake / so take a piece / but not too much.”