What age is too early to be learning about robots and programming? Based on the results of a world-first trial, an Australian education researcher has announced that even 4-year-olds can learn the basics.

The next few decades will be critical in kids learning to code, with demand for programmers in medicine, manufacturing, and agriculture set to increase. Add that to the fact that artificial intelligence is increasingly becoming an important part of our lives, and it's clear that now's the time to ensure that generations of the future know how to handle them.

So how do we make sure that we get kids involved in the newest technological advances? It looks like the answer is getting them interested young.

"It is really important that children have these skills early in life but we need to make it fun for them and think about how they can be creative," said Christina Chalmers from the Queensland University of Technology (QUT) in Australia, who is a leading authority on the application of robotics in classrooms.

In fact, the integration has started already in some areas, with NAO robots being added to two schools in South Australia as part of a world-first study, and Queensland implementing compulsory coding and robotics in primary and early secondary schools late last year.

"Coding is basically telling a computer what you want it to do through step-by-step commands," Chalmers said. "Robotics activities are very effective because they are hands-on and students get immediate feedback on whether their robot and program works or not."

And 4-year-olds might be smarter then we think, with these kids already able to understand how robots receive their commands.

"Preliminary findings from a current study have shown even pre-school students have gone beyond simply playing games with a NAO robot," said Chalmers.

"They've drawn pictures of their 'robot' classmate and been able to explain how the robot received its coded messages wirelessly. This involved quite complex conceptual thinking by 4-year-olds as to how the robot's behaviour was being controlled," she adds.

Although the idea of teaching robots and complex coding to kids as young as four might seem a little ambitious, there's evidence to suggest that because these tasks are so difficult, even if the kids fail to grasp them from the get-go, it could actually help them to learn better in the long run.

"It arouses students' curiosity in a way that fosters problem-solving… They are allowed and even at times encouraged to fail in order to work out what went wrong and learn from their failures and share and develop their ideas with other students."

So where does this leave us? The earlier schools and parents can get their kids into programming, and other forms of science, the less likely they are to dislike it later.

"Research tells us that if kids don't form positive attitudes towards science, maths, and technology early in life, they can find it difficult to engage later on," Chalmers said.

But sometimes it's just as good to show exactly how excited kids are when they get to play with real-life robots. If you don't believe me, check out these cute school kids below playing with the NAO robots in their schools:

Queensland University of Technology is a sponsor of ScienceAlert. Find out more about their research.