This article is an excerpt from Atomic Habits, my New York Times bestselling book.

It can be tempting to blame failure on a lack of willpower or a scarcity of talent, and to attribute success to hard work, effort, and grit.

To be sure, those things matter. What is interesting, however, is that if you examine how human behavior has been shaped over time, you discover that motivation (and even talent) is often overvalued. In many cases, the environment matters more.

Let me share an example that surprised me when I first learned of it.

The Shape of Human Behavior

In his award-winning book, Guns, Germs, and Steel, anthropologist and biologist Jared Diamond points out a simple fact: different continents have different shapes. At first glance, this statement seems rather obvious and unimportant, but it turns out to have a profound impact on human behavior.

The primary axis of the Americas runs from north to south. That is, the landmass of North and South America tends to be tall and thin rather than wide and fat. The same is generally true for Africa. Meanwhile, the landmass that makes up Europe, Asia, and the Middle East is the opposite. This massive stretch of land tends to be more east-west in shape. According to Diamond, this difference in shape played a significant role in the spread of agriculture over the centuries.

The Remarkable Power of Environment

When agriculture began to spread around the globe, farmers had an easier time expanding along east-west routes than along north-south ones. This is because locations along the same latitude generally share similar climates, amounts of sunlight and rainfall, and changes in season. These factors allowed farmers in Europe and Asia to domesticate a few crops and grow them along the entire stretch of land from France to China.

By comparison, the climate varies greatly when traveling from north to south. Just imagine how different the weather is in Florida compared to Canada. You can be the most talented farmer in the world, but it won’t help you grow Florida oranges in the Canadian winter. Snow is a poor substitute for soil. In order to spread crops along north-south routes, farmers would need to find and domesticate new plants whenever the climate changed.

As a result, agriculture spread two to three times faster across Asia and Europe than it did up and down the Americas. Over the span of centuries, this small difference had a very big impact. Increased food production allowed for more rapid population growth. With more people, these cultures were able to build stronger armies and were better equipped to develop new technologies. The changes started out small—a crop that spread slightly farther, a population that grew slightly faster—but compounded into substantial differences over time.

The Invisible Hand

Environment is the invisible hand that shapes human behavior. We tend to believe our habits are a product of our motivation, talent, and effort. Certainly, these qualities matter. But the surprising thing is, especially over a long time period, your personal characteristics tend to get overpowered by your environment.

There is no evidence that the farmers of Europe and Asia were more talented or more motivated than farmers in the rest of the world. Yet, they were able to spread agriculture 2x to 3x faster than their peers. If you want to maximize your odds of success, then you need to operate in an environment that accelerates your results rather than hinders them.

How to Design a Better Environment

There are many ways to design an environment that promotes success.

Here are three strategies:

First, automate good decisions. Whenever possible, design an environment that makes good decisions for you. For example, buying smaller plates can help you lose weight by deciding portion size for you. A study from Brian Wansink at Cornell University found that people eat 22 percent less food by switching from 12-inch dinner plates to 10-inch plates. Similarly, using software to block social media sites can help overcome procrastination by putting your willpower on autopilot.

Second, get in the flow. A few years ago, PetSmart changed their checkout process. After swiping their credit card, customers were shown a screen that asked if they wanted to donate to “help save homeless animals.” Through this single strategy, PetSmart Charities raised $40 million in a year. 1

You can apply a similar strategy by designing an environment where good habits “get in the flow” of your normal behaviors. For example, if you want to practice a musical instrument, you could place it in the middle of your living room. Similarly, you are more likely to go to the gym if it is literally on the way home from work than if the gym is only five minutes away, but in the opposite direction of your commute. Whenever possible, design your habits so they fit in the flow of your current patterns.

Third, subtract the negative influences. Ancient farmers didn't have the opportunity to remove the barriers that held them back, but you do. For example, Japanese television manufacturers rearranged their workspaces to save time by eliminating unnecessary turning, bending, and swiveling. You can also reduce the negative influences in your environment. For example, you can make it easier to avoid unhealthy foods by storing them in less visible places. (Foods that are placed at eye level tend to be purchased and eaten more frequently.)

For more on how our environment shapes our habits (and actionable strategies to design environments that make your goals easier), check out my book Atomic Habits.

The Luck of the Environment

We are quick to blame our environment when things go poorly. If you lose a job, it's because the economy sucks. If you lose a game, it's because the officiating was bad. If you're late to work, it's because traffic was insane.

When we win, however, we ignore the environment completely. If you land a job, it's because you were talented and likable. If you win a game, it's because you played better. If you're early for a meeting, it's because you are organized and prompt.

It is important to remember that the environment drives our good behaviors as well as our bad ones. People who seem to stick to good habits with ease are often benefitting from an environment that makes those behaviors easier.

Meanwhile, people who struggle to succeed could be fighting an uphill battle against their environment. What often looks like a lack of willpower is actually the result of a poor environment.

Life is a game and if you want to guarantee better results over a sustained period of time, the best approach is to play the game in an environment that favors you. Winners often win because their environment makes winning easier.

This article is an excerpt from Chapter 12 of my New York Times bestselling book Atomic Habits. Read more here.