Advertisement

AI making AI

Started by September 18, 2002 07:55 PM
25 comments, last by vaneger 22 years ago
where can i learn to code a program that can recode itself?
Ummm... do a google search on genetic programming.
I think there is also an article on this site, but not sure where/what.

Dreddnafious Maelstrom

"If i saw farther, it was because I stood on the shoulders of giants."

Sir Isaac Newton
"Let Us Now Try Liberty"-- Frederick Bastiat
Advertisement
There has been a fair bit of work on evolvable software in the past few years. However, this isn''t exactly what you''ve asked for. It wouldn''t be particularly easy to write code that can rewrite itself, since many of the possible rewrites would not compile... and the first time the code fails to rewrite itself correctly, it would die a quick and violent ''fatal error'' death!

You could, however, design a higher level, interpreted language that attempts the same thing and design an interpreter that monitors attempts to alter the code carefully, so as to avoid crashes.

This isn''t a trivial task though.

Cheers,

Timkin
Back in the early 90''s virus-writers were experimenting with mutateable code; the idea was that the virus would leave no signature if it was different for every file it infected.

Genetic algorithms might also work, but you''d have to write a sub-language used to describe your programs.

Hope this helps

------------------http://www.nentari.com
You could try to write a code that simulates AI. Like, for every good thing it does, that circuit that did it right becomes ''stronger'', and the wrong circuits grow weaker, so that eventually all of the good circuits will remain.
quote: Original post by Anonymous Poster
You could try to write a code that simulates AI. Like, for every good thing it does, that circuit that did it right becomes ''stronger'', and the wrong circuits grow weaker, so that eventually all of the good circuits will remain.


You wouldn''t even need an evaluation function. Programs that worked would run. Those that don''t wouldn''t.

Really though, I just thought of this now: Compilers re-write code. Maybe if you could find some literature on writing compilers you would find something.
------------------http://www.nentari.com
Advertisement
This reminds me of the old problem of writing a program that can output it''s source code when executed (don''t tell me! I''ll solve this in my copious free time!).
That circuitry idea is only good for one thing: memory wasting. Why simulating AI? Isn''t that far more harder than creating real AI on your PC?
I suggest to creating AI step-by-step. First you''ll have to think of what kind of AI you want. Then start designing. If you create a number of subroutines, all doing just one thing. When you put them together, tadaa! IT''S ALIVE...!
ermmm... it is possible to use Genetic Programming to write programs in a language such as C/C++/Maching Language. It''s difficult, but possible.

All you need to do is create a suitable grammar for the language, with a closed set of statements. This will take a lot of work to do for a complicated language, which is why people tend to use their own scripted language.

Another way you can do it, is by having each command or statement to represent several commands in reality. Ie, one statement could be ''x++''. In fact, as long as you tweak Genetic Programming to use a rule based system in deciding the nodes (very simple, and typically done), you could easily make a program-generating thing which uses only a few variables, but will generate most programs possible. But of course, this will still have its problems...

BTW - the best type of program to write in Genetic Programming is a Lisp program. In fact, that''s one of the applications the creator of GP made it do. And it works very well.
All done with Cash:www.venini.co.uk/arthursdeparture/
i know virtually nothing about mutating code, but this seems intuitive to me:

develop a slow but crash-proof VM with many layers of abstraction from REALLY basic (pseuo-assembly) to however high a level you want, where the higher-level blocks are assembled from lower-level blocks.

the expected output of each block is hardwired (for the given basic clocks) or inferred whenever the code itself creates a new one. these cause-and-effects should be straitforward to represent as knowledge.

once you have code that does the job, the VM code will be modular and procedural which could be relatively easily recompiled into much faster machine labguage from the low levels up (especially when the machine code for the starting blocks is given).

********


A Problem Worthy of Attack
Proves It''s Worth by Fighting Back
spraff.net: don't laugh, I'm still just starting...

This topic is closed to new replies.

Advertisement