Successfully navigating a complex maze is the basic lab test for intelligence. Rats can do it. Cuttlefish can do it. And now, inanimate droplets of oil can do it. By creating a pH gradient, scientists induced the an oil drop to navigate a maze, an advance with important applications in drug delivery, urban planning, and computer modeling.

To propel the drop of oil through the maze, scientists at Northwestern University in Evanston, Illinois, filled the maze with an alkaline solution, and placed an acidic compound at the end. That arrangement created a pH gradient in the maze that pulled the electrically neutral oil drop from one end to the other. By drawing the oil through the maze chemically, the scientists set up a situation where the droplet would eventually complete the maze even after taking some wrong turns.

The researchers devised the experiment as part of a project to develop new anti-cancer drugs. They were looking to solve a problem where drugs effective in the lab fail to cure the disease, due to the medicine’s inability to navigate the maze of blood vessels leading to a tumor. With this discovery, the scientists may have found a way to encourage anti-cancer medication to migrate to the right spot, even after getting lost in the body’s intricate circulatory system.

Even beyond medicine, this technique may have a number of unique applications. Running oil against a pH gradient could generate mechanical energy in a nano-machine, or running it through a special maze could help solve a class of maze-like math problems, called NP-complete problems, that computers are notoriously poor at completing. Or we could lay down bets as to whether the oil could outdo a rat in a maze race.