Andrej Karpathy published his work on auto research where he used ai to improve itself .
It brought back memory of old project assignment. This was a time when we were hired as interns at Infosys and we had to give this final coding assignment that would make or break or employment .
The project
In this we were given a working C program that would produce certain result already.
Our job was to read this code file via another C program. This new C program that we were to write had to modify the original C code following bunch of rules.
First set of rules wear on formatting; for example if there are multiple variables declared on a same line they should be rearranged so that there is one variable declared each line. Then some variables were declared and initialized in same statement ,some were not.Our job was to rearrange them such that the declarations would occur before the assignment.Again one statement at a time.In case there were multiple variables declared or initialized they had to be separated as one statement per line.
Another rule was that their naming convention.Here we had to find their type and use that as prefixes to the original variable names. Another rule was that these variables would be rearrange in the sequence of their appearance in the code. Similarly we had to rearrange the functions in the sequence of their appearance.
We had to retain any comments or imports at their new relevant positions.I might have forgotten few rules here but you get the idea.
The last step was the eval. Our new program had to compile the modified program and execute the a dot out file and compare the result to original files output.
We felt the presence of auto research
As such the idea of program writing or modifying itself is classic item in computer science. When i/we were doing assignment i got fascinated by that idea.However we didnt have power of LLMs and their long context window with us at that time.So the idea of writing a program to create a sophisticated self improving,self modifying program sounded too acadmic and too cumbersome so i stopped my mental pursuit there*.But now LLLs are here and stimulating self awarenesses and self reference for a program is trivial.So its a fun times for programmers i say..
*yacc/lex and sed/awk was where i took refuge.Thanks to “Archie” mentors.