Talk:Licar
Jump to navigation
Jump to search
I've made an interpreter in Golly:
(This example runs the code
+ + R R T+8 R T+6 R R + T-9 + E R R + - T-17 - T-3
which is a reversed binary counter)
x = 25, y = 24, rule = UTMTCA 3.2A$4B.A$2ApC3A$ApDA.G$ApDA$ApDA.G$25A$4B2J2HLHL2HJMJI2HJKMKMB$8.L.L 3.M6.M.M$8.L.L3.M6.M.M$8.L.L3.M6.M$8.L.L3.M6.M$8.L.L3.M6.M$8.L5.M6.M$ 8.L5.M6.M$14.M6.M$21.M$21.M$21.M$21.M$21.M$21.M$21.M$21.M! @RULE UTMTCA Universal Turing Machine Through Cellular Automaton by islptng 1: Wire 2: Object with no meaning 3: cell 0 4: cell 1 5: signal 0(NOT JUMP, 0 or 1) 6: signal 1( JUMP, blank) 7: pointer 8: command R (Rotate _ -> 0 -> 1 -> _) 9: command E (Write Nothing) 10: command + (Memory Pointer Move Right) 11: command - (Memory Pointer Move Left) 12: command T+ (Jump if 6) 13: command T- (Jump if 6) 14: signal R 15: terminal R 16: signal E 17: terminal E 18: signal + 19: signal - 20: signal T+ 21: command with signal T+ 22: command with tail T+ 23: signal T- 24: command with signal T- 25: command with tail T- 26: tail T 27: signal Read 28: bridge 29: pointer NEXT mark 30: pointer PREV mark 31: re-execute mark @TABLE n_states: 32 neighborhood: vonNeumann symmetries: none var anya = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31} var anyb = anya var anyc = anya var anyd = anya # Signal 0,1 propagation var _0_3_4 = {0,3,4} var _5_6 = {5,6} var com = {8,9,10,11,12,13} _5_6,anya,anyb,anyc,anyd,1 1,_0_3_4,_5_6,0,1,_5_6 1,2,_5_6,0,1,_5_6 1,2,_5_6,1,1,_5_6 1,_5_6,0,1,28,_5_6 1,_5_6,1,2,1,_5_6 1,0,1,2,_5_6,_5_6 1,0,1,com,_5_6,_5_6 # Command get and propagation 1,7,1,8,_5_6,14 1,7,1,9,_5_6,16 1,7,1,10,_5_6,18 1,7,1,11,_5_6,19 var sig = {14,16,18,19} 7,0,0,sig,0,29 29,0,0,1,0,0 0,0,0,1,29,7 sig,anya,anyb,anyc,anyd,1 27,anya,anyb,anyc,anyd,1 1,0,sig,com,1,sig 1,0,sig,2,1,sig 1,1,sig,2,1,sig 1,1,0,sig,28,sig 1,2,1,sig,1,sig 1,2,1,0,sig,sig 1,_0_3_4,1,0,sig,sig 1,28,sig,2,1,27 1,1,27,2,0,27 1,2,1,27,0,27 1,1,28,27,0,27 1,2,1,28,27,27 1,2,1,1,27,27 1,2,1,0,27,27 1,_0_3_4,1,0,27,27 # Command execute 1,_0_3_4,1,7,14,15 1,_0_3_4,1,7,16,17 0,1,anya,15,anyb,3 3,1,anya,15,anyb,4 4,1,anya,15,anyb,0 _0_3_4,1,anya,17,anyb,0 15,anya,anyb,anyc,anyd,1 17,anya,anyb,anyc,anyd,1 1,_0_3_4,1,7,18,29 7,29,0,0,0,29 0,1,0,0,29,7 29,_0_3_4,1,7,1,1 29,1,0,0,0,0 1,1,0,7,1,28 28,1,0,7,1,1 0,0,0,0,28,1 1,0,0,28,_0_3_4,28 28,0,0,1,_0_3_4,0 0,0,0,1,28,1 0,0,0,28,1,1 0,19,7,0,0,30 30,1,7,0,0,7 7,1,0,0,30,0 1,0,1,7,27,6 1,3,1,7,27,5 1,4,1,7,27,5 1,_0_3_4,28,0,27,6 # Jump Ignore var _12_13 = {12,13} 1,7,1,_12_13,5,29 7,0,0,29,0,29 29,7,1,_12_13,1,28 29,0,0,28,0,0 28,29,1,_12_13,1,5 # Jump Backward var _1_23 = {1,23} var _1_23_30 = {1,23,30} var _13_24 = {13,24} var _0_30 = {0,30} 1,7,1,13,6,24 24,7,1,com,1,1 30,7,1,com,1,1 7,0,0,24,0,30 7,0,0,30,0,30 0,0,30,1,0,7 30,0,0,_1_23,0,0 23,anya,anyb,anyc,anyd,1 1,0,23,com,1,23 1,0,23,com,23,23 1,7,23,com,1,30 1,0,23,com,30,23 1,30,23,com,1,23 1,0,26,com,23,26 1,0,26,com,30,26 1,30,26,com,1,26 26,anya,anyb,anyc,anyd,1 24,anya,anyb,anyc,anyd,13 25,anya,anyb,anyc,anyd,13 13,24,anya,_13_24,anyb,24 13,13,anya,24,anyb,24 13,1,anya,24,anyb,24 13,23,anya,24,anyb,24 13,24,anya,0,anyb,25 13,24,anya,25,anyb,25 1,_0_30,1,24,_1_23_30,23 13,23,anya,25,anyb,25 1,_0_30,1,25,_1_23_30,26 1,30,26,com,1,26 1,7,26,com,1,31 31,anya,anyb,anyc,anyd,1 1,0,31,anya,1,6 # Jump forward var _12_21 = {12,21} var _0_29 = {0,29} var _1_20_29 = {1,20,29} 1,7,1,12,6,21 21,7,1,12,1,1 7,0,0,21,0,29 20,anya,anyb,anyc,anyd,1 1,7,1,com,20,29 29,7,1,com,1,1 1,29,1,com,20,20 1,0,29,com,20,20 1,0,1,com,20,20 1,0,20,com,20,20 1,0,20,com,26,26 1,0,29,com,26,26 1,29,1,com,26,6 21,anya,anyb,anyc,anyd,12 12,21,anya,_12_21,anyb,21 12,12,anya,21,anyb,21 1,_0_29,_1_20_29,21,1,20 1,_0_29,_1_20_29,22,1,26 12,_1_20_29,anya,21,anyb,21 12,21,anya,0,anyb,22 22,anya,anyb,anyc,anyd,12 12,21,anya,22,anyb,22 12,_1_20_29,anya,22,anyb,22 28,29,1,_12_13,20,20 28,29,1,_12_13,26,6 @COLORS # Default color GREEN 0 255 0 0 255 0 0 48 48 48 1 255 0 0 2 0 0 255 3 255 255 255 4 255 0 255 5 255 128 0 6 255 0 128 7 128 128 128 8 255 128 128 9 255 128 128 10 255 255 0 11 255 255 0 12 0 255 255 13 128 0 255 15 128 255 128 17 128 255 128 22 255 0 0 25 255 0 0 26 255 0 0 27 0 0 0 28 0 0 128 29 0 128 0 30 0 128 0 @ICONS XPM "7 189 2 1" ". c #FFFFFF" "m c #000000" "......." "......." "......." "......." "......." "......." "......."//1: Pure "......." "......." "......." "......." "......." "......." "......."//2: Pure "......." "...m..." "..m.m.." "..m.m.." "..m.m.." "...m..." "......."//3: 0 "......." "...m..." "..mm..." "...m..." "...m..." "..mmm.." "......."//4: 1 "......." "...m..." "..m.m.." "..m.m.." "..m.m.." "...m..." "......."//5: 0 "......." "...m..." "..mm..." "...m..." "...m..." "..mmm.." "......."//6: 1 "......." "...m..." "..m.m.." ".m...m." "..m.m.." "...m..." "......."//7: Diamond "......." "..mm..." "..m.m.." "..mm..." "..m.m.." "..m.m.." "......."//8: R "......." "..mmm.." "..m...." "..mmm.." "..m...." "..mmm.." "......."//9: E "......." "...m..." "...m..." ".mmmmm." "...m..." "...m..." "......."//10: + "......." "......." "......." ".mmmmm." "......." "......." "......."//11: - "......." ".mmmmm." "......." "...m..." "..mmm.." "...m..." "......."//12: T+ "......." ".mmmmm." "......." "......." "..mmm.." "......." "......."//13: T- "......." "..mm..." "..m.m.." "..mm..." "..m.m.." "..m.m.." "......."//14: R "mmmmmmm" "mm..mmm" "mm.m.mm" "mm..mmm" "mm.m.mm" "mm.m.mm" "mmmmmmm"//15: R "......." "..mmm.." "..m...." "..mmm.." "..m...." "..mmm.." "......."//16: E "mmmmmmm" "mm...mm" "mm.mmmm" "mm...mm" "mm.mmmm" "mm...mm" "mmmmmmm"//17: E "......." "...m..." "...m..." ".mmmmm." "...m..." "...m..." "......."//18: + "......." "......." "......." ".mmmmm." "......." "......." "......."//19: - "......." ".mmmmm." "......." "...m..." "..mmm.." "...m..." "......."//20: T+ "......." ".mmmmm." "......." "...m..." "..mmm.." "...m..." "......."//21: T+ "......." ".mmmmm." "......." "...m..." "..mmm.." "...m..." "......."//22: T+ "......." ".mmmmm." "......." "......." "..mmm.." "......." "......."//23: T- "......." ".mmmmm." "......." "......." "..mmm.." "......." "......."//24: T- "......." ".mmmmm." "......." "......." "..mmm.." "......." "......."//25: T- "......." ".mmmmm." "...m..." "...m..." "...m..." "...m..." "......."//26: T "......." "......." "......." "......." "......." "......." "......."//27+: Pure