Remember, if you don't read anything, then the input stays as is.
My solution for the bugs level that I posted above should take into consideration both of your points.
1. If the string is length 0, it sends it straight to the end. dump it. Else
2. Loop: while color n != color n-1, increment n. Loop until the end of the string is reached, or until the string fails the test.
3. Send it to the end.
Here's the level code again if you wanted to check it.
Since it only tests for sequences of 2 identical colors in a row, it doesn't matter if a sequence is 2, 3, or 4 colors wrong - it will catch it and dump it after the first 2 matching colors. Also, it should run for strings of any length, provided they terminate at some point.
When you copy the level data, highlight the line below it too. The game will ignore the extra line, and you can be sure you got the whole code.
Also, make sure you put the code in the right place. Load the level and click on the floppy disk, then paste.
Here's my Ophanim solution:
The general principal:
First, strip off all the leading zeroes from both strings. Next, shuffle them together; if the strings are abc... and ABC... then we end up with aAbBcC.... If one string is longer than the other, it's easy to catch this during the shuffling, and we can accept or reject as appropriate. If they're the same length, it's easy to tell which input is greater now that you have them shuffled together.
It's a pretty small solution (72 pieces) but it takes 45 minutes.
About your solution
Wow, I was thinking about a solution that would work on shuffling them togeather, but I just couldn't figure out a way to do it. Yout shuffling mechanizm is truly amaizing.
Sadly there seems to be some sort of problem at the end. It won't work correctly for numbers of the same lenght. (In all test cases for the level, if you strip the initial reds, you'll always end up with different length numbers)
Try it for blue,red,green,blue,blue.
I'f I'm not mistaken, the problem lies in the fact, that the shuffling also reverses the order of the colors, and you do the comparison from the back. But for numbers of the same length, to decide witch is bigger, you'd look for the first difference from the front.
Also for people who are having problems with level codes, here's how:
(spoilerd to take up less space)
Copy the entire level code starting from the '?'. Select the level to witch the code corresponds. Click on the floppy icon, then click in the text box (clicking once in the text box should selec all text in it). Finally paste in the code.
Some important things to remember:
There's a level editor, but you can't load the level codes there. The level codes for compleatly new levels are different, so these codes won't work in the editor.
The newly loaded level will overwrite your old level, so if you alredy have a solution you want to keep, back it up first.
All level codes start with ?lvl=#. Make sure that the number is the same for the code that's alredy in the textbox and code you want to copy in it. The code you load will actually not load in the level you selected, but in the level number specified at the start. So actually selecting the corresponding level to load the code is not necessary, but advisable, because you'll see what will you be overwriting.
Finally if you want to copy your setup from one level to another. Because the objectives are similar or something. (like officers/generals, androids/robo-children, teachers/politicians ect) Then you can't do that simply because of the aforementioned reson. To do this, first look up the number of the level you want to copy to. Then copy the setup you want to insert to a notepad, and change the level number to the new one.
I hope this helps.
Thanks; that's a good catch. I think this one is valid
I took the ugliest (but easiest to implement) approach and changed it to read off the shuffled string backwards.
Also, thank you so much for the level code help. I feel like an idiot for not figuring that out.
I feel really dumb for saying this, but when I open a spoiler link to copy the level codes, the code is cut off halfway through. Clearly the rest of you are able to copy/paste the code, so I'm not sure what's wrong here. I'm using Chrome on Ubuntu Karmic. Any advice?
I feel really dumb for saying this, but I'm having trouble with the level codes as well. When I open a spoiler link to copy the level codes, the code is about half the length of the codes I see when I go to copy my own levels. Clearly the rest of you are able to copy/paste the code, so I'm not sure what's wrong here. I'm using Chrome on Ubuntu Karmic. Any advice?
Hey, I got Metatron! It wasn't easy.
First I tried a simple approach...
...based on the idea of...
...an incrementor and decrementor (from prior solutions) running in lockstep.
This is easy to fit because it has few components and some nice symmetry.
That seemed like it would finish in a matter of hours, but after running for a while, the simulation speed slowed down a lot (even though the tape size wasn't increasing).
So I did a better solution...
...based on the idea of ...
...summing from least to most significant bit, with the 2nd input terminator set to yellow or green to indicate carry...
...and a lot of effort to find a way to make it all fit.
Question about stilts:
Is there a general solution for stilts that will work for any tape?
Mine only works because there's no green in any of the input robots:
I don't know how else to mark the end/beginning of the input robot's tape.
Here's a little level I made for you guys. You need to replace reds with blues and blues with reds IF they come in groups of two or more.
I don't know the answer to your question, but did you notice that the instructions on green/yellow colors say "NO ROBOT will have yellow or green on its tape, UNLESS YOU PUT IT THERE!", so I wouldn't feel guilty about relying on that.
Although some later robots have green marks, but only where indicated by the problem description.
I'm using Chrome on Win7 and get the same problem with the codes being truncated. I can copy them by using "view page source".
That did the trick. Thanks BarryD.
Insanity: Your solution to Androids was gorgeous! I am jealous I didn't think of it :)
I'm kind of stuck on Judiciary. There's a brute force solution that's sort of obvious, but I'm having trouble fitting all the components. Heck if I can figure out a more elegant solution though.
I wouldn't worry about relying on there being no green or yellow. If arbitrary inputs were allowed, the machines would be only as powerful as deterministic finite automata (rather than Turing machines), so the following levels would be impossible:
Robocars, robostilts, androids, roborockets, roboplanes, robomecha, robochildren, police, teachers, rocket planes, officers, judiciary, politicians, academics, generals, engineers, seraphim, ophanim, and metatron.
So... almost everything.
This is my solution for Judiciary:
Which is Police + Seraphim.
Looks like there's an error in the Robotanks level. It says to accept "binary string > 15". So I'm not accepting BBBB (which, with B=1, is 15 in binary), but it's telling me I should. I assume the instructions should be "binary strings >= 15".
Oh, nevermind, I read the test results backwards. I guess I accepted it when I shouldn't have.
Actually, I'm having major problems today. For some reason a bunch of mine that I completed yesterday doesn't work. The Binary > 15 problem. For some reason does not work anymore. Looks like the system is having problems.
Another custom level for y'all.
Combinatorists: With blue dots as up steps and red dots as down steps, accept only Dyck paths.
If you've never heard of a Dyck path, here's an easy explanation: think of the bLue dots as Left parentheses and Red dots as Right parentheses. Accept the input string if and only if the corresponding sequence of parentheses "makes sense". For instance, (()()) is fine, as is (((())))()(()), but ((()) are bad because there are more (s than )s, and ())(() is bad because the second right-parenthesis doesn't match up with anything.
Can you fit your machine into such a small space?
I'd rather not just look at a solution, but thanks for the hint that involves some of the same logic as Police. That's where I started, and then convinced myself I was on the wrong track.
My solution for your level:
I've been yearning for a hint-through / concept-through walkthrough for this game, rather than copy-and-pasting solutions over my own work. So, here's a descriptive walkthrough for the ones I've solved thusfar. (Credit given when I didn't figure out the solution myself.)
You want a string with no red, and the only way to get there is to have it look at every dot. Set up a conveyor belt with a branch whose directions are, "If you see a red, dump the string. If you see a blue, send the string backwards and keep looking. If you see nothing, it means the whole string has been checked and there weren't any reds, so accept it."
Your first branch should divide strings into two categories: strings that start with red, and strings that start with blue. Set up a Figure-8 loop of sorts, made of two branches, one of which rejects reds but keeps blues in the loop, and the other of which rejects blues but keeps reds in the loop. Set up your initial branch so that strings starting with red are checked on the reject-red branch first, and strings starting with blue are checked on the reject-blue branch first. Achieving a null string means the robot passes, so send the branches' nulls to the finish.
Here's the two best hints I can give you:
1. If, on any of your splits, you see a red, send the string back to the beginning.
2. The solution I found has a flaw: it will accept strings that end in even numbers of blue, but erroneously reject strings that end in odd numbers of blue above 2. The only passing test cases presented end in 2 or 4 blue dots, so mine works for the game's sake, but I don't have good advice on a flawless solution.
Don't make this harder than it is. Make a branch to check the first symbol. Write that symbol. Send it out the door.
Set up a conveyor belt leading to a branch: blue dots get a green punch and get sent back to the beginning; red dots get a yellow punch and get sent back to the beginning; nulls mean that only green and yellow remains, so send it out the door.
Punch a green dot first thing. Set a splitter make two little loops: if you see a blue, punch a blue; see a red, punch a red; in both cases, send it back to the same branch after punching the dot. Eventually, it'll get back to the green dot and register a null; give it a yellow and send it on its way.
Divide the board into two big halves: Starts with Red, Starts with Blue. On each half, set up loops: if you see the starting color, go to a branch that sends nulls to the finish. If you see the opposite color, go to a branch that sends nulls to the trash. On both of those "deciding" branches, if any other color is seen, go back a branch and keep checking. Be sure to account for one-dot strings.
Odd numbers will always end in a blue dot, right? So make a machine that only accepts strings ending in a blue dot. If you solved RoboCats, you can solve this.
Androids, hints courtesy insanity and Sam Dulmage:
You should make a cycle which
process two bits at a time:
When they are different, cycle back to the same cycle.
When they are the same colour,
Write a bit for the corresponding green/yellow colour.
When no blues or reds are left, cycle to the green-yellow cycle and vice versa.
Sam Dulmage's explanation:
Go through the whole stack and remove one blue and one red. If there isn't at least one of each, kick it to the floor. Repeat until all gone.
In other words: Is it blue? If blue, go through the stack replacing every other blue with a green until you hit a red. You've now stripped out one of each. Now go through the rest of the stack replacing blues with greens and greens with yellows. Great. Now you've got a green/yellow version of the original, minus one matched pair...
First off, mark the end of your string with a green dot. Then build a bizarro-world version of Robostilts: see a red, punch a blue. Loop the string through this branch until it sees null (which is actually the green, of course), then send it through one last green/yellow branch to strip off the green dot and send it out the door.
Don't make this harder than it is: you should only need to place seven tiles to complete this, and two of them are only conveyor belts to reach across the board. Mark the end of the string with a green, then make a branch that punches blue when it sees blue, and just conveyors back to the branch when it sees red. Once the red/blue branch sees the green as a null, send it to a yellow/green branch to ditch the green dot and send it off.
Think of this in three tasks, that must be accomplished in order:
1. Figure out the last color.
2. Stamp that color.
3. Stamp the rest of the string behind it, but without stamping the last color a second time at the end.
First of all, mark a green dot so you know where the string ends. Then, send the string through a red/blue branch that will divide your workspace into two halves. Each side of the branch should re-stamp the dot removed, then check for the green dot. If it doesn't see the green dot, send it back to the original branch to try again. If it does see the green dot, hooray! It's just finished the string! Mark that spot with a yellow dot, then stamp the same red/blue color it just stamped a second time--after all, that was the last color, so now you're stamping it as the first color.
Now, onto step 3: rewriting the string with the last color removed. Make a red/blue branch similar to the original one, except this time, check for the yellow dot before re-stamping the dot removed by the branch. When it sees yellow, follow the yellow dot road (sorry) to the finish.
This one is really most beautiful if you do the math. This is the 8x multiplication table, in binary:
1 x8 = 1000
10 x8 = 10000
11 x8 = 11000
100 x8 = 100000
...and so forth. You see the pattern, right? Isn't that cool?
Oh fine. Anything in binary, multiplied by eight, simply adds three zeros to the end. And three reds and send it out the door.
Step 1: Set up a loop to strip off any leading reds. They're meaningless; the number 00001 is the same as just 1. Once it hits a blue, proceed.
Step 2: Anything in binary that is greater than 15 will necessarily have five dots. We don't care what those dots are, since we already made sure that the first one is a blue. Set up branches that allow anything non-null to proceed, and anything null to get dumped, until five dots have been processed. (Don't forget: you already stripped off one blue dot when you were checking for leading reds.) After your branches have seen five dots, send them home--you don't even need to look at the rest of the string to see whether there are more dots left.
Robospies (elegant solution courtesy buttons):
Like in Robotanks, strip off any leading reds first.
Like Soldiers, this puzzle is elegant once you look at the math. This is the 4^ table in decimal:
4^1 = 4
4^2 = 16
4^3 = 64
4^4 = 256
4^5 = 1024
And here it is in binary:
4^1 = 100
4^2 = 10000
4^3 = 1000000
4^4 = 100000000
4^5 = 10000000000
See the pattern? A one, followed by an even number of zeros. Isn't binary cool? If this isn't enough of a hint:
The rules you need to set up are:
Once you see that first blue, there cannot be any others. See a second blue, dump the string. Also, there must be an even number of reds, so if you see a red, immediately check for a second red. If there's not one, dump it.
Anything that passes these two rules passes.
I'm not able to speak to how to solve the remaining puzzles--I'm stuck on them too. :-)
This is the correct code for Robolamp!
Here is my solution :)
@scottique: I think this solution for Robo-cats should work for any number of colors with any number of blues at the end
Or, in plain english:
1. Block 1 checks until it finds a blue, passes to Block 2.
2. If red at B2, sends back to B1. Otherwise, we have two blue in a row, so sends to B3.
3. If B3 sees no more colors, we have two blue in a row at the end - send to finish. If we see another red, send back to B1. If we see another blue, keep checking B3 until either we reach the end or see a red.
After solving officers I checked the forum to see if anyone came up with a faster or cleaner solution, but mine seems to be the first.
The way I did it was by
putting a green "tag" when adding to an odd number, that shoves towards the beginning of the line
until it meets a red dot
This is my solution:
POLICE general solution description (not optimized, but logical)
1. Setup the string as YccccccYG, goto 2
2. look for first Y
....a. if the next is R/B, swap it with the Y and goto 3
....b. or it's YY, then goto 5.. (aka clean up), having dropped one Y
3. look for 2nd Y, then swap backward 1, goto 3.
4. look for G/Y, add it back, goto 1
....a. if G, add it back, goto 2
....b. if Y, then it was an odd-length string and drop out (top left)
5. move the remaining Y to the end, look for G and exit
Null strings pass through 1-2b-5 and out, with one Y.
...optimized: 3:25, 51 parts
step 1 becomes "1. Setup the string as 23456YG1Y, and goto _3_"
I've been able to complete all of the levels until Metatron without help. I just now realized that you can switch directions of branches with space.
Here's my orphanarium solution.
I added a yellow to the end of the second sequence. Then I stripped off the beginning reds for each sequence. If the first sequence had nothing, the process would terminate. If the second had nothing, the bot would be accepted. I added greens between each code for the first sequence, and yellows between each code for the second. A double green/yellow signaled the end of each sequence. I removed greens and yellows 1-1 (to check code length). If there were more yellows, the process would terminate. More greens, and it would accept the bot. With an equal number, I'd remove the blue from the beginning of each sequence and start the process over.
The design took a few tries to fit in the area. I could have made it more compact I I had known about switching bridge directions.
Metatron hopefully won't take as long.
@EyeKey: Excellent. That's more or less the same as the one I came up with, though you can pare it down to 9 pieces if you shift things over a bit.
My solution is faster and cleaner:
Yet another custom level!
Come on, I can't be the only one making these.
Centurions: Accept if the number of blues divides the number of reds.
My solution to this one is kind of messy, so there's probably a lot more room than necessary here.
Can someone explain me in which condition is an android accepted ? I though I understood but for example, for the first one, if I put nothing, it's accepted, if I add a red/blue it also is accepted while there isn't as much blue as red, I'm confused.
Robo-Rabbits: Inputs are always n blues followed by m reds (n, m possibly zero). Output exactly n*m blues.
Solution for Centurions: (can be more efficient)
Solution for Robo-Rabbits:
I don't have a good idea for a level right now :(
I like everyone's super complex solutions to Andriod.
An update for the walkthrough on Robocats!
Three states: (Represented by Red/Blue filters)
If red - return to initial
If blue - move to 1-blue
If null - don't accept
If red - return to initial
If blue - move to Acceptance
If null - don't accept
If red - return to initial
If blue - return to Acceptance
If null - accept
Is there enough room on the map for an O(n) solution to Androids?
Currently working on Police! Officers! and Academics!
Coming up with the algorithm is easy, implementing it on the tiles is the tough part.
Here's a simple Robocats solution that will accept even odd numbers of blues at the end that are greater than 2 (ie a string that ends with 3 blues would pass this test).
Sorry for the double post but I used my recent solution for Andriods and was able to tweak it for Teachers
A simpler Androids, in 2:36
Here's a minimal Robocats solution. I think it may just be a more compact version of a previous solution.
Great work guys.
Another custom level for anyone who can't get enough of this game!
It basically involves pattern recognition. The input string consists of two parts separated by a green. I will call the first part the 'code' and the second part the 'message'. Basically you have to accept only those inputs where the 'code' appears somewhere in the 'message'.
Is there sound in this game? There's a mute button on the top right corner, but I don't hear anything, even on the highest volume settings.
Here's a small academics solution. I thought it up last night.
The general idea:
Put a yellow at the end and bubble it forward, putting the first in the string just after it. Until it is up front.
I like this solution to Officers, very few conveyors (just 1) before going to the exit.
Minimal parts and very fast.
Similar to my academics. Put a green as string marker and yellow to bubble forward.
When you hit a red, you can turn it blue and stop. On blues, repeat.
And don't forget the overflow ...
Your solution won't work for any case (six blue for example)
And the solution of Syntax is simpler and just little bit slower (but works for any case)
I love the hint-through! Thank you for this!
For everyone who agrees that there are too few mid-range difficulty levels, I think I created a nice little brain-tickler. Load this into your game:
"Accept if there are exactly four dots on the tape!" The difficulty is completely space-based, like in many Codex-levels (oh how I love that game); the board is 7x7. Good luck, it took me about 5-10 minutes to solve.
Here's an easy level for you, a tribute to Flight of the Conchords. A small quote in an obscure flash-game must feel like the crown to their work.
Level code for 'The Humans are Dead':
Another one for the simple-minded, like me (I just still can't get my head around the later levels)
RoboWaltz, ACCEPT: if string ends in red, blue, blue.
I like making these levels, but feel very restricted in my own understanding of the system. A question for all you clever players - do you think this level is possible: ACCEPT: If the second half of the (even) string is the mirror image of the first.
It is the level Engineers!: "ACCEPT: Perfectly symmetrical strings!"
Here's a solution to Robowaltz:
However, your test cases have a bug in them. :-) "brr:*", ":*", and "rbbb:*" none end in rbb, but the "*" indicates that they should be accepted anyway.
Beautiful! Don't think Officers can be done better than you did. The factory must be pleased having you testing their bots!
And I have to mention: this game is so awesome, so addicting and so challenging! And so rewarding every time you solve a level. To me it is the greatest game I ever came across. And it doesn't make me feel bad about wasting my time. It just makes me very happy.
I created a level.
Read the tape as a number A and a color B, separated by a green. The output is A times B.
brr(g)b => bbbb
You end up needing 3 R/B gates. The first gate accepts the initial string, and any string that just had a red. The second gate takes in any string that just had a blue. The third gate takes in any string that just had two blues in a row.
@in_dubio: I think this is the minimal solution to Level Name. (Nine parts.)
Great game. All levels done.
Some hints in case you missed them:
+ You can clip a switch by hitting space
+ Paths may be crossed over creating a "tunnel" and "bridge"
+ With selection (2) you can also Delete and Copy/Paste using Shift-C and Shift-V
+ The speed slider will allow you to speed things up during testing
+ You can test with your own string using the wrench
*** Now if you are looking for an extra challenge try this:
- Only accept binary strings which are a multiply of 3
- Try the same for a multiply of 5
New challenge: Accept if the number of dots is a square.
There's a harder analogue of this: with blues as 1s and reds as 0s, accept binary numbers that are squares. That one's rather unpleasant, though, so I didn't bother making it into a level.
This game is great.
I think i got a pretty minimal solution for mecha, i think it can run arbitrary length strings.
I built two different machines for Rocket Planes. The messier one is much faster. I used the hints by @Priha for the beauty (thanks!). Still I think the fast one (7:32) isn't as fast as it can get. Anyone faster?
this one works by putting all reds at the end of the string
when it encounters the code red-blue it returns blue-red, until they're all sorted
By the way, I assume that the factory produces huge amounts of robots, and as the conveyers and switches seem rather simple, they can't be too expensive.
Therefore I think the speed of the machines is more important than the number of parts used. However, as the parts do have a price, redundant loops and switches should be avoided.
So speed first, then parts. I hope you all agree.
It's why I did Androids like this (2:38):
Excuse me. This is the improved Android solution that doesn't get stuck if it's fed only reds, and keeps working with theoretical longer strings (the space on the tape is limited, but we are building machines that are future proof. And the next generation of robots will have upgraded tape lengths, naturally)
Androids in 0:29 with 18 parts
I can't type in codes in IE or in Firefox. As soon as I hit a key it goes back to the design screen. I can ctrl-v and it does paste some code but it seems off. For example, here is a screenshot of the setup I get: http://www.bigbearsam.com/uploads/androids.JPG
That fails EVERYTHING. So I'm a bit baffled.
Some general hints to being able to wrap your brain around this game. I hope these help your brain tune into the way of thinking, in order to be able to solve things on your own!
1. Think algorithmical! Each solution consists of doing one operation, then the next then the next and so on until the correct result is achieved. A series of operations is called an algorithm.
2. Each step in the algorithm should be solved with a batch of machinery (ingame items) that provides input->stuff happens->desired output
3. All the steps in the algorithm together should provide the desired output.
4. Some of the later levels can be solved by using multiple algorithms. (multiple sets of operations. Not just one set of operations)
5. If you do not try to think of the solution by using algorithmical thinking, you will probably fail.
6. Some solutions require simple (or even advanced?) knowledge to handling binary numbers. If you do not care to learn how to handle binary numbers, you should skip these levels. (However, if you like this game, you might actually like playing around with binary numbers!)
7. If all else fails, look at other peoples solutions, and try to break down their algorithms into the steps being done. When you understand why they are doing certain things, you can try to implement similar solutions in your own designs.
8. This game is awesome! :D Glhf!
Here's the smallest Android I could make: 25 parts.
Warning: It's *very* slow.
Swami: This does Rocket Planes in 5:15. It works by
checking to see if the input is valid. If it is not, then it replaces the first red with a blue, and the next blue with a red, and tests it again. I believe the speed-up happens because it lets one blue jump over a whole line of reds.
@swami - here is my 7:20 solution for roboplanes
It's pretty ugly, but is at least a minute faster than any of the cleaner solutions I came up with. It would be even faster if I could figure out a way to improve the layout.
For robomecha I checked for green first and it worked well. If you check for green first, you won't get an annoying extra color at the end.
The four unlocked ones that I'm stuck on are Robobears, Milidogs, Androids, and Rocket Planes. The hint-through's explanation seems close to what I have on one or two of those, but mine seems to fail on occasion. And I don't want to just paste the answer in...
Maybe I'll come back to it later. I like this game, though. It makes me think. It's rare for a flash game to make me use logic in this fashion. I feel like a programmer...
Thanks for the note - apparently I forgot to put the wrong answers on 'reject'. Oh well, for whoever's interested, here's the fixed level code:
Dammit - Here's the fixed version:
@Buttons: fantastic solution for 'level name' (which I renamed 'ConnectFour' the other day). Mine didn't use any greens or yellows and needed quite a bit of space; I used 6 bridges and all dividers were crammed up against a wall :)
This is an additional solution to Ophanim that is not as good as teds (it runs in 48 with 131 parts).
1. Add a yellow at the end and then get rid of all red zeros at the front.
2. Loop 1 - check whether the last of the first string is 1 or 0
3. Loop 2 - check whether the last of the second string is 1 or 0
4. Add to a third string, green for a tie, red if B>A, blue if A>B.
5. Repeat steps 2-4 until there is nothing in the first string.
6. Check to see if second string is bigger and contains blue. If so, throw out the bot.
7. Dequeue the rest of the third string we created. If blue, accept the bot. If green, keep dequeuing. If red, drop the bot.
The trick to creating the third string is to add a second yellow between steps 1 and 2 to mark the third string. Then in between repetitions of 2-4, make sure to run through that third string before starting over.
Rocket planes faaaaast
An even smaller version of Androids! Only 24 parts!
Still extremely slow.
My solution for Rocket Planes: (3:35 18 parts)
I check if the string is correct, if not, I just move the first blue that interrupts the string to the start. (put the ending mark before it)
If we had enough space and a way to directly count and compare, we could probably set up an O(n) for Androids. As it is, I think the algorithm of stripping out 1 red and 1 blue each time is the best we can do with our constraints, for O(n^2).
I'm actually considering sending this game to some CS/Discrete Math professors at the university I'm at. Should be interesting for algorithm/pseudo-Turing Machine design.
For the level "Robospies" you just forgot to count in 4^0 = 1.
I noticed it when doing that level. I didn't have any more to say other than that.
urg. When you stop understanding your own machines, it's time to quit.. Whether or not they work..
A few of my solutions for Androids:
Relatively small and fast, works for all strings:
Very small - only 23 pieces, which I believe is the minimum - but also very slow:
This one is, I believe, the fastest possible solution for the given test strings, though it can get stuck theoretically:
A 26-piece, 52 second Robomecha solution:
When using bridged conveyor belts, I'm having difficulty telling it which belt to use when coming from each adjacent square. Is there any way to fix this?
Note to those designing levels (in_dubio seems to have hit this problem): for accept/reject levels, the interface doesn't actually seem to remember when you tell it to reject things. You'll have to just take your level code and alter it by hand: * after the colon means accept, x means reject.
I found a universal solution for teachers
I think it cant be more simple than this, but you can try to slim it changing the disposition of pieces to use less of them. (48 parts 1:14)
Pasting/typing code into the Load/Save screen doesn't work. As soon as a key is pressed the screen shifts back to the game board. It's a bug for sure. I'm using Firefox 3.6.3.
[Remember that when pasting in Flash, you must use the right-click menu. Keyboard shortcuts won't work. -Jay]
Swami - your solution is very lovely, but unfortunately flawed.
Imagined the following sequence:
30 reds, 5 blues. That would translate to 6 yellows and one green sequence when processed. That would become 1 red and one green, and when that is sent through, it will accept it, even though there are clearly not equal numbers of reds and blues.
Here's a 3:19 O(n) Rocket Planes:
Take the first red and move it to the end.
Continue doing this until all reds are at the end.
On second thought, I take it back. The appending threw me for a loop.
You tested it on the new version, which has fewer recorded tests. With the old version the time is 7:14. My solution with just moving the blues to the start is still faster. (1:48 in the new version)
And there is no O(n) solution for it. The solution is O(n^2).
Figured out Androids thanks to Sam Dulmage's explanation. Solution was fairly elegant, in case anyone's curious...
Milidogs solved as well, now that I'm not sleep-deprived... On to Robobears!
...And done with that, thanks to Fiordhraoi's solution. I was having trouble with one-dot strings, which I could have solved by not including an extra blue-red switch when I didn't need it. (Oh, but Fiordhraoi's solution for Robobears needs an extra pathway down the middle to deal with empty strings.)
For anyone having trouble with finding a simple solution for Robo-Children (though I can't imagine why):
Does it remind you of an earlier level with a similar objective?
Androids, perhaps? This one doesn't require that they be in a "proper" order, though; as long as they have the same number of each color, it's fine.
All you have to do is take the arrangement from Androids, and add in the "red side"; make it symmetric for the red and blue pathways.
I'd actually created the red pathway in Androids, but gotten rid of it when I realized it should only accept them if the dots were in a certain order. For Robo-Children, (lazy as I am), I just took the level code from Androids, externally changed the level number in the code, and pasted it into Robo-Children (then added the red side again).
For the robo teacher level
Like the andriod level but slightly different.
1. in stead of going through the middle to the next cycle, use the blue side and for going back up. use the red side to go to the finish
2. dont put anything on the middle
Maybe I missed something, but it seems to me that the definitions for Androids and Robochildren have recently changed.
Androids: Equal number of blue and red, in any order
Robochildren: Twice as many blues as reds, in any order
Androids: Some number of blues, followed by an equal number of reds
Robochildren: Equal number of blue and red, in any order
The game also seems to compare your solutions to others', but I'm not sure about the details here.
OtherBill, the swaps I can see are:
Accept: An equal number of blue and red, in any order!
Old: Androids, New: Robo-Children
Accept: Some number of blue, then the same number of red!
Old: Teachers, New: Androids
Accept: X blue, then X red, then X more blue, for any X!
Old: Politicians, New: Teachers
Accept: If there are exactly twice as many blues as red!
Old: Robo-Children, New: Politicians
EyeKey, slight modification for your Rocket Planes shaves a few seconds off, at the cost of two more pieces.
3:24 old version, 1:40 new, 20 pieces.
Here's a 1:26, 75 piece Metatron.
And here's a 0:52, 27 piece Ophanim in a similar style