# Manufactorium--a logic game. (Kind of a turing machine programming game)

**URL:** <https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717>\
**Category:** The Game Room\
**Created:** [June 3, 2010, 1:14am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717 "2010-06-03T01:14:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [June 3, 2010, 1:14am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/1 "2010-06-03T01:14:00Z")

</div>

> **[Manufactoria](https://www.kongregate.com/games/PleasingFungus/manufactoria)**
>
> Manufactoria is a puzzle game about putting robots in their proper place. Use conveyor-belts, #39pullers#39 and #39pushers#39 to build a machine that will work no matt...

One note: The test at the end of each level is preset, meaning it can be tempting to design to the test rather than according the the principle named at the beginning of the level. (That will make more sense once you’ve seen how the game goes).

---

<div class="post-metadata">

**Author:** ![Sitnam](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@Sitnam](https://boards.straightdope.com/u/Sitnam)\
**Post date:** [June 3, 2010, 9:46pm UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/2 "2010-06-03T21:46:25Z")

</div>

Those interested in this game might really like the boardgame [Robo Rally](http://www.boardgamegeek.com/boardgame/18/roborally)

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 4, 2010, 12:01am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/3 "2010-06-04T00:01:00Z")

</div>

Maybe it’s just my computer, but I can’t get it to run any of the puzzles in level 7 (the ones after the two branches). I click on the icon, it tells me “Androids!”, or “Robot bears!”, or whatever, but nothing happens.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [June 4, 2010, 2:34am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/4 "2010-06-04T02:34:22Z")

</div>

> [@Chronos](#):
>
> Maybe it’s just my computer, but I can’t get it to run any of the puzzles in level 7 (the ones after the two branches). I click on the icon, it tells me “Androids!”, or “Robot bears!”, or whatever, but nothing happens.

That sucks!

Maybe try it at a different site? [here](http://pleasingfungus.com/)’s the author’s own site.

---

<div class="post-metadata">

**Author:** ![Manduck](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/manduck/32/256_2.png) [@Manduck](https://boards.straightdope.com/u/Manduck)\
**Post date:** [June 4, 2010, 2:56am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/5 "2010-06-04T02:56:34Z")

</div>

At first it was easy but then it got hard ☹

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [June 4, 2010, 3:56am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/6 "2010-06-04T03:56:49Z")

</div>

> [@Manduck](#):
>
> At first it was easy but then it got hard ☹

Indeed.

I’ve got ten more to go. So far I haven’t come across one that tempted me to give up or anything, but they do begin to take a lot of thought once you get to the columns of seven. (Esp. the second column.)

For me, what’s a little disheartening is seeing the records at the Kongregate forum. I am completely mystified by some of them.

It’s just like back in school–I could always get the proof done in geometry, logic and set theory courses, but my proofs were always ugly and inelegant. Workmanlike. No “magic” to my proofs, if you know what I mean. Same with me and this game.

Still, it’s fun!

---

<div class="post-metadata">

**Author:** ![Tabby\_Cat](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@Tabby\_Cat](https://boards.straightdope.com/u/Tabby_Cat)\
**Post date:** [June 4, 2010, 6:07am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/7 "2010-06-04T06:07:51Z")

</div>

I can’t solve Robotanks.

The challenge is to accept only robots with a binary string of \> 15 , and I can’t figure out how to do this without any counters. Without counters and especially with leadings zeros , I can’t figure out how to do this!

---

<div class="post-metadata">

**Author:** ![Tabby\_Cat](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@Tabby\_Cat](https://boards.straightdope.com/u/Tabby_Cat)\
**Post date:** [June 4, 2010, 6:09am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/8 "2010-06-04T06:09:35Z")

</div>

> [@Tabby\_Cat](#):
>
> I can’t solve Robotanks.
> 
> The challenge is to accept only robots with a binary string of \> 15 and I can’t figure out how to do this without any counters. Without counters and especially with leadings zeros I can’t figure out how to do this!

Just as I post this, the solution occurs to me.

Simply take off the leading zeroes, dammit!

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 4, 2010, 7:02am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/9 "2010-06-04T07:02:14Z")

</div>

Robotanks is easy, thanks to the threshold value they happened to choose. All you have to do is check for a five-digit number. The ones I’m stuck on are Androids (some number of blue, then the same number of red), Mecha (last symbol moved to the front), and Rocket Planes (all blue moved to front).

For Androids, I can build a crude counter that can go up to three or maybe four, using the position itself as the counter, but I’m pretty sure that won’t be enough to pass the test. I presume I’m supposed to use green and yellow to make a binary counter, but I can’t figure out how to do that on the same tape I have the input on.

For Mecha, I can put in a flag for end-of-input easily enough, but by the time I reach the flag, I’ve already destroyed the symbol I should be saving. I’ve got a glimmering of an idea of how to fix this, but I think I’d need to sleep on it.

And for Rocket Planes, I imagine that it’ll be clear enough once I figure out Mecha.

Oh, and I think it was just my office computer that couldn’t run it. It works fine at home.

---

<div class="post-metadata">

**Author:** ![Grumman](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Grumman](https://boards.straightdope.com/u/Grumman)\
**Post date:** [June 4, 2010, 7:10am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/10 "2010-06-04T07:10:15Z")

</div>

> [@Chronos](#):
>
> The ones I’m stuck on are Androids (some number of blue, then the same number of red), Mecha (last symbol moved to the front), and Rocket Planes (all blue moved to front).

Those are the same three I’m currently stuck on.

---

<div class="post-metadata">

**Author:** ![Grumman](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Grumman](https://boards.straightdope.com/u/Grumman)\
**Post date:** [June 4, 2010, 8:40am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/11 "2010-06-04T08:40:13Z")

</div>

I’ve done Androids.

Hint:

You can remove blue-red pairs from the middle of the string, one pair at a time.

Full answer:

I put in a green to mark the start/end point. When it hits a green followed by a blue, it starts looping the blue-checker, adding a blue for every blue removed, until it hits a red. When the blue-checker finds a red, it starts looping the red-checker, adding a red for every red removed, until it hits a green. When the red-checker finds a green, it removes the green, adds a new green, and checks if that green is the next entry. If it is, you know the string is of zero length and it goes to the output, otherwise it’s sent back to the blue-checker.

---

<div class="post-metadata">

**Author:** ![Tabby\_Cat](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@Tabby\_Cat](https://boards.straightdope.com/u/Tabby_Cat)\
**Post date:** [June 4, 2010, 9:44am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/12 "2010-06-04T09:44:01Z")

</div>

Dammit, I just beat androids and was going to post here to boast about it!

My solution is more elegant though.

Hint:

Red/Blue, Odd Even

Solution:

Turn all the blue dots in front of the strip into red dots, then check to see if you have an even number of red dots. Discard if your odd/even checker encounters a blue.

---

<div class="post-metadata">

**Author:** ![Grumman](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Grumman](https://boards.straightdope.com/u/Grumman)\
**Post date:** [June 4, 2010, 10:19am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/13 "2010-06-04T10:19:19Z")

</div>

> [@Tabby\_Cat](#):
>
> Solution:
> 
> Turn all the blue dots in front of the strip into red dots, then check to see if you have an even number of red dots. Discard if your odd/even checker encounters a blue.

Does your solution cope with something like 4 blue, 2 red?

---

<div class="post-metadata">

**Author:** ![Tabby\_Cat](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@Tabby\_Cat](https://boards.straightdope.com/u/Tabby_Cat)\
**Post date:** [June 4, 2010, 10:24am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/14 "2010-06-04T10:24:56Z")

</div>

Hmm, you’re right, it doesn’t. It seems as though the level is not as well constructed as you would have done it.  
Darn. ☹

---

<div class="post-metadata">

**Author:** ![Sofis](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@Sofis](https://boards.straightdope.com/u/Sofis)\
**Post date:** [June 4, 2010, 11:50am UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/15 "2010-06-04T11:50:44Z")

</div>

Rocket Planes isn’t too difficult. The basic idea I used was to build a checker, that reroutes bad input to an incremental fixer.

Details:

Step 1: Write a green.  
Step 2: Copy all blue until a red, which we copy (or green, in which case you eat it and go to end).  
Step 3: Copy all red until a blue, which we DON’T copy (or green, in which case you eat it and go to end).  
Note that we have at this point eaten a blue that was after a red.  
Step 4: Copy the rest of the input.  
Step 5: Eat the green, write the green, and write that blue we ate earlier.  
Step 4: Copy the rest of the input.  
Step 6: Eat the green, and goto step 1.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [June 4, 2010, 1:14pm UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/16 "2010-06-04T13:14:21Z")

</div>

> [@Chronos](#):
>
> Robotanks is easy, thanks to the threshold value they happened to choose. All you have to do is check for a five-digit number.

Somebody has done that one using only 25 pieces. I can’t figure that out–it takes me at least 40. How many did you use?

> [@](#):
>
> The ones I’m stuck on are Androids (some number of blue, then the same number of red),

Spoiler, not just a hint:

The way I did this was first reject if it’s blank or has a red mark first, then put down a yellow mark at the end, then write one less blue at the end than there is at the beginning, then assuming there’s a red following those blues, I write one less red than there is in that string of reds. (If after the blue there was a yellow, then I reject.) Next, I reject if blue, otherwise it’s yellow and I start the whole “subtract one from each” process over again. In the end, if it was an acceptable string, you’ll be left with just a yellow dot and nothing else. When that happens, I send it to the “accept” spot. I recall I had to do some rejiggering at the very end to handle some special case or other–I think it was the case where it starts with just one spot of one color–but other than that, this was the basic solution.

Here’s a code for it:

```auto

?lvl=17&code=y12:4f2;c13:4f1;c13:3f2;p14:3f2;c15:3f2;c16:3f3;c16:4f3;c16:5f3;c16:6f3;c16:7f3;c16:8f3;c16:9f3;c16:10f3;c16:11f0;c15:11f0;c14:11f0;c13:11f0;c14:4f2;c15:4f3;c15:5f3;c15:6f0;p14:6f0;b14:5f2;c12:6f1;c12:5f1;c12:8f1;c12:9f1;c13:9f0;p14:8f3;q14:9f3;r15:8f1;c12:7f1;c15:7f0;c14:7f3;

```

That’s not the most efficient version I’ve made, that one’s on my work computer…

Record for smallest is 12 pieces. Record for fastest is 16 seconds! (Uses 39 pieces.) How do people _do_ this?

> [@](#):
>
> Mecha (last symbol moved to the front),

This one took me a while.

[spoiler]

Yellow stamp at the end. Rewrite the whole string using a special setup that causes the robot to be in a different physical position depending on whether the last one read was red or blue. Once I hit the yellow mark, I restamp a yellow at the end and write red if I’m in the “last one was red” location, blue if I’m in the “last one was blue” location. Now I go through and copy down the whole string again, once again going through a “sorter” as above because _before_ I write down the color, I have to check to see if the next color is yellow. If it isn’t, then I go ahead and write down the color according to where I am in the “sorter”. If it _is_ yellow, then I _don’t_ write down the previous color. So now I’ve written down the last color first, and the rest of the string in the same order as it began, and avoided writing the last color from the original string at the end. It now goes to the “accept” box.[/spoiler]

Here’s a code for it:

```auto

?lvl=28&code=b11:5f2;c12:4f3;p12:5f3;c13:4f0;r13:5f2;b14:4f0;p14:5f6;r14:6f1;y12:3f3;q12:6f2;q15:5f1;y16:5f3;r16:6f3;y12:7f3;b12:8f3;c10:10f2;r10:11f1;c11:10f2;q11:11f4;c12:10f3;p12:11f7;c13:10f0;q13:11f2;c14:10f0;b14:11f1;c13:12f0;c11:12f2;c16:8f3;c16:7f3;c16:9f0;c15:9f0;c14:9f0;c13:9f0;q12:9f3;p11:9f4;

```

Everyone else seems to be able to use these codes to look at solutions, but for some reason when I paste it in, it won’t load up the level. See if it works for you.

> [@](#):
>
> and Rocket Planes (all blue moved to front).

I haven’t done this one yet.

> [@](#):
>
> For Mecha, I can put in a flag for end-of-input easily enough, but by the time I reach the flag, I’ve already destroyed the symbol I should be saving.

The only way I’ve figured out to do this is

have the robot physically go to a different system of machines depending on whether it last read a red or blue spot. That way, the position of the robot encodes the last color read, so you still have that info to work with even after destroying that spot on the tape.

---

<div class="post-metadata">

**Author:** ![Grumman](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Grumman](https://boards.straightdope.com/u/Grumman)\
**Post date:** [June 4, 2010, 3:29pm UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/17 "2010-06-04T15:29:37Z")

</div>

> [@Frylock](#):
>
> Somebody has done that one using only 25 pieces. I can’t figure that out–it takes me at least 40. How many did you use?

I’ve done it with 28. The key for me was that you only need to check for the number of digits once, after the tank has passed through all the branch nodes. This let me save 6 pieces by squishing the chain together, and another 7 since it no longer had to fold back on itself to fit.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 4, 2010, 4:29pm UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/18 "2010-06-04T16:29:07Z")

</div>

My robotanks used 34, but I wasn’t really trying to optimize it.

And I think I’ve figured out Androids and Mechas, and have an idea on Rocket Planes, though I still have to test them:

For Androids, the two key realizations were1: Put multiple filters in series  
2: It’s a test run, not a fix run, so it’s OK to destroy the tape in the last filter

For Mecha, the key realization is that I can use which path I’m on as a form of memory

I won’t put my thoughts on Rocket Planes in a spoiler, since I haven’t solved it yet, but I’m thinking of using a sort of bubble-sort.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 4, 2010, 4:51pm UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/19 "2010-06-04T16:51:03Z")

</div>

OK, my solution for Androids worked with 44 parts, but took a really long time (1:33). It was pretty difficult, actually, figuring out where there was room to put the paths without crossing.

And my solution for Mecha was 25 parts, 28 seconds.

Now on to new and exciting challenges, now that I’ve got Androids out of the way!

---

<div class="post-metadata">

**Author:** ![Sofis](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@Sofis](https://boards.straightdope.com/u/Sofis)\
**Post date:** [June 4, 2010, 5:01pm UTC](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717/20 "2010-06-04T17:01:47Z")

</div>

> [@Chronos](#):
>
> OK, my solution for Androids worked with 44 parts, but took a really long time (1:33).

My solution was much more compact (18 pieces) though not that much faster (54 s).

> [@Chronos](#):
>
> It was pretty difficult, actually, figuring out where there was room to put the paths without crossing.

You can make conveyor belts cross by holding shift when you place them. You’ll need that later.

[Next page](https://boards.straightdope.com/t/manufactorium-a-logic-game-kind-of-a-turing-machine-programming-game/541717.md?page=2)
