I am curious about writing code in C# that "writes itself". I know that this is not possible in a broad sense, but I was thinking about setting up some kind of format for a dynamic assembly that defines everything except the body of some target function. Then an algorithm or maybe neural nets attempt to fill in the function body. After this the assembly is then executed, and the newly launched assembly then attempts to call the target function and after that creates another new assembly based of the same code, with hopefully a better implementation of that target function.
Given this kind of behavior would C# and dynamic assemblies be a suitable choice (I am concerned about the amount of time creating, and executing the assemblies would take). Is there some language that specializes in dynamically creating code to be executed, or is C# a good enough option?
Also any comments on the approach or setup of this whole assemblies creating assemblies idea is welcome, and appreciated! (I am very new if you couldn't tell)
Thanks!
I may be wrong, but it sounds very much like you are interested in Genetic Programming. A good base would be some reading (I would recommend this book on machine learning, it's great).
Specifically for Genetic Programming you could try GPdotNET, but for broader Machine Learning I would definitely look at the Accord .NET Framework. The guy behind Accord writes a great blog that which could be useful too.