Even cobras need to defend themselves sometimes.

These venomous snakes keep adversaries at bay by spitting a neurotoxin or other substance into their perceived enemy's eyes, causing severe pain and sometimes blindness. And they are incredibly accurate in hitting their target—even though it is often moving and more than a meter away.

But how can a cobra be so adept at adjusting its venom trajectory (usually launched straight from openings in the fangs) to different scenarios, when fang and venom-opening sizes remain the same?

"Basic fluid dynamics would lead you to think that the pattern of the fluid should be fixed," Bruce Young, of the Department of Physical Therapy at the University of Massachusetts Lowell and co-author of a new study, said in a prepared statement.

To find out, Young and his colleagues headed into the snake-filled labs of Horst Bleckmann at the University of Bonn Institute of Zoology to taunt some cobras. After donning proper protection, Young met his experimental partners: red spitting cobras (Naja pallida), black-necked spitting cobras (Naja nigricollis) and black-and-white spiting cobras (Naja siamensis). "I just put on the goggles and the cobras start spitting all over," Young said.

He was also outfitted with accelerometers on his head, and his human colleagues used high-speed video to film cobras spitting and then compared the movements of the two. The results were published online May 14 in The Journal of Experimental Biology.

The researchers found that the cobras not only tracked Young's head movements but also seemed to predict where his eyes would be 200 milliseconds ahead of the current time. Researchers had previously found that sudden changes in a target's head movements would often spur a stream of venom from the snakes. As the researchers noted in their paper, "At the onset of the new momentum it could be argued that the most likely course of future movements (at least over the short duration required for venom spitting) is in the same direction."

The cobras began spitting, on average, 208 milliseconds after Young changed the direction of his head movement (the first reported reaction time reported for a reptile, the authors note, which is similar to that of humans).

As the researchers pointed out, "The cobra is at a 200-millisecond disadvantage; unless the cobra compensates for its visual reaction time, it will be spitting at a space where the target was 200 milliseconds earlier." To make up for this lag, before it spits, the cobra accelerates its head movement, "enabling the cobra to 'catch up' to the target," the researchers wrote. And about 65 milliseconds before the venom projection started, the snake would begin rotating its head, a movement that continued through the actual spitting, allowing the poisonous stream to cover a plane of probability where the target's eyes might be in the near future.

"It predicts where I am going to be, and then it patterns its venom in that area," Young said.

These findings, complete with the speedy reaction and high accuracy, suggest a higher level of neural processing than most reptiles are assumed to have, the authors concluded.