Making AI program itself has long been a dream in the field of artificial intelligence. Now, two researchers from Bloomberg and Intel LABS claim to have achieved the first AI system capable of automatically generating full software programs called “AI Programmer.” This “AI Programmer” uses genetic algorithms and Turing-complete languages to develop programs that can theoretically perform any type of task. The era of AI automatic programming has begun.

Making AI program itself has long been a computer scientist’s dream. So far there has been very limited work on this, such as making AI auto-complete programming languages or performing simple addition programs. The work we cover today is billed as the first machine learning system “AI Programmer” that can automatically generate a full software program.

The researchers say they have used the system to prove the long-held assumption that fully functional programs can indeed be generated automatically. For this particular job, AI Programmer uses genetic algorithms in machine learning to simulate complex instructions. Although now AI Programmer generated programs, the level of complexity is comparable to the results written by novice human programmers. However, the researchers believe that AI Programmer can write programs that go beyond the traditional scope and are not limited by human time and intelligence.

AI programs simply find the sweet spot between test complexity and computing resources. In other words, the possibilities are endless.

The researchers also say that we need to rethink and design new, machine-oriented programming languages, because current programming languages are human-oriented and not suitable for ML-based programming. “When considering the future of ML driver generation, we need to abandon and rethink the approach to typical programming language creation.”

Only by doing so, the researchers write, can we begin to envision a new future of computer software development driven by AI systems and guided by human creativity and design.

AI Programmer software architecture. As can be seen from the figure, there are very few parts driven by humans. You only need to input instructions at the beginning and receive functions suitable for a certain task at the end. The rest is done by machines.

AI Programmer: Automatically generates programs using genetic algorithms, theoretically able to complete all types of tasks

According to the paper, the researchers chose a typeless programming language and included only eight instructions to drive the AI Programmer generation software.

The programming language used by AI Programmer is Turing-complete, as shown in Table 1. In theory, turing-complete programming languages can handle any programming task with unlimited time and memory. In essence, any programming language with this quality can solve a multitude of programming problems. Again, the software generated by AI Programmer does all the work.

With this guarantee, let’s look at the core of AI Programmer — genetic algorithm.

To use genetic algorithms to generate software programs, a genome must first be created. A genome is a set of genes that have been combined together as a single unit. The genome of AI Programmer is encoded as a floating point array with fixed value ranges between 0 and 1 for each unique instruction, as shown in the gene range column in Table 1 above.

Once the genome is created, AI Programmer converts it into the appropriate program, executes it, and assigns fitness to the resulting program based on the program’s output. The closer the generated program is to solving the provided task, the better fit it is and the more likely it is to continue the next generation of evolution. In each generation, AI Programmer utilizes random selection as well as crossover and mutation to create subroutines that contain slight random perturbations and potentially better genomes than their parents to solve target tasks.

Figure 3 shows an example of building a genome from a floating-point array. Each value range maps to specific instructions in the programming language. Initially, these values are random, causing the resulting program to fail. However, one or two of them will be able to run and execute some valid instructions. The more successful a program executes, the more likely it is to continue to use the code and achieve more successful descendants.

To create offspring, parents pass on a portion of their genes to their children, as shown in Figure 4. In addition to inheriting their parents’ programming instructions, each child may also encounter mutations, which add controlled but random perturbations to specific genes. This causes the values of specific genes to change, causing the resulting programming instructions to change, which in turn changes the entire program.

Executables are ranked by their execution, as shown in Figure 5. In which specific programs are immediately removed from the genome pool, and successful programs are advanced to produce new descendants.

Output “Hello World”, reverse string, add, subtract, multiply, Output Fibonacci sequence…

AI Programmer consists of a modular framework designed by C#.NET. These include engines to run genetic algorithms, genomic encoders and decoders, sandbox readers to execute analog programs, and compilers to convert code into binary executables. Although C# was originally used when designing AI Programmer, it is important to note that the design principles are not limited to C#.

The researchers noted that the adaptive testing software framework of AI Programmer is malleable and has been developed. Users can design their own countless customized software, ultimately directing the system’s genetic algorithm (GA) generation and software program evolution.

If the target program aims to generate a string, such as “Hello World” (see figure above), the test score might be a number in the string. But because AI Programmer generates code at the byte level, the test score should take into account the incremental difference in output characters.

Researchers say that they can generate many software programs with AI Programmer. Table 2 is a list of generated programs.

To start, the researchers had AI Programmer generate a very simple program to output “hi”. After 5700 generations, the test was successful. The generated code is shown in Figure 9.

After 580,900 generations, “Hello World” is generated, as shown in Figure 10.

After 6,057,200 generations, AI Programmer successfully generated “I Love All Humans”, as shown in Figure 11.

AI Programmer generates an inversion string. The generated code is shown in Figure 13.

[Fixed] AI Programmer generates addition programs after 92,400 generations The subtraction program is generated after 177,900 generations, as shown in Figure 15.

The generator shown in Figure 16 can output Fibonacci sequences from two initial input values.

Automatic creation of software programs using genetic algorithms

Abstract

In this paper, we introduce the first machine learning (ML) system capable of automatically generating complete software programs, all the way with minimal human involvement. The system, called “AI Programmer,” takes genetic algorithms (GA) as its core and uses a tightly constrained programming language to minimize the overhead of its ML search space. The novelty of AI Programmer stems in part from (I) unique system design, including a hand-crafted interpreter for efficiency and security, and (ii) enhancements to genetic algorithms, Instruction -gene random binding and programming language-specific genome construction and elimination techniques were included. We describe in detail the system design of AI Programmer, how the system works in detail, and experimental data using mainstream cpus to demonstrate its software generation capabilities and performance.

The paper addresses

Source: New Jiwon