True artificial intelligence must program itself: the program must choose lines of code to be executed. I have created a program that almost does this, but I am having a few problems. If a running program reads through itself and then writes to itself then we have the beginnings of an a.i. program. Example:
I have had some interesting results from using this method: everything from a program that operates as it should to a file that has read data from all over the computer. The most intersting was in QBASIC (found on Windows cd-rom under tools\oldmsdos):
As you will find the program does not update itself: the program must be ended first. Then opening the program with wordpad (notepad is too small) produces some interesting results. I have posted the update problem on this forum so any help would be appreciated.
open [THISFILE$] for random as #1 len=1
for address=1 to lof(1) ;address within file is 1 to length-of-file (LOF)
get #1, address ;read a letter from the open file
put #1, address ;write the letter to the file
next address ;next location within file
close #1
I have had some interesting results from using this method: everything from a program that operates as it should to a file that has read data from all over the computer. The most intersting was in QBASIC (found on Windows cd-rom under tools\oldmsdos):
open [THISFILE$] for random as #1
while eof(1)=0 ;while end-of-file status is not reached (=0)
get #1
put #1
shell "type [THISFILE$]"
wend
close #1
As you will find the program does not update itself: the program must be ended first. Then opening the program with wordpad (notepad is too small) produces some interesting results. I have posted the update problem on this forum so any help would be appreciated.