Artificial intelligence, robotics and coding

Can computers think? What is intelligence? Can we build a robot that learns from its past experiences? These are some of the tricky questions Year 6 students have been tackling as they explore the role of robots and machine technology in society while learning to code.

The exciting units of work for this year's robotics program at Ravenswood School for Girls in Sydney have been developed through a CSIRO STEM Professionals in Schools partnership, which pairs classroom teachers with experts working in STEM (science, technology, engineering and mathematics) industries.

Matthew Scadding, ICT Integrator and TAS teacher has been working with Dr Joshua Ho, Head of the Bioinformatics and Systems Medicine Laboratory at the Victor Chang Cardiac Research Institute and senior lecturer at the University of New South Wales.

‘We've been registered with the [CSIRO] program for a few years now and we've worked with multiple STEM specialists,' Scadding tells Teacher. ‘They are an invaluable resource to us and our students as they have an incredible depth of knowledge and experience from their specialist STEM area.

‘The main value Joshua has brought is those big ideas, those big questions – we haven't previously done that with the robotics program in Year 6. Before, we'd been teaching coding and doing activities with the robot but I don't think we've gone into that sort of philosophical and social side of the robots.'

The new staffroom at Macgregor Primary School

[Dr Joshua Ho working with Year 6 students at Ravenswood Girls School. Image supplied.]

In Term 3, students have been working with a lawn bowling robot to discover if it could deliver a perfect performance every time by learning from its past mistakes. Scadding says Ho sparked their curiosity by showing them a video of a robot learning to flip a pancake. ‘In the first few attempts the pancake flies off in many different directions, but each time it's learning and getting better. By about the 50th attempt the robot could flip a pancake perfectly.

‘So, that was great source material for this task and Joshua's idea was the lawn bowler. Can we teach the robot to bowl the perfect ball every time? Like the pancake, the task was about accuracy. It wasn't about how hard we could hit the ball or how fast it could go, it was about pushing this ball so it would be accurate and rest next to the jack.'

Ho built the lawn bowler using a Lego Mindstorms EV3 robotics kit. By coding the arm, students were able to control the accuracy of the ‘ball' (in this case, two EV3 tyres) bowled after observing the robot's performance and giving it feedback. As the students continued reporting back, the robot adjusted the force it applied, improving its accuracy each time until it delivered the perfect ball.

Scadding says although this was a complex program, the students were able to understand sections of the code due to their prior learning. ‘They'd been using the robots all year and programming them all year. Joshua will teach them “what is a variable?”, so when they saw this lawn bowling program they could see initially that there were variables there. They knew they were storing data, they knew they could store a value for the force … they've already learnt that so they can then apply it to this [activity]. Also, the idea of loops in programs and switches, they'd previously learnt the coding behind those concepts.'

The new staffroom at Macgregor Primary School

[Thanks to their prior learning, students spotted that the initial lawn bowler code, delivering a pushing motion to the arm, included values for how much force to apply. Image supplied.]

The new staffroom at Macgregor Primary School

[A chunk of the more complex lawn bowler code called ‘the switch'. Image supplied.]

‘That's why this integrated approach is so great. And the lawn bowling task, when you do unpack it and break it down into the computational thinking behind it, you can see all these skills that are taught because of this project. That's why we love this STEM and project-based learning approach – it includes so much learning that's not taught explicitly but it's essential for that task to happen.'

This is the second year Ho has worked with the school. He says having a robotics kit is a useful resource for students. ‘Instead of just getting them to do very simple robotic things – such as get the robot to move – I want to introduce scientific concepts and mathematical concepts.'

Prior to tackling the lawn bowler, the Year 6 students built a heart rate monitor. ‘We can introduce the heart, heart function and heart rate – so, basic science – and also in calculation of the heart rate you need to divide the number of beats by a minute to get beats per minute, so that involves some level of mathematical thinking as well,' Ho explains.

He has also introduced them to the work of Alan Turing and the Turing Test (a way of assessing whether a computer is ‘intelligent'). ‘The main concept we wanted to introduce to them was that artificial intelligence is not a mysterious, difficult concept – it is really about making computer programs that can mimic human behaviour, making robots pretend to have human behaviour. And that's what the Turing Test really is about, it's saying that to pass the Turing Test all you want to do is to get a robot to behave like a real human, as long as an observer cannot distinguish between a robot and a human face on that behaviour then it's said to be artificially intelligent. So, it's not really about robots being able to seriously have real human life power, it's really about the robot having human-like behaviour. That's something that will take the mystery away I think from the scariness of robots, make them see that this is just really a tool that people have been successfully programming to have human-like behaviour and that has been very useful in many aspects of life.'

Ho says allowing Year 6 students to understand these basic concepts and consider some of the big questions in relation to robotics and artificial intelligence is important. ‘This is the generation that will be using a lot of this artificial intelligence. It's extremely likely that they will be sitting in a self-driving car in their lifetime. They need to know this and that's why we've devised some very simple exercises to get them to understand at least the very basic concept of how artificial intelligence and machine learning can be implemented in their robot. For example, we ask questions such as “can a robot learn?” and “how does a robot learn?” and we kind of simplify that down to at least [partly being] trial and error, which is a concept that they can understand and which they know. Then we try to build simple trial and error exercise using the robot and get them to do tasks that mimic learning.'

Any school can apply to take part in the STEM Professionals in Schools program, which is funded by the Australian Government. Scadding says having the opportunity to work with industry experts has been an outstanding learning experience for both staff and students.

‘We love the partnership, we love the program – they really improve us as teachers and they really develop the knowledge and understanding of our students as well. It's such a win-win situation. They have that professional and real-world experience. [As teachers] we get a different perspective from them, we get new ideas. The school also has a mathematician that comes in and teaches the girls, and we've had other scientists as well who've come in.

‘Joshua has really improved my thinking about what's possible. We have the hardware and software but you can apply that in many, many ways and his ideas are so exciting and I think pretty cutting edge. We keep hearing about the future of work, automation, robots and the impact of that, and even at a young age in Year 6 the more they understand what's happening the better prepared they are for that future.'

Reflecting on the benefits of the partnership from his perspective, Ho says: ‘Being in a primary school and working with Year 6 students, I see a whole lot of creativity that unfortunately I may not always see in university students [working as a senior lecturer] and I'm, frankly, quite inspired by that.

‘It's also inspired me in thinking about what kind of projects I do. One of the exercises that we did in the heart rate monitor project actually, in turn, inspired me to start a new project in my current research work to think about using wearable devices to potentially monitor heart failure patients' cardiac health.'

Matthew Scadding says working with industry experts has been a win-win situation for staff and students. How could your school develop links to tap into external expertise?

Do you already have a robotics program at your school? Consider the skills your students are learning. Are they skills that can be applied into other subject areas? In what way?

Think about the technology resources you have available at your school. Are you integrating them across different subject areas?