The better we understand how our brains function, the closer we get to controlling them at a molecular level. And that means a possible cure for depression, but it could also mean foolproof brainwashing.

Over at Wired, Quinn Norton has just published a series of articles that take you on an in-depth tour of the nascent science of neuroengineering. You and I can just call it "brain hacking," because that's what it is. The scientists that Norton interviews are literally rewiring mouse brains and sticking devices into them that instigate new behaviors. (See video.) They've mastered the technique of causing neurons in mouse brains to fire when they want them to, which means they can literally make a mouse decide to turn to the left just by hitting a button.

How do they do it? By using viruses to insert two foreign genes into the mouse brain: one that causes neurons to fire when exposed to blue light, and one that causes neurons to go silent when exposed to yellow light. These new genes integrate themselves seamlessly into the mouse neurons, essentially adding a light switch to neural impulses. As Norton explains:

Then there's the matter of getting the right colors of light past the skull and into the precise spot to be controlled. All of this means Deisseroth's team has to open up the mouse's head surgically, apply the virus to the desired area, then feed in a fiber optic cable that will continue to protrude out of the mouse's head after the surgery has healed up. Then they attach the fiber optic cable to lasers that can pump in the precise frequencies of light needed to control the cells.

Once it's done, though, they have absolute control over the section of the brain involved. Fed into the left motor cortex, the area that controls movement, it could make someone dance to the right. Fed into the pleasure center of the brain, it could make someone happy with the press of a button.

It's hard to tell if a mouse is happy, but attaching this system to its motor cortex makes a dramatic demo. Deisseroth, who is still developing this technology at Stanford, plays the video of a mouse wandering around its container. The fiber optic cable leading into its brain is barely visible until someone turns on the blue light. Then the animal runs to the left in large, almost perfectly circular loops. "You've got to wonder what he's is thinking," Deisseroth muses. "It's 'I gotta go left, I gotta go left.'"

Read more about this at Wired.

Imagine what will come next, when these devices get less crude and are wired into people's pleasure and reward systems. That's exactly what Norton asks in a follow-up article on dialing up happiness.