Judges said what stood out about the project was the fact that James achieved it largely unassisted and on a low budget.
"Translating thought patterns and physical manipulations into a coherent computer code is a remarkable feat," they said.
Other students to win major awards investigated a range of projects from cyber bullying to the effect of varroa on honey bee diversity, and the genetics of white clover.
The 20 participants in the event spent the last week being hosted by science and technology organisations including the Leigh Marine Centre, Niwa and the Liggins Institute.
Royal Society of New Zealand chief executive Di McCarthy said the programme was designed to excite young students about a career in science in New Zealand.
Her organisation sponsored three of the top awards, including cash scholarships and trips to Sydney, and sightseeing flights over Antarctica.
"These are our top science students from high schools around the country and they have put hours and hours into outstanding science and technology projects," she said.
James won the DairyNZ Travel Award and with it an all-expenses-paid trip to the Taiwan Science & Engineering Fair in late January.
He will compete with students from 17 other countries and be hosted by a Taiwanese family during his stay in Taipei.
The winners
* Kate Gear, 14, Taradale High School Study of cyber bullying led to development of resources to counter the problem.
* Timothy Harker, 17, Onehunga High School Predicting foot- print size of rare Duvaucel's Gecko.
* Hamish McMillan, 18, John McGlashan College, Dunedin Investigated varroa's effect on honey bee diversity.
* George Moon, 17, Burnside High School, Christchurch Creating online system where all students at Burnside can register for particular courses electronically.
* James Watson, 17, Burnside High School, Christchurch A robot that can solve the Rubik's cube.
* Nicolette Adamson, 17, Morrinsville College, Waikato Linked teat condition to risk of mastitis in cows.
* Minushika Punchichewa, 16, Palmerston North Girls' High School Investigation in the genetics of white clover.
* Sohail Abdulla, 17, Mt Roskill Grammar School Designed a robotic window cleaner.
* Hannah Ng, 18, St Cuthbert's College, Auckland Study into myopia (short-sightedness).