Go Down

Topic: If a program could program itself?.... (AI) (Read 6 times) previous topic - next topic

AndyCC

I also looked into genetic algorithms / genetic programming back in the late 90's / early 2000s. It's not hard to come up with a language where every statement is syntactically valid (i.e. it does something, which may or not be what you want) and a fitness function (a way to evaluate a program to determine if it's closer or further away from a desired solution than other instances of a program).

LISP is good because a list can also be a program. Create a million lists at random, execute them all with your dataset, pick the best 50% or so, making sure that the fitness function also has a component that selects smaller programs over larger programs. Then cross-breed the programs (exchange parts of successful lists with parts of other successful lists). That's one iteration. Do a few million iterations and eventually you've got a program that does something like what you want.

The problems: it takes a LONG time to evaluate all the programs, and you might have to have some sort of timeout criterion to prevent endless loops. It takes a LONG time to do all the iterations you need to satisfy your fitness function. Once you've satisfied your fitness function enough, you have something that works for your test dataset - that might not handle all the data you throw at it. The more complicated a thing you want, the longer it will take. Not all problems can be solved with GP: you need a problem that lets you know when you're getting closer to a solution.

See it in action here:

http://alphard.ethz.ch/gerber/approx/default.html

(needs Java)


Nick Gammon

Virtually any (interpreted) script language can reprogram itself in a sense. For example VB with its "Execute" function lets you execute an arbitrary string. So it could generate code and then execute it. Ditto for Lua.

cjdelphi

After thinking about this some more... a human could write a routine that over-writes a memory address leading to a crash, in this case the human has a finger and hits the reset button, the computer program running on the computer can't do that, unless it's somehow able to protect itself from any kind of crash, and after reading all these comments, it made me think and, it's the human drive to achieve something that's not been done before (or in some cases, has many many countless times) giving a program a self consciousness would be the difficult part :D - because it could rewrite it's own memory space, it could search and explorer resources on the computer to 'find things to do' oh what's this new binary file? is it executable? what's in it, unless a computer develops the ability of a curiosity as we humans do, I can't quite see AI taking off..

but hypothetically speaking.. if it did? and someone managed to write a program that got hell bent on being better than any human and just to prove who's really the best it develops some kind of virus to teach us all a lesson how far could the thing go?

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Nick Gammon

Would it post its code?

(edit)

Would it use code tags if it did?

robtillaart

came accros this one (again)

Real stupidity beats artificial intelligence every time. Terry Pratchett
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Wrend

What is that, like zombies vs. robots?

Arrow29

Well... I'm still a beginner at Arduino stuff but I really like this topic. BTW lets not forget that we're talking about an AI that an Arduino could run. We are always going to be faced with the fear of our own creation overcomming us. And we have to realize and accept the fact that we may not be ment to fully understand this or master it... But as human beings, that wont stop us from trying. So... when your playing a 2D video game that constently moves the player forward with obstacles in the way... what must the player do to avoid termanation?

CrossRoads

Also kind of late to the conversation - this one ended 2  years ago!
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

boi_goog

I noticed that most posts were clueless about whats the purpose of a program that is able to program itself...and the answer is simple, it wants to evolve if such a program exists, then it will have learning capabilities and a simple conciousness just like we do...and that's where philosophy comes in...philosophy plays an important role in ai programming

Go Up