The US military is funding an AI that’s learning to write its own code
One day non-programmers will be able to instruct AI's to create software on their behalf, this is one step in realising that goal and it has wide ranging ramifications for al of us, and AI development.
Key takeaways
- During its development BAYOU read the source code of over 1,500 Android apps, over 100 million lines of Java in all, which was then fed through its neural net to create an AI that, yes, can create and program other software.
- Computer science majors, rejoice, your homework might be about to get much easier.
Cite or link to this article
Griffin, M. (2018) 'The US military is funding an AI that’s learning to write its own code', 311 Institute, 11 May. Available at: https://www.311institute.com/the-us-military-is-funding-an-ai-thats-learning-to-write-its-own-code/ (Accessed: 1 October 2026).
If you’re tired of writing your own boring code then finally, or you’re a programmer that is just wistfully wishing for a day off once in a while, then, hot on the heels of another Artificial Intelligence (AI) so called "codeless programming" saviour, Microsoft’s DeepCoder, a new AI agent called BAYOU has arrived on the scene.
BAYOU, which you can try for yourself here, and which is described as a "system for generating API idioms," or "snippets of code that use API's," is a deep learning program that, put simply, works like a search engine for coding. Tell it what sort of program you want to create using a couple of carefully chosen keywords and, based on its best guess, BAYOU will spit out the java code that will do what you’re looking for.
BAYOU was developed by a team of computer scientists from Rice University who received funding both from the US military and Google to develop it, and they published a paper on it on arXiv where they describe how they built it and what sorts of problems it can help programmers solve.
During its development BAYOU read the source code of over 1,500 Android apps, over 100 million lines of Java in all, which was then fed through its neural net to create an AI that, yes, can create and program other software.
If the code that BAYOU read during its training included any sort of information about what the code does then BAYOU also learned what those programs were intended to do along with how they work and it’s this contextual information is what lets it write functional software based on just a couple of key words and basic information about what the programmer wants to achieve.
Computer science majors, rejoice, your homework might be about to get much easier. And teaching people how to code may become simpler and more intuitive in the future too as they may someday use this new AI to generate examples of code or even to check their own work, or, moving further out, it’s much more likely that they’ll be able to tell one of BAYOU’s distant kin what kind of program they want to create and it will do everything for them – no coding knowledge required. A phenomenon we’re already starting to see with the creation of new AI neural net designs.
Right now though BAYOU is still in the early stages, and the team behind it is still proving it works, however, for those of you thinking that this is the moment that AI’s become self-replicating then no, this isn’t that moment, this one is, BAYOU merely generates what the researchers call “sketches” of a program that are relevant to what a programmer is trying to write but those pieces still, at the moment at least, need to be pieced together and tailored by an experts hand to create the final application.
However, even though the technology is in its infancy this is a major step in the search for an AI programmer, something that’s been a longstanding goal for many a computer science researcher. In the past other attempts to create something that resembles BAYOU required extensive, narrow constraints to guide programmers towards the correct type of code but because BAYOU can get to work with just a couple of keywords, it’s much less time-intensive, and much easier to use overall, for the human operators.
FAQ
Why does this matter?
One day non-programmers will be able to instruct AI's to create software on their behalf, this is one step in realising that goal and it has wide ranging ramifications for al of us, and AI development.

About the author
Matthew Griffin Founder, 311 Institute
Matthew Griffin is a multi-award winning Futurist and expert in Disruption and Innovation, Geopolitics, Leadership, and Technology, who NASA have described as a "walking encyclopaedia of the future" and a "futurist Polymath."
Read full bio
Matthew Griffin is a multi-award winning Futurist and expert in Disruption and Innovation, Geopolitics, Leadership, and Technology, who NASA have described as a "walking encyclopaedia of the future" and a "futurist Polymath." 15-time best selling author of the "Codex of the Future" series, Matthew is the Founder and Futurist in Chief of the 311 Institute, a global Futures and Deep Futures advisory firm working with royal households, world leaders, G7, G20, and G77 governments, NGOs, and multi-national mid and mega cap firms to help them explore, shape, and lead the next 50 years of business and society.
An award-winning YouTube creator with over a million followers, with an unrivalled global reach and impact, Matthew is a highly sought-after international keynote speaker, lecturer, and mentor who collaborates with global leaders through the United Nations Alliance of Civilizations (UNAOC) and United Nations General Assembly (UNGA) to shape pivotal initiatives such as the UN’s AI for Humanity program, the United Nations Conference of the Parties (UN COP), and the World Economic Forum in Davos.
As the former Global Head of Cloud, National Security, and Enterprise Sales for companies including Atos, Dell-EMC, and IBM, Matthew has a proven track record of building multi-billion dollar business units and turning failing divisions into market leaders. His ability to identify, analyse, and communicate the implications of hundreds of emerging technologies and trends is unparalleled, and his insights are trusted by many of the world’s most respected organisations, including ABB, Accenture, Adidas, AON, ARM, BCG, Centrica, Citi, Coca-Cola, Dentons, Deloitte, Dow Jones, EY, Google, KPMG, Lego, Legal & General, LinkedIn, Microsoft, PepsiCo, Qualcomm, RWE, Samsung, Siemens AG and Siemens Energy, T-Mobile, UBS, VISA, Walmart, Workday, Worldpay and many others.
Regularly featured in the global media including the AP, BBC, Bloomberg, CNBC, Discovery, Forbes, Khaleej Times, Telegraph, TIME, ViacomCBS, WIRED, and the WSJ, Matthews mission is to help organisations create a fair and sustainable future whose benefits are shared by everyone irrespective of their ability, background, or circumstances.
What future do you need to see?
Choose one to get started on AI and intelligence and the future of your organisation.
Sources and further reading
- here askbayou.com
- 1703.05698.pdf arxiv.org
Source: first published by the 311 Institute on 11 May 2018. Cite as: Griffin, M. (2018). The US military is funding an AI that’s learning to write its own code. 311 Institute. https://www.311institute.com/the-us-military-is-funding-an-ai-thats-learning-to-write-its-own-code/
You are welcome to quote this article with credit and a link to the original.