Recursive Turing

This link at arXiv is about Hofstadter's concept of Turing. If you missed GEB Gödel, Escher, Bach: an Eternal Golden Braid (commonly GEB), you missed a lot of interesting things about recursion and many other subjects. What I was wondering is if you create a recursive link in Second Life that allows a Bot to connect to Second Life to create an account and have an interface in Second Life to create a Bot which can go to an interface in Second Life to connect to SL ..Oddness ensues here... That seems a bit like a divide and conquer algorithm and the first bot need only deal with half the problem. :)

This technique is used in many languages and I use recursive calls for many things. It seems to me that this becomes a tree and just like a recursive solution to the [Golden Spiral] Fibonacci sequence X[0]=0, X[1]=1, for n=2;n<max;n++){( X[n]=X[n-1]+X[n-2] )} for all n>2 in sequence. I.E. 0 1 1 2 3 5 8 13 21 34 ...The code is just a few lines ( and can run very fast with Memoization ) and it seems to me that a bot tree would eventually end in idiot bots that simply had to do one thing well, in a binary YES/NO mode. Just and odd thought, I have my own OpenSource SL server here and I have bots, maybe I will try that. Recursion and 'Divide and Conquer' are very powerful algorithms and I would think they could be adapted to this problem, when phrased in this way.

Fibonacci in assembly with registers,

Rcx=n-2
R10=2
R11=1
LoopF: Add R11,R10 ;3,2  
       Xchg R11,R10 ;2,3
       Loop LoopF

I am pretty sure this is as fast as it gets and uses no memory.

Rcx=(n-2)/2
R10=2
R11=1
;                       10       11     
LoopF: Add R11,R10 ;    2        3  
       Add R10,R11 ;    5        3  
       Loop LoopF
; 2 3
; 5 3
; 5 8
;13 8
;13 21 
;....
;If it is odd, do the last one... DONE

I am pretty sure this is as fast as it gets :) and uses no memory. The mind is a weird machine and I didn't even think about this until my subconscious nudged me and said are you sure, wonder boy? I guess I am never really sure. And then I realized I could take advantage of the Queue and so , no this isn't the fastest and I could probably double this, if somebody wanted the fastest Fibonacci in __asm__.

0 comments:

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen