Robots may one day take over the world, leaving humanity to wonder when artificial intelligence (AI) became too powerful. That scenario is unlikely in the near term because humans have a major advantage over machines: the ability to learn. But that gap may be about to shrink as scientists have created a new, faster method for imbuing computers with sophisticated AI algorithms.

A study published Thursday in the journal Science describes the new system. It greatly reduced the amount of time a machine needed to create new examples of simple visual cues based on what it learned.

Machine learning has been making great strides, but the progress still relies heavily on the hard work of researchers. It takes a lot of time and experimental data for machines to recognize patterns. For example, if a human is shown a photograph of a dog, only a few examples are needed for an individual to figure out the concept. If asked to create a new example of a dog -- based on the past learning experience -- a human can do that with ease. With machines, even the smartest ones require huge data sets and plenty of training, said Gilbert Chin, senior editor of Science.

The above video highlights the work of the researchers and features a short summary by lead author Brendan Lake.

The researchers from New York University, the Massachusetts Institute of Technology and the University of Toronto used an algorithm to teach machines to "learn like a human."

"Children may need just a handful of examples to learn new words like pineapple or guitar while the best computer algorithms require tens or hundreds of examples," lead author Brendan Lake, Moore-Sloan Data Science Fellow at NYU, said during a press conference.

To mimic how a human thinks, Lake and Ruslan Salakhutdinov, an assistant professor of Computer Science at the University of Toronto, and Joshua Tenenbaum, a professor at MIT in the Department of Brain and Cognitive Sciences and the Center for Brains, Minds and Machines, created an algorithm — Bayesian program learning framework — that translated simple visual concepts into easy-to-understand computer programs for machines. The inspiration for the algorithm came from the consistent way — from pen strokes to direction — children drew characters, Blake said.

The computer programs turned handwritten letters of the alphabets from around the world into code. From there, a machine could learn these character sets and, when prompted, create new examples of these characters. To test the success of their system, the researchers conducted a "visual Turing test" to determine if a human judge could tell the difference between a machine-generated example or a character created by a human.

Human or Machine The test given to judges to see if they could tell the difference between humans and machines Photo: Brendan Lake

Fewer than 25 percent of the judges were able to spot the difference between machine and human at a rate better than chance, meaning the machine had human-level performance.

"We are still far from building machines as smart as a human child, but this is the first time we have had a machine able to learn and use a large class of real-world concepts — even simple visual concepts such as handwritten characters — in ways that are hard to tell apart from humans," Tenenbaum said in a statement.

This is just the latest interesting development in the world of robotics and AI. Deep Learning is of particular interest, but it requires hundreds of training sessions. Facebook is especially interested in machine learning, having developed the DeepFace program to great success. DeepFace can recognize the identity of an individual even if a face is not fully visible in a photo with 83 percent accuracy, New Scientist reported. Google's Deep Dream is another example of an AI program that was taught how to understand and recognize patterns.