Pages: 1 [2]   Go Down
Author Topic: If a program could program itself?.... (AI)  (Read 4554 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)

Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 20
Posts: 2113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-grin - 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?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 239
Posts: 24371
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would it post here, asking for help?
Logged

"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.

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would it post its code?

(edit)

Would it use code tags if it did?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12465
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

came accros this one (again)

Real stupidity beats artificial intelligence every time. Terry Pratchett
Logged

Rob Tillaart

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

Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is that, like zombies vs. robots?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 439
Posts: 23794
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Also kind of late to the conversation - this one ended 2  years ago!
Logged

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.

Pages: 1 [2]   Go Up
Jump to: