Universal Turing machine: Difference between revisions
Content added Content deleted
Line 3,770: | Line 3,770: | ||
d=. (fix=. (;:'f.')ver) (train=.(;:'`:')ver&6) (an=. <@:((,'0') (,&<) ])) |
d=. (fix=. (;:'f.')ver) (train=.(;:'`:')ver&6) (an=. <@:((,'0') (,&<) ])) |
||
ver=. (an f. o fix'ver')ver o an f. |
|||
z=. ((an'')`($ ,)`) (`:6) |
z=. ((an'')`($ ,)`) (`:6) |
||
d=. (a0=. `'') (a1=. (@:[) ((<'&')`) (`:6)) (a2=. (`(<(":0);_)) (`:6)) |
d=. (a0=. `'') (a1=. (@:[) ((<'&')`) (`:6)) (a2=. (`(<(":0);_)) (`:6)) |
||
Line 3,812: | Line 3,812: | ||
) |
) |
||
'Q S T P F B M PRINT MOVE C'=. 10 Fetch NB. 10 Boxes |
'Q S T P F B M PRINT MOVE C'=. 10 Fetch NB. Fetching 10 Boxes |
||
DisplayTape=. > o (((48 + ]) { a.c)@[ ; ((] $ ' 'c) , '^'c)) |
DisplayTape=. > o (((48 + ]) { a.c)@[ ; ((] $ ' 'c) , '^'c)) |
||
Line 3,845: | Line 3,845: | ||
,&(;:5$',') NB. Appending 5 local boxes (B M PRINT MOVE C) |
,&(;:5$',') NB. Appending 5 local boxes (B M PRINT MOVE C) |
||
B`('' ; 0 c) h NB. Setting empty blank defaults as 0 |
B`('' ; 0 c) h NB. Setting empty blank defaults as 0 |
||
(C Q)`(0 ; rt o Q)h NB. Setting |
(C Q)`(0 ; rt o Q)h NB. Setting the counter and the transition table |
||
execute^:(-. o halt)^:_ NB. Executing until a halt instruction is issued |
execute^:(-. o halt)^:_ NB. Executing until a halt instruction is issued |
||
[ smoutput o cc ^: (-. o halt) NB. or a changeless single cycle is detected |
[ smoutput o cc ^: (-. o halt) NB. or a changeless single cycle is detected |