Google Wants Robots to Start Coding, Launches ‘Code as Policies’ to Train Them

Google Wants Robots to Start Coding, Launches ‘Code as Policies’ to Train Them

Google has developed Code as Policies, a program that will help robots to start coding

What makes programming difficult to learn? The major reason why programming is considered difficult to learn is primarily due to the complexity of the instructions that computers comprehend. You can't give computers instructions in English or any other human language. But Google's robotics researchers are exploring a way to fix that by making robots start coding. Yes, you read it right, Google has developed a robotic program (Code as Policies) that can write its own programming code based on natural language instructions. Instead of having to dive into a robot's configuration files to change block_target_color from #FF0000 to #FFFF00, you could just type "pick up the yellow block" and the robot would do the rest.

Code as Policies (or CaP for short) is a coding-specific language model developed from Google's Pathways Language Model (PaLM) to interpret the natural language instructions and turn them into code it can run. Google's researchers trained the model by giving it examples of instructions (formatted as code comments written by the developers to explain what the code does for anyone reviewing it) and the corresponding code. From that, it was able to take new instructions and "autonomously generate new code that re-composes API calls, synthesizes new functions, and expresses feedback loops to assemble new behaviors at runtime," Google engineers explained in a blog post published this week, In other words, given a comment-like prompt, it could come up with some probable robot code.

To explore this possibility, Google has developed a Code as Policies (CaP), a robot-centric formulation of language model-generated programs executed on physical systems that helps robots to start coding. CaP extends our prior work, PaLM-SayCan, by enabling language models to complete even more complex robotic tasks with the full expression of general-purpose Python code. Google's Code as Policies allows a single system to perform a variety of complex and varied robotic tasks without task-specific training.

The AI systems that power CaP originally weren't designed to generate robot configuration code. According to Google, its researchers trained the systems to do so using a method known as few-shot learning.

Teaching an AI system to perform a new task usually involves supplying it with a large number of examples that demonstrate how the task should be performed. With few-shot learning, researchers can train an AI system using only a few examples, which speeds up development. Google's researchers trained CaP by supplying it with examples of how natural-language instructions can be translated into robot configuration code.

CaP writes software in the Python programming language. In addition to producing new code, the tool can also draw on software libraries, pre-packaged collections of code that automate common tasks. Google says that its approach has proven more effective than existing approaches to configuring robots for new tasks.

"Our experiments demonstrate that outputting code led to improved generalization and task performance over directly learning robot tasks and outputting natural language actions," Liang and Zeng detailed.

Alongside the code for CaP, Google has released a benchmark testing tool to support further research. The benchmark tool will enable researchers to more easily compare how well different AI systems perform robotics-related tasks.

Related Stories

No stories found.
logo
Analytics Insight
www.analyticsinsight.net