Story highlights Researchers use brain scans to show how our brains seek rewards

It might help researchers understand addiction

(CNN) Have you ever tried to stop yourself from doing something, but were unable to summon up the willpower? A new study finds your brain might be working against your best intentions, and scientists think they might know what could help you unlock your better self.

We've all seen it happen. Some well-intentioned co-worker stops at the bakery and brings the most delicious looking doughnuts to your meeting. Intellectually, you know doughnuts are among the foods you are not supposed to eat. They sit in front of you and they smell delicious. It's like they're calling out your name. By the end of the meeting, you have sliced off a piece of the German chocolate. OK, maybe two. Then, a slice of the cinnamon twist, and a slice of the red velvet. You may even have tried the salted caramel bacon, and you don't even really like bacon.

What happened? Blame that Bad Idea Bear of a brain of yours, or more precisely, a chemical in it called dopamine. It's the one your brain releases when you experience or anticipate pleasure or a reward, and it's likely what talked you into having another bite (and another, and another).

To test this, scientists at Johns Hopkins University recruited 20 healthy people and put them in a brain scanner so they could observe what happened in their brain as they made choices. They asked the volunteers to identify objects on a computer screen. On the first day of the experiment, they were asked to pick out the red and green items. When the volunteer picked a green shape they got a quarter. When they found a red object, they earned $1.50. They did hundreds of these trials. The next day, they were put in the PET scanner again and as the scientists watched what happened in their brains, they asked participants to identify a particular shape, which came in a variety of colors. This time, there was no reward when they got the shape right and the color didn't matter. But when a red or green object appeared on the screen, even if it wasn't the object they were looking for, the volunteers were drawn to it. Dopamine flooded the part of their brains that controls attention.

Volunteers did find the shapes they were supposed to look for, but the color that had rewarded them distracted and slowed them down.

Read More