Manufactoria - Make Turing Machines with Conveyor Belts
Moderators: phlip, Moderators General, Prelates
Re: Manufactoria / record solutions
The record score table was here, now moved to the new page. I'm leaving the edit history behind.
Updates since moving to this page:
J.P. broke a set of size records. In Generals he reduced his own 19 parts to 18, in Judiciary he erased jareds's 44 parter with a cool 39, and in Engineers my record 25 suffered a loss to J.P.'s 24, although the new one takes almost 70% more steps.
I found a little bit more speed on the simple Robobears and Milidogs.
2010-06-13
Metatron finally gets a really good speed record, as jestingrabbit almost doubles the speed going from his previous 4M to 2.07M steps in the solution posted below.
Jani found another 152 steps to eliminate from Robocats.
2010-06-14
I improved Robocats speed even more, 462 steps off Jani's record. I'm quite sure it's still not optimal. I also found a faster 20 part Officers, replacing J.P.'s 180k with 139k. The speed record is still 81k with 103 parts.
2010-06-15
J.P. took back the fastest 20 part Officers with 135k, and went down to 40 parts in Ophanim, erasing my record of 44. He's really selling speed for size, spending 3.8M instead of 1.4M steps.
(edit 1) I made a faster Teachers much like my speed Androids. It's not pretty but lightning fast at 8872 steps, down from jareds's decent 17214. I used a load of 70 parts while jareds had just 38, although I was already a tad faster with 35 parts.
2010-06-16
Added Xanthir's 23-part Engineers from the thread, displacing J.P.'s 24-part one.
(edit 1) J.P. got back with an unbelievable 21 parts in Engineers.
2010-06-18
Great new head-scratchers from tehtmi in the thread: Robo-children in 17 replaces my 18, and Seraphim in 19 beats jareds's 21.
(edit 1) Added the faster 23-part Politicians posted by Steve496, to replace my slower same-sized one.
(edit 2) I made Engineers in 20 parts with the same new trick that's obviously been behind many of the recent improvements. Gone is J.P.'s 21-part record, which was a lot slower too.
(edit 3) I found a refreshing new Politicians in only 20 parts. It's even slower than my old 23-part one that Steve496 outpaced, but beats them nicely in size.
(edit 4) I wasn't expecting the same new approach to shrink Robo-children to 16 parts, but that way I erased tehtmi's 17-parter from the list, and was slightly faster too.
(edit 5) In the thread tehtmi showed a 64-part Metatron, nicely smaller than J.P.'s 72.
2010-06-20
A long-standing record by Berengal was broken when Nabb posted a 32k to 28k speed improvement for Robo-children. (edit 2010-06-25: disqualified for errors with certain long inputs)
2010-06-21 Moved the updated table and scores.txt to the new page. Edit history continues there.
Updates since moving to this page:
J.P. broke a set of size records. In Generals he reduced his own 19 parts to 18, in Judiciary he erased jareds's 44 parter with a cool 39, and in Engineers my record 25 suffered a loss to J.P.'s 24, although the new one takes almost 70% more steps.
I found a little bit more speed on the simple Robobears and Milidogs.
2010-06-13
Metatron finally gets a really good speed record, as jestingrabbit almost doubles the speed going from his previous 4M to 2.07M steps in the solution posted below.
Jani found another 152 steps to eliminate from Robocats.
2010-06-14
I improved Robocats speed even more, 462 steps off Jani's record. I'm quite sure it's still not optimal. I also found a faster 20 part Officers, replacing J.P.'s 180k with 139k. The speed record is still 81k with 103 parts.
2010-06-15
J.P. took back the fastest 20 part Officers with 135k, and went down to 40 parts in Ophanim, erasing my record of 44. He's really selling speed for size, spending 3.8M instead of 1.4M steps.
(edit 1) I made a faster Teachers much like my speed Androids. It's not pretty but lightning fast at 8872 steps, down from jareds's decent 17214. I used a load of 70 parts while jareds had just 38, although I was already a tad faster with 35 parts.
2010-06-16
Added Xanthir's 23-part Engineers from the thread, displacing J.P.'s 24-part one.
(edit 1) J.P. got back with an unbelievable 21 parts in Engineers.
2010-06-18
Great new head-scratchers from tehtmi in the thread: Robo-children in 17 replaces my 18, and Seraphim in 19 beats jareds's 21.
(edit 1) Added the faster 23-part Politicians posted by Steve496, to replace my slower same-sized one.
(edit 2) I made Engineers in 20 parts with the same new trick that's obviously been behind many of the recent improvements. Gone is J.P.'s 21-part record, which was a lot slower too.
(edit 3) I found a refreshing new Politicians in only 20 parts. It's even slower than my old 23-part one that Steve496 outpaced, but beats them nicely in size.
(edit 4) I wasn't expecting the same new approach to shrink Robo-children to 16 parts, but that way I erased tehtmi's 17-parter from the list, and was slightly faster too.
(edit 5) In the thread tehtmi showed a 64-part Metatron, nicely smaller than J.P.'s 72.
2010-06-20
A long-standing record by Berengal was broken when Nabb posted a 32k to 28k speed improvement for Robo-children. (edit 2010-06-25: disqualified for errors with certain long inputs)
2010-06-21 Moved the updated table and scores.txt to the new page. Edit history continues there.
Last edited by Nix on Fri Jun 25, 2010 10:11 am UTC, edited 21 times in total.
Re: Manufactoria - Make Turing Machines with Conveyor Belts
I really like Roboparrots too. It would really fit in the game. It feels like there should be a simpler solution, but here's mine of 37 parts:
?lvl=32&code=c12:9f3;c12:12f3;q12:5f4;c12:6f3;c12:7f3;c12:8f3;y12:2f3;g12:3f3;c12:4f3;p11:5f2;p12:10f3;b11:10f2;r13:10f0;q12:11f6;g8:7f1;g8:3f3;r9:4f3;p9:5f2;b9:6f1;y11:3f0;q10:3f1;b11:2f0;p10:2f7;r9:2f2;r9:3f0;c8:4f3;c8:5f2;c8:6f1;q10:7f7;y11:7f0;b9:8f2;p10:8f5;r11:8f0;b9:7f0;b11:6f3;r11:4f1;q10:5f7;&ctm=Roboparrots!;OUTPUT:_the_input,_repeated_twice!;b:bb|brbb:brbbbrbb|:|rrb:rrbrrb|bbrbrr:bbrbrrbbrbrr;13;3;0;
?lvl=32&code=c12:9f3;c12:12f3;q12:5f4;c12:6f3;c12:7f3;c12:8f3;y12:2f3;g12:3f3;c12:4f3;p11:5f2;p12:10f3;b11:10f2;r13:10f0;q12:11f6;g8:7f1;g8:3f3;r9:4f3;p9:5f2;b9:6f1;y11:3f0;q10:3f1;b11:2f0;p10:2f7;r9:2f2;r9:3f0;c8:4f3;c8:5f2;c8:6f1;q10:7f7;y11:7f0;b9:8f2;p10:8f5;r11:8f0;b9:7f0;b11:6f3;r11:4f1;q10:5f7;&ctm=Roboparrots!;OUTPUT:_the_input,_repeated_twice!;b:bb|brbb:brbbbrbb|:|rrb:rrbrrb|bbrbrr:bbrbrrbbrbrr;13;3;0;
Re: Manufactoria - Make Turing Machines with Conveyor Belts
I couldn't think of any particularly clever approach for Roboparrots, but here's a 35-part solution:
?lvl=32&code=r9:7f3;p9:8f2;b9:9f1;c10:6f2;b10:7f1;q10:8f4;y10:9f1;c11:6f2;r11:7f2;g12:6f3;p12:7f7;p12:9f3;c13:6f0;b13:7f0;c14:6f0;r14:7f1;q14:8f2;y14:9f1;r15:7f3;p15:8f4;b15:9f1;c12:5f3;q12:10f2;p12:11f7;b13:11f0;r11:11f2;q12:12f6;r11:3f2;p12:3f7;b13:3f0;y12:4f3;y12:2f3;q12:8f2;r13:9f2;b11:9f0;&ctm=Roboparrots!;OUTPUT:_the_input,_repeated_twice!;b:bb|brbb:brbbbrbb|:|rrb:rrbrrb|bbrbrr:bbrbrrbbrbrr;13;3;0;
?lvl=32&code=r9:7f3;p9:8f2;b9:9f1;c10:6f2;b10:7f1;q10:8f4;y10:9f1;c11:6f2;r11:7f2;g12:6f3;p12:7f7;p12:9f3;c13:6f0;b13:7f0;c14:6f0;r14:7f1;q14:8f2;y14:9f1;r15:7f3;p15:8f4;b15:9f1;c12:5f3;q12:10f2;p12:11f7;b13:11f0;r11:11f2;q12:12f6;r11:3f2;p12:3f7;b13:3f0;y12:4f3;y12:2f3;q12:8f2;r13:9f2;b11:9f0;&ctm=Roboparrots!;OUTPUT:_the_input,_repeated_twice!;b:bb|brbb:brbbbrbb|:|rrb:rrbrrb|bbrbrr:bbrbrrbbrbrr;13;3;0;
- jestingrabbit
- Factoids are just Datas that haven't grown up yet
- Posts: 5965
- Joined: Tue Nov 28, 2006 9:50 pm UTC
- Location: Sydney
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Another metatron. This one should be a significant increase in efficiency.
Spoiler:
ameretrifle wrote:Magic space feudalism is therefore a viable idea.
- Arancaytar
- Posts: 1642
- Joined: Thu Mar 15, 2007 12:54 am UTC
- Location: 52.44°N, 13.55°E
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
I just finished the robot engineers (palindrome tester) one.
The operating concept is unsurprisingly simple (recursive palindrome algorithms are easy, after all) but the actual mechanics and workflow is tricky.
Unfortunately, the Policeman (finding the string's center) and the binary adder elude me. Little-endian would be easy, but I can't figure out how to process the carry starting from the left element. I suppose I'll have to make one pass per digit...
Edit:
I did solve the Seraphim test though, using a similar concept as for the palindrome.
Edit:
Adder (Officer) solved. My earlier error was not adding a terminator and rotating the tape to its correct alignment after every operation.
The operating concept is unsurprisingly simple (recursive palindrome algorithms are easy, after all) but the actual mechanics and workflow is tricky.
Spoiler:
Spoiler:
Spoiler:
Unfortunately, the Policeman (finding the string's center) and the binary adder elude me. Little-endian would be easy, but I can't figure out how to process the carry starting from the left element. I suppose I'll have to make one pass per digit...
Edit:
I did solve the Seraphim test though, using a similar concept as for the palindrome.
Spoiler:
Edit:
Adder (Officer) solved. My earlier error was not adding a terminator and rotating the tape to its correct alignment after every operation.
Spoiler:
Last edited by Arancaytar on Mon Jun 14, 2010 7:07 am UTC, edited 1 time in total.
"You cannot dual-wield the sharks. One is enough." -Our DM.


Re: Manufactoria - Make Turing Machines with Conveyor Belts
Arancaytar wrote:Unfortunately, the Policeman (finding the string's center) and the binary adder elude me. Little-endian would be easy, but I can't figure out how to process the carry starting from the left element. I suppose I'll have to make one pass per digit...
That's about the size of it. To me, they were similarly motivated designs.
Also, my designs made a quantum leap forward when I saw how other people (maybe just Nix, I suppose) wrote the "code" to pop a dot off the back of a string. It's something that can be freakishly space-efficient if done properly, and I was far from it which made half of the later designs far more tangled and snow than they needed to be. If you can improve that design for yourself, then you'll find it paying off well.
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Policemen got me for quite a while too. It requires a significantly new thought to solve, though once you've figured out how to find the middle the rest of it is easy. Hint:
Spoiler:
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Just for lulz, here is my Ophanim solution drawn as how I sort of imagined a queue machine would be drawn if anyone ever did. (Yes, it doesn't strip the leading reds out first, and it should.)
I suppose the game would have less replay value if it were like this instead of having to twist the branches and conveyor belts ideally, but it kind of makes me feel closer to the science.
Spoiler:
I suppose the game would have less replay value if it were like this instead of having to twist the branches and conveyor belts ideally, but it kind of makes me feel closer to the science.
-
- Posts: 546
- Joined: Tue Jan 12, 2010 1:04 am UTC
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Wow! I'm surprised so many people play this game too, this is cool. For me, there are currently 3 I'm trying to solve - Officer (add 1), Police (yellow in the middle), and Academic (reverse the input string). I know how to do Police for sure, and I've got two ideas for Officer that I haven't tried yet:
I haven't really tried much in the way of efficiency yet, I probably should though...
Spoiler:
I haven't really tried much in the way of efficiency yet, I probably should though...
<signature content="" style="tag:html;" overused meta />
Good fucking job Will Yu, you found me - __ -
Good fucking job Will Yu, you found me - __ -
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Arancaytar wrote:I did solve the Seraphim test though, using a similar concept as for the palindrome.Spoiler:
This has problems with some inputs. The ones the game gives tend to be too easy. Your machine accepts anything that matches while the first string lasts, even if the second one continues after that. The simplest input to break it is [GR]. It's easy to fix though, without increasing the part count even. There are also two unused green writers.
Your Officers has two unused blue writers and one yellow one. Otherwise, all solutions are good.
- Arancaytar
- Posts: 1642
- Joined: Thu Mar 15, 2007 12:54 am UTC
- Location: 52.44°N, 13.55°E
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Nix wrote:Arancaytar wrote:I did solve the Seraphim test though, using a similar concept as for the palindrome.Spoiler:
This has problems with some inputs. The ones the game gives tend to be too easy. Your machine accepts anything that matches while the first string lasts, even if the second one continues after that. The simplest input to break it is [GR]. It's easy to fix though, without increasing the part count even. There are also two unused green writers.
Your Officers has two unused blue writers and one yellow one. Otherwise, all solutions are good.
Yeah, I noticed that problem. I used the idea I had for the Judge (which I didn't actually implement until today), which
Spoiler:
Anyway, I've finally implemented the Metatron, so I now have a game-passing (though not free of errors in some cases) solution for all of them.

Judge:
?lvl=20&code=p11:3f0;r11:4f1;b11:2f3;q10:3f4;q10:4f4;y10:5f3;p9:4f0;b9:3f0;r9:5f0;c8:4f3;c11:6f2;c8:6f3;q15:6f6;g15:7f3;c15:9f2;b16:5f3;p16:6f0;r16:7f1;r16:8f2;c16:9f2;p17:6f1;p17:8f1;p17:9f2;b18:8f0;p17:10f3;r18:10f0;b16:10f2;p17:12f3;p16:12f0;b16:11f3;r16:13f1;q15:12f4;g15:11f1;q17:7f7;y18:7f1;c18:6f0;y18:11f3;c18:12f0;c14:8f3;i14:9f7;c14:10f3;c14:11f0;c13:11f0;c12:11f3;c12:12f3;p8:7f3;q7:7f5;b7:6f2;q9:7f1;c10:6f2;i12:6f3;c13:9f2;c13:8f3;y6:7f3;b6:8f2;y10:7f2;r11:7f3;b11:9f1;p11:8f2;q12:8f4;c12:7f1;c13:4f1;c7:8f2;c8:8f2;c9:8f2;c10:8f2;y14:1f2;b14:2f2;c15:1f3;p15:2f3;y15:3f0;r16:2f0;g12:3f0;c14:3f0;c13:3f0;c12:2f2;c13:2f1;c13:1f2;r9:6f0;y8:5f3;c8:3f3;c12:5f1;q13:6f6;g13:7f3;y13:5f3;p14:6f0;r14:7f1;b14:5f3;c12:4f2;q17:11f1;q15:10f5;q15:8f3;
Metatron:
Spoiler:
Spoiler:
"You cannot dual-wield the sharks. One is enough." -Our DM.


- Arancaytar
- Posts: 1642
- Joined: Thu Mar 15, 2007 12:54 am UTC
- Location: 52.44°N, 13.55°E
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
squareroot wrote:Wow! I'm surprised so many people play this game too, this is cool. For me, there are currently 3 I'm trying to solve - Officer (add 1), Police (yellow in the middle), and Academic (reverse the input string). I know how to do Police for sure, and I've got two ideas for Officer that I haven't tried yet:Spoiler:
I haven't really tried much in the way of efficiency yet, I probably should though...
I started out with something close to the second idea, but then realized it could be even simpler:
Spoiler:
"You cannot dual-wield the sharks. One is enough." -Our DM.


- walkerm930
- Posts: 69
- Joined: Wed Apr 07, 2010 3:53 am UTC
- Location: Canada: Ontario: Toronto
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Here's my solution for engineers. The machine is surprisingly simpler than i thought one of the last levels was going to be.
what i did:
what i did:
Spoiler:
In the gospel according to trig there are 3 primary rules: sin θ = x/h , cos θ = y/h and tan θ = x/y. These rules are not open to interpretation and are to be treated as law.
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Oh, wow, that's a brilliant solution.
Spoiler:
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Nix: I have a new record smallest Engineers, at 23 parts:
Edit: Fixed a flipped gate that I didn't test. >_<
Code: Select all
?lvl=24&code=c12:6f3;c12:11f3;c12:12f3;c10:4f2;b10:5f1;c11:2f2;p11:3f1;i11:4f3;q11:5f4;c12:2f3;g12:3f3;c12:4f3;p12:5f3;c13:2f0;i13:4f2;q13:5f2;c14:4f0;r14:5f1;c12:7f3;c12:8f3;c12:9f3;c12:10f3;p13:3f1;
Edit: Fixed a flipped gate that I didn't test. >_<
Last edited by Xanthir on Thu Jun 17, 2010 8:36 pm UTC, edited 2 times in total.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
Re: Manufactoria - Make Turing Machines with Conveyor Belts
It fails the first test?
Re: Manufactoria - Make Turing Machines with Conveyor Belts
True, but you only need to flip the branch to the right of the green marker to make it work.
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Argh, I can't believe I did that. After I established that the left side worked correctly, I just mirrored it to the right without testing. I hate it when I do that and get my gates backwards. >_<
Anyway, corrected the solution in the previous post.
Anyway, corrected the solution in the previous post.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
- phlip
- Restorer of Worlds
- Posts: 7550
- Joined: Sat Sep 23, 2006 3:56 am UTC
- Location: Australia
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Lothar wrote:joshz wrote:Slowest level 1?
?lvl=1&code=c12:6f2;c13:6f1;c13:5f2;c14:5f3;c14:6f3;c14:7f0;c13:7f0;c12:7f0;c11:7f1;c11:6f1;c11:5f0;c10:5f3;c10:6f3;c10:7f3;c10:8f3;c10:9f2;c11:9f1;c11:8f2;c12:8f2;c13:8f2;c14:8f3;c14:9f0;c13:9f0;
How about this:
?lvl=1&code=i12:6f1;i13:6f0;c13:5f2;c14:5f3;c14:6f0;i11:6f6;c10:6f1;c10:5f2;c11:5f3;c10:9f2;c10:8f3;c12:7f2;i13:7f3;c14:7f3;c14:8f3;c14:9f0;c13:9f1;c13:8f1;c12:8f3;c11:7f0;c10:7f3;c11:9f1;c11:8f2;
I got one better:
?lvl=1&code=c10:5f3;c11:5f0;c13:5f3;c14:5f0;c10:6f2;i11:6f4;i12:6f5;i13:6f5;c14:6f1;c10:7f3;i11:7f0;i12:7f1;i13:7f1;c14:7f0;c10:8f3;c11:8f1;c12:8f0;c13:8f3;c14:8f1;c10:9f2;c11:9f2;c13:9f2;c14:9f1;
I think that's the worst possible:
Spoiler:
Code: Select all
enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵╰(ಠ_ಠ ⚠) {exit((int)⚠);}
-
- Posts: 546
- Joined: Tue Jan 12, 2010 1:04 am UTC
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
I really like the "worst case" problem - the slowest possible. I agree that the solution for #1 posted above is the best - er, worst - and I managed to get 1:17 for level 2:
P.S. - Could people please put level codes inside code tags, it makes it much easier to copy.
Code: Select all
?lvl=2&code=i13:6f0;i12:6f1;i12:7f5;c12:8f2;c13:8f1;i13:7f4;c13:5f2;c14:5f3;c14:6f0;i11:6f6;c10:6f1;c10:5f2;c11:5f3;i11:7f5;c10:8f1;c10:7f2;c11:8f3;c11:9f0;c10:9f1;c14:7f3;c14:8f3;p14:9f3;c13:9f0;
P.S. - Could people please put level codes inside code tags, it makes it much easier to copy.
<signature content="" style="tag:html;" overused meta />
Good fucking job Will Yu, you found me - __ -
Good fucking job Will Yu, you found me - __ -
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Heads up - I couldn't be arsed to find a c++ compiler to run Nix's code, so I translated it into javascript for running in the browser. It works and can run levels to completion now, I just need to put together a slightly prettier interface (right now you just edit a string in the <script> tag of the html page to change your level code).
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
And here we are:
Manufactoria Emulator
Next priorities:
1. Prettier board display (ascii isn't great, and it's very information-low too).
2. In-page level editor.
Edit: Nix, what do you actually do to obtain your numbers? I don't want to spend the time deciphering your actual runner code.
Manufactoria Emulator
Next priorities:
1. Prettier board display (ascii isn't great, and it's very information-low too).
2. In-page level editor.
Edit: Nix, what do you actually do to obtain your numbers? I don't want to spend the time deciphering your actual runner code.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Great! But predictably not too fast, so getting comparable numbers for speed may be inconvenient.
In counting steps, it seems your counts are low by one, as if you don't count the last move (to ground or exit) or the first one (down from the entrance tile). Once that is corrected, you should get equal step counts just by summing over all inputs from 0 to 10 in length for the red/blue input levels, regardless of the result being rejection or accept/return. Some inputs are skipped if not applicable to a level, those are no-blue (zero) inputs for Generals, and odd length inputs for Police. For the last three levels, I'm counting all legal inputs (those with exactly one green) with length from 1 to 11, which is certainly too slow for JavaScript.
Edit: It seems that your switches read a color off the tape even if it's not one of the tested colors. At least they do something wrong in that case. Breaks lots of solutions in the later levels.
In counting steps, it seems your counts are low by one, as if you don't count the last move (to ground or exit) or the first one (down from the entrance tile). Once that is corrected, you should get equal step counts just by summing over all inputs from 0 to 10 in length for the red/blue input levels, regardless of the result being rejection or accept/return. Some inputs are skipped if not applicable to a level, those are no-blue (zero) inputs for Generals, and odd length inputs for Police. For the last three levels, I'm counting all legal inputs (those with exactly one green) with length from 1 to 11, which is certainly too slow for JavaScript.
Edit: It seems that your switches read a color off the tape even if it's not one of the tested colors. At least they do something wrong in that case. Breaks lots of solutions in the later levels.
Last edited by Nix on Thu Jun 17, 2010 9:32 pm UTC, edited 1 time in total.
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Yeah, I'm probably off-by-one. I don't count the first move - I just treat the entrance square as an empty tile (which it is, after the first step), and start the pointer one square below that with the "input direction" set appropriately.
My switches shouldn't be popping wrong colors off of the tape. I've run several of the later levels, and they work correctly. For example, right now I'm looking at my Engineers solution, which involves both types of switches and 3 colors.
Do you have a particular level code that demonstrates it failing?
My switches shouldn't be popping wrong colors off of the tape. I've run several of the later levels, and they work correctly. For example, right now I'm looking at my Engineers solution, which involves both types of switches and 3 colors.
Do you have a particular level code that demonstrates it failing?
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
Re: Manufactoria - Make Turing Machines with Conveyor Belts
I do the same with the entrance, but I count steps when entering a tile, so entering the first tile below entrance is the first step.
Here's an example, if not a real solution: ?lvl=10&code=y12:4f3;p12:5f3;c12:7f3;c12:8f3;c12:9f3;c12:10f3;q12:6f2;
Your emulator shows it rejecting the empty string, while clearly it should not.
Edit: It might not be eating wrong colors after all, since even thisdoes the same confuses me: ?lvl=10&code=y12:4f3;c12:7f3;c12:8f3;c12:9f3;c12:10f3;q12:5f2;c12:6f3;
Here's an example, if not a real solution: ?lvl=10&code=y12:4f3;p12:5f3;c12:7f3;c12:8f3;c12:9f3;c12:10f3;q12:6f2;
Your emulator shows it rejecting the empty string, while clearly it should not.
Edit: It might not be eating wrong colors after all, since even this
Last edited by Nix on Thu Jun 17, 2010 9:51 pm UTC, edited 1 time in total.
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
What browser are you trying to run this in? I *know* this won't work correctly in IE, because of the way it handles inheritance of the Array builtin. (I can fix that, I just didn't bother with it.)
I ask because my emulator accepts the empty string just fine when I run it in Chrome. ^_^
(I suspect that my checker for robostilts is broken, though...)
Edit: Scratch that, all of my checkers for "OUTPUT" levels are broken. Output levels should *never* dump a robot on the floor, but right now my checker logic counts it as a success if you dump it on the floor while the tape is in a state that the level wouldn't accept.
Edit2: Err, it appears that I have a further bug regarding YG reader orientation. I assumed that the YG readers would be the same as the BR readers with a color swap, but apparently that's not true. I must have gotten lucky so far for my levels with a YG reader to work.
I ask because my emulator accepts the empty string just fine when I run it in Chrome. ^_^
(I suspect that my checker for robostilts is broken, though...)
Edit: Scratch that, all of my checkers for "OUTPUT" levels are broken. Output levels should *never* dump a robot on the floor, but right now my checker logic counts it as a success if you dump it on the floor while the tape is in a state that the level wouldn't accept.
Edit2: Err, it appears that I have a further bug regarding YG reader orientation. I assumed that the YG readers would be the same as the BR readers with a color swap, but apparently that's not true. I must have gotten lucky so far for my levels with a YG reader to work.
Last edited by Xanthir on Thu Jun 17, 2010 9:54 pm UTC, edited 2 times in total.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
Re: Manufactoria - Make Turing Machines with Conveyor Belts
My mistake. The second code does work as expected, I was confusing the feedback related to Robostilts with what's really supposed to happen. But the first one shows rejects both in Opera and Firefox.
Edit: But Y/G and B/R are the same, aren't they? I'd think it's something else. Especially since my two codes do work differently in your emulator. Or did I make mistakes with copying around the codes and such, since now they seem to work the same (wrong) again. Maybe you changed the code.
Edit: But Y/G and B/R are the same, aren't they? I'd think it's something else. Especially since my two codes do work differently in your emulator. Or did I make mistakes with copying around the codes and such, since now they seem to work the same (wrong) again. Maybe you changed the code.
- jestingrabbit
- Factoids are just Datas that haven't grown up yet
- Posts: 5965
- Joined: Tue Nov 28, 2006 9:50 pm UTC
- Location: Sydney
Re: Manufactoria - Make Turing Machines with Conveyor Belts
I thought this was an interesting idea for a level, but its actually pretty dull. Basically, divide the input by three and return the quotient and remainder. Unfortunately, the way that binary is parsed makes it a bit too touchy.
Code: Select all
?ctm=Tribots;Input_is_n_in_binary._Output_is_q_-_green_-_r_where_3q_+_r_=_n_and_0<=_r_<3;bb:bgr|bbb:brgb|bbrbr:brrrgbr|r:rgr;13;3;1;
ameretrifle wrote:Magic space feudalism is therefore a viable idea.
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Smaller solutions for
Robo-children! (17 parts)
Seraphim (19 parts)
Robo-children! (17 parts)
Code: Select all
?lvl=18&code=c12:7f3;b11:3f3;p11:4f2;r11:5f1;c11:6f1;q12:4f0;g12:5f3;p12:6f3;c13:4f0;c13:5f1;p13:6f6;b13:7f1;g12:3f3;c12:8f3;c12:9f3;c12:10f3;c12:11f3;
Seraphim (19 parts)
Code: Select all
?lvl=29&code=b10:5f3;p10:6f2;r10:7f1;p12:6f3;c12:9f3;c12:10f3;c12:11f3;r13:3f3;p13:4f0;b13:5f1;c13:6f1;q12:7f4;q12:8f0;q11:6f0;y11:5f1;q12:4f6;y12:3f3;g12:5f3;p11:4f5;
- phlip
- Restorer of Worlds
- Posts: 7550
- Joined: Sat Sep 23, 2006 3:56 am UTC
- Location: Australia
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Hmm, that [edit](by which I mean jr's post)[/edit] gives me an idea:Note: I just made this rule now, I have no idea if it's even possible to solve in the space. Good luck!
Code: Select all
?ctm=Collatz!;OUTPUT:_If_the_input_is_even,_divide_it_by_2!_If_it's_odd,_triple_it_and_add_1!;br:b|b:brr|brrbr:brrb|brb:brrrr|brbb:brrrbr;13;3;1;
Code: Select all
enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵╰(ಠ_ಠ ⚠) {exit((int)⚠);}
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Collatz wasn't all that hard in the end. Dividing by 2 is trivial, and multiplying by 3 can be done recursively using a 2 bit carry. Here's my (very un-optimised) solution.
Code: Select all
?lvl=32&code=c12:2f3;g12:3f2;c13:3f2;p14:3f2;q14:4f0;q14:2f4;r13:2f3;b13:4f1;c15:2f1;c14:1f2;c15:1f2;q15:3f4;c16:1f2;c17:1f2;c18:1f3;c18:2f3;c18:3f3;c18:4f3;c18:8f3;c18:7f3;c18:6f3;c18:5f3;c18:9f3;c18:10f3;c18:11f3;c18:12f3;c18:13f0;c17:13f0;c16:13f0;c15:13f0;c14:13f0;c13:13f0;g14:5f2;b15:5f2;r16:5f2;r17:5f3;c17:6f3;c17:7f3;c17:8f3;c17:9f0;g16:9f0;c15:9f0;p14:9f0;q14:10f6;q14:8f2;b15:8f3;r15:10f1;g14:11f2;r15:11f2;p16:11f1;b17:11f0;q16:10f2;g14:7f0;c13:7f0;c11:7f0;c10:7f0;p9:7f0;p9:6f1;p9:8f3;b10:6f1;b8:8f0;r7:8f1;r7:7f1;b8:6f1;r8:5f1;b8:4f2;c7:6f1;c7:5f1;c7:4f1;c7:3f2;c8:3f2;b10:5f0;r9:5f1;c9:4f2;c10:4f2;p11:4f2;r11:3f3;b11:5f1;c12:7f0;r10:8f3;b10:9f0;b9:9f0;c8:9f0;c7:9f0;c6:9f1;c6:8f1;c6:7f1;c6:6f2;c9:3f3;c12:4f3;c12:5f3;q12:6f3;c13:6f2;c14:6f2;c15:6f2;c16:6f2;q13:9f1;c12:9f3;c12:12f3;p12:10f3;r13:10f0;b11:10f2;q12:11f0;&ctm=Collatz!;OUTPUT:_If_the_input_is_even,_divide_it_by_2!_If_it's_odd,_triple_it_and_add_1!;br:b|b:brr|brrbr:brrb|brb:brrrr|brbb:brrrbr;13;3;1;
-
- Posts: 546
- Joined: Tue Jan 12, 2010 1:04 am UTC
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
What about a recursive collatz? If it's an integer, return 1. But you have to do it sloooooooowly! 

<signature content="" style="tag:html;" overused meta />
Good fucking job Will Yu, you found me - __ -
Good fucking job Will Yu, you found me - __ -
- jestingrabbit
- Factoids are just Datas that haven't grown up yet
- Posts: 5965
- Joined: Tue Nov 28, 2006 9:50 pm UTC
- Location: Sydney
Re: Manufactoria - Make Turing Machines with Conveyor Belts
squareroot wrote:What about a recursive collatz? If it's an integer, return 1. But you have to do it sloooooooowly!
You could maybe ask for a unary/binary representation of the number of iterations it takes to reach 1.
ameretrifle wrote:Magic space feudalism is therefore a viable idea.
-
- Posts: 546
- Joined: Tue Jan 12, 2010 1:04 am UTC
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
That would be pretty good... I suppose one you have a basic Collatz function, it's extremely simple to turn it into one that iterates it and increments it. The only two things would be space, and how to increment in a way that doesn't interfere with the calculation. Maybe some sort of "blockade" of one color that couldn't occur otherwise? I'm not sure though.
<signature content="" style="tag:html;" overused meta />
Good fucking job Will Yu, you found me - __ -
Good fucking job Will Yu, you found me - __ -
Re: Manufactoria - Make Turing Machines with Conveyor Belts
tehtml's Robo-children solution allows a faster 23-part Politicians to be constructed:
Code: Select all
?lvl=22&code=p12:4f3;r13:4f0;c12:3f3;p11:4f0;r11:5f1;b11:3f2;g12:2f3;b13:5f3;p13:6f4;r13:7f1;c13:8f1;q12:6f6;g12:7f3;p12:8f7;c12:9f3;c11:6f2;c11:7f1;p11:8f0;b11:9f1;c12:10f3;c12:11f3;c12:12f3;c12:5f3;
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
tehtmi wrote:Smaller solutions for
Robo-children! (17 parts)Code: Select all
?lvl=18&code=c12:7f3;b11:3f3;p11:4f2;r11:5f1;c11:6f1;q12:4f0;g12:5f3;p12:6f3;c13:4f0;c13:5f1;p13:6f6;b13:7f1;g12:3f3;c12:8f3;c12:9f3;c12:10f3;c12:11f3;
Could you explain this one, tehtmi? I don't understand how it works, or why you're constantly swapping the colors.
Edit: Well, now that scores.txt has been updated and I see J.P.'s Engineers, I think I understand it a bit better. Clever!
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
Re: Manufactoria - Make Turing Machines with Conveyor Belts
@Xanthir: Thanks for spoiling all over the place! To be honest, I'm happy you gave the hint for Robo-children, it was subtle enough to still make it fun to solve myself, and I was definitely getting frustrated.
Re: Manufactoria - Make Turing Machines with Conveyor Belts
I'll attempt to explain Robo-children!:
[edit]
Here's a smaller Metatron (64 parts):
Spoiler:
[edit]
Here's a smaller Metatron (64 parts):
Code: Select all
?lvl=31&code=g12:2f3;b11:5f3;p11:6f6;r11:7f1;y12:5f3;q12:6f4;r12:4f3;i12:3f1;q10:4f1;y11:4f3;c13:3f0;c9:2f3;c9:3f3;r8:3f2;c8:6f2;y9:6f2;r10:5f2;b10:7f2;p10:6f2;p9:4f7;q8:4f5;c7:4f3;c7:5f3;c7:6f2;q9:5f4;b10:2f0;i10:3f0;c11:3f0;c13:4f1;y13:5f1;q13:6f6;p13:7f6;q13:8f2;b14:6f3;q14:7f4;i14:8f7;r15:7f0;c15:8f1;y12:7f2;c11:10f2;c11:11f0;p12:10f2;c12:11f0;y13:9f0;q13:10f4;r13:11f2;q13:12f5;c14:10f0;p14:11f7;q14:12f5;b15:11f0;y14:9f3;r11:9f3;q12:9f0;y12:8f0;c11:8f1;c9:7f1;c9:8f1;c9:9f1;c9:10f1;c9:11f1;b10:10f2;q10:11f5;c12:12f3;
- Xanthir
- My HERO!!!
- Posts: 5268
- Joined: Tue Feb 20, 2007 12:49 am UTC
- Location: The Googleplex
- Contact:
Re: Manufactoria - Make Turing Machines with Conveyor Belts
I've spent some more time on my Manufactoria emulator. First, I've moved it to http://www.xanthir.com/manufactoria. Second, I've fixed the bug making GY readers fail sometimes.
Finally, and most excitingly, I've got much prettier board display! No more crappy ascii art for me. I spent some time reproducing the components in SVG, so now the board looks just like it does in the real game. The only thing I haven't done yet is create the entrance/exit tile image, but you know where those are anyway.
This was a fun opportunity to learn a bit more SVG, too - creating the conveyors was a good excuse to learn SVG animation.
Next step is adding a single-tape evaluation mode, and then making the robot and tape animate as it evaluates that tape. That should put me about 75% of the way to have a complete game emulator in javascript. ^_^
(Note - I've been doing all my dev in Chrome so far. I know it won't work right in IE, and no promises for Firefox or Opera.)
So, feel free to use this to quickly visualize a posted level without having to load up the entire game.
Finally, and most excitingly, I've got much prettier board display! No more crappy ascii art for me. I spent some time reproducing the components in SVG, so now the board looks just like it does in the real game. The only thing I haven't done yet is create the entrance/exit tile image, but you know where those are anyway.
This was a fun opportunity to learn a bit more SVG, too - creating the conveyors was a good excuse to learn SVG animation.
Next step is adding a single-tape evaluation mode, and then making the robot and tape animate as it evaluates that tape. That should put me about 75% of the way to have a complete game emulator in javascript. ^_^
(Note - I've been doing all my dev in Chrome so far. I know it won't work right in IE, and no promises for Firefox or Opera.)
So, feel free to use this to quickly visualize a posted level without having to load up the entire game.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
Re: Manufactoria - Make Turing Machines with Conveyor Belts
Faster solution for robo-children:
Anyone made a brainfuck interpreter yet? I was going to attempt one back when this game came out, but I couldn't be bothered making my own interpreter (for a larger board and faster execution).
Code: Select all
lvl=18&code=g12:3f3;p12:4f7;p14:11f3;i12:11f1;p9:4f7;p8:4f0;p8:5f0;p8:6f0;p8:7f0;p8:8f0;c8:3f2;c9:3f3;p8:10f3;p9:10f3;p10:10f3;c7:10f1;p8:9f6;c7:9f2;i12:10f7;p13:4f1;p11:4f1;p10:4f1;c16:3f0;p16:4f2;p16:5f2;p16:6f2;p16:7f2;p16:8f2;p16:9f2;p16:10f4;p16:11f3;c17:10f0;c17:11f1;p15:11f3;c15:3f3;r11:11f1;p11:10f5;c13:10f2;b14:10f3;c13:11f0;p15:4f7;p14:4f1;r11:7f3;c11:8f2;q12:6f0;p12:7f7;i12:8f5;c12:9f3;g13:6f0;b13:7f3;y13:8f2;c14:6f0;r14:7f3;p14:8f2;b14:9f1;c15:6f0;c15:7f1;c15:8f1;c12:5f3;
Anyone made a brainfuck interpreter yet? I was going to attempt one back when this game came out, but I couldn't be bothered making my own interpreter (for a larger board and faster execution).
Who is online
Users browsing this forum: No registered users and 6 guests