10
This puzzle is the next in my series of Manufactoria challenges.
Background
Manufactoria is a game / two-dimensional programming language. The player must create programs that will manipulate a queue to arrive at the desired output. It is easy to learn but hard to master, so it lends itself to creating a wide variety of challenges. If you don't know what I am talking about, I advise that you play the first few tutorial levels of the game.
Challenge
Your challenge is to create a machine that will return the very last element of the input string. To make this even more challenging, the input string can be any combination of all four colors.
The official custom level to be used is found here:
This week's challenge is mostly focused on the idea of compression. I chose this challenge to require a huge mess of conveyor belts. The fact that all four colors appear in the input means that it is very hard to store information.
Although I did not attempt compression, my first working prototype had 114 parts and fit into the 13x13 space with almost no room to spare.
Scoring
The goal of this challenge is to use a few parts as possible. The score is the number of parts placed, and the lowest score wins.
Although there are only 8 test cases, your creation should be able to theoretically function under any test case. The test cases provided are for debugging purposes.
Examples
in: byrgyrbyrrgry
out: y
in: ggryybrryr
out: r
in: #don't you love degenerate cases?
out:
in: gyrbrygbrygbyrb
out: b
...you can put conveyor belts on top of eachother? – SuperJedi224 – 2016-04-15T13:58:38.633