On Aug 12, 2011, at 9:07 PM, daly wrote: > On Fri, 2011-08-12 at 16:30 -0700, pmbauer wrote: >> +1 >> >> On Friday, August 12, 2011 3:16:15 PM UTC-7, Sergey Didenko wrote: >> BTW, Is there a case when AI self-modifying program is much >> more elegant than AI just-data-modifying program? >> >> I just can't figure out any example when there is a lot of >> sense to go the self-modifying route. > > Clearly both are equivalent in a Turing sense. > ... [text omitted] > Consider a more "advanced" kind of learning where we use > genetic programs to evolve behavior. Clearly you can do this > all using data but it is a bit more elegant if you can take > "genes" (i.e. slices of code), do crossovers (i.e. merge the > slices of code into other slices), and get a new mutated set > of "genes". These can be embedded in chromosomes which are > just larger pieces of code. Real cells don't use a "data > scratchpad", they self-modify. > ...[text omitted] > > This isn't intended to be a debate about WHY we might want a > self-modifying program. It is a question of whether Clojure, as > a Lisp, is sufficiently well-crafted to allow it to self-modify. > It has been done in other lisps but I don't yet know how to do > it in Clojure.
I think there's some blurring of levels of abstraction going on in this discussion. As someone who works on code-modifying AI (genetic programming, much along the lines described above -- which, BTW, I would expect Thrun and Norvig to mention only briefly, if at all... but that's a debate for a different forum) I find that languages that make code manipulation simple and elegant do help one to experiment and develop these kinds of AI systems more easily. But this is true whether the manipulated code is compiled and executed in the normal way or treated as a data structure and interpreted in some other way. On the one hand most people who work in genetic programming these days write in non-Lisp languages but evolve Lisp-like programs that are interpreted via simple, specialized interpreters written in those other languages (C, Java, whatever). On the other hand I prefer to work in Lisp (Common Lisp, Scheme, Clojure), but my main project these days involves evolving Push programs rather than Lisp programs, for a bunch of reasons related to evolvability -- see http://hampshire.edu/lspector/push.html if you really want to know. I prefer to work in Lisps because they make it simpler to write code that manipulates program-like structures (however they end up being "executed") and because I like Lisps better than most other languages for a slew of other reasons. But my evolved code is executed on a Push interpreter implemented in the host language and there are Push-based GP systems in many languages (C++, Java, Javascript, Python, several Lisps). The language choice really just affects software engineering and workflow issues, not the fundamental power of the system to evolve/learn. So if the question about whether Clojure programs can self-modify in the "modified code executes the same way as any other code" sense then the answer is "yes," and Ken Wesson provided a simple demonstration of this on this thread. But if the question is about whether Clojure is a good language for writing AI systems that involve code-self-modification I would say that the answer is also "yes" but for completely different reasons. -Lee -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en