
Google teaches a robot to program itself
Researchers at Google have developed an algorithm that can write its own software for robots from natural-language instructions.
PaLM, our latest & most capable language model, can unlock new possibilities in robotics.
For example, read about Code as Policies, an approach that, when given natural language instructions, uses language models to write code that controls robots→ https://t.co/hTJ9kbgMdq (2/3) pic.twitter.com/5j11oPVSsJ
— Google AI (@GoogleAI) November 2, 2022
The Code as Policies (CaP) language model, built on PaLM, is designed to interpret natural-language instructions and turn them into code that a robot can execute.
Researchers trained the algorithm by giving it examples in the form of programmer comments and the code that accompanies them. This enabled CaP to learn new instructions.
“The model autonomously generates code that refactors API calls, synthesizes functions, and expresses feedback loops to create new behavior at runtime,” the developers said.
To prompt CaP to write new code for specific tasks, the team supplied it with ‘hints’ such as API availability or tools, along with several paired instruction examples. This enables the model to compose programs for the robot.
According to the developers, CaP can recursively define new functions, accumulate its own libraries, and autonomously build a dynamic code base.
“Having received a single set of instructions once, it can develop some code that can then be repurposed for similar instructions later,” they added.

CaP can employ arithmetic operations and the logic of certain languages. For example, a Python-trained model uses the appropriate if/else and for/while loops as needed. It can also apply external libraries for additional functionality.
The engineers note that CaP’s capabilities remain heavily constrained. It relies on the language model to provide context for its instructions. If prompts do not make sense, CaP will not be able to write code.
The model cannot handle dozens of parameters at once.
In June 2021, GitHub introduced an AI-powered code-autocompletion tool Copilot. The language model for the tool was developed by OpenAI.
In October 2022, programmers announced plans to sue Microsoft for training AI with their code.
Follow ForkLog on Telegram: ForkLog AI — all the news from the world of AI!
Рассылки ForkLog: держите руку на пульсе биткоин-индустрии!