My head hurts! Damn logic game

My head hurts! Damn logic game

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

My head hurts! Damn logic game

Post by bobthedinosaur »

http://jayisgames.com/games/manufactoria/

I have some of the levels beat if ppl are stumped to show as examples, but since I am not a coder by trade I bet some ppl will be much better than me.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: My head hurts! Damn logic game

Post by aegis »

ooh this is cool. it's like programming, already using a loop regularly. I've done the first five. my solution to three blues was only partial, and only worked if the red was all before the blue.

confused at the one where I need to put a green at the beginning and yellow at the end... I can't see a way other than branching out every possibility manually, which is laaame programming. :/

edit: ohh duh, I can use the end of the tape as storage <3
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

Re: My head hurts! Damn logic game

Post by bobthedinosaur »

I know, that one really pissed me off at first, and then I was just like 'oh, I can record over them in loops'
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: My head hurts! Damn logic game

Post by aegis »

now it's having me do binary and number comparisons... now my brain is sploding.

not sure how to do "some number of blue, then the same number of red" to work with an infinite number, but I got a finite number hacked up...

my robot to do "move the first to the last" is complicated... writes yellow markers twice.

wait what, binary multiplication now?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: My head hurts! Damn logic game

Post by KDR_11k »

Well, I beat the "ending" level but still have a few to go. The adder is proving especially problematic for me.

EDIT: Okay, got the adder down... (EDIT2: it was the A+1 adder, now I'm facing an A+B adder!)

x red, x blue is easy, remember you can run over the tape as often as you want. I do tasks like that by removing one of each color for each pass.

EDIT3: Woohoo, beat all levels. The A+B adder was a pain in the ass because you run out of room.
User avatar
Wombat
Posts: 3379
Joined: 15 Dec 2008, 15:53

Re: My head hurts! Damn logic game

Post by Wombat »

i cant make it even run... this game is too hard for me ;(
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

Re: My head hurts! Damn logic game

Post by bobthedinosaur »

So, any hints on how to move the same color from the end to the front? It's easy doing it the opposite way, but I am stumped.
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: My head hurts! Damn logic game

Post by JohannesH »

bobthedinosaur wrote:So, any hints on how to move the same color from the end to the front? It's easy doing it the opposite way, but I am stumped.
I spent a good while with this too... But gave up for now.

I used a method where i convert the blues to green and reds to yellow, then when there was no more reds/blues i wrote the color that was the last on the input. But the problem was I found no way of erasing that last color from the end, at least by any means that'd fit to the grid.

Btw what does this have to do with coding so much, compared to any other logic puzzles?
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: My head hurts! Damn logic game

Post by aegis »

bobthedinosaur wrote:So, any hints on how to move the same color from the end to the front? It's easy doing it the opposite way, but I am stumped.
I used a yellow marker - first place it at the end, then loop through and move it to the position before the end.

[spoiler]

when the bot comes out, my solution immediately writes a yellow marker.
then the bot goes into a red/blue bridge.

on both the red and blue sides of the bridge, it enters a green/yellow bridge.
if it passes through the green/yellow bridge unknown (meaning it's red or blue), the red/blue color corresponding to the side of the original bridge is added back onto the end of the tape and the bot is sent back to the original red/blue bridge.

if it goes out the yellow part of the green/yellow bridge (meaning it hit the yellow end marker), it goes on a different path.
this second path also adds the corresponding color back onto the end of the tape, but adds a yellow dot before.
unlike the first path, this path doesn't continue the original loop into the r/b bridge - it instead continues to another section.

the process up to this point effectively puts a single yellow dot *one space* before the end of the tape.

the next section simply loops a red/blue bridge, cycling the colors on the tape (immediately add red or blue back on each side), until it hits the yellow dot and passes through. since the yellow dot makes it break the loop, it never puts the last dot back on the end... but leaves it on the front.

then it passes into a green/yellow bridge to remove the yellow dot, and goes to the exit point with success.

[/spoiler]
Btw what does this have to do with coding so much, compared to any other logic puzzles?
you're actually using a simple programming language by creating a path on the grid. you can even do addition, multiplication, etc.

----

KDR is a beast <_<
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: My head hurts! Damn logic game

Post by KDR_11k »

The early levels teach you patterns that you'll need later, e.g. that one teaches you the pattern for finding the color preceding a special marker, you'll need this much more often later.

Remember you have two forms of storage: The tape and the machine state (where the robot is located), you can't store complex data in the machine state but one or two bits work.

Things the ? button teaches you that you probably didn't know before: Crossed conveyors form bridges and space flips branch conveyors. Also you can move on a branch conveyor from any direction, not just the base one.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: My head hurts! Damn logic game

Post by SwiftSpear »

bobthedinosaur wrote:So, any hints on how to move the same color from the end to the front? It's easy doing it the opposite way, but I am stumped.
I was really happy with my solution. You can make a simple algorithm to detect weather the last bit is red or blue, run through a loop where all blue dots head to one side and all red dots head to the other side, and if you pass through the blue side the last dot is blue, and if you pass through the red side the last dot is red.

I took this algorithm, and made it so any result on the red side except the pass through marked in yellow, and any result on the blue side marked in green. What this does, is records your original string into yellow green, but it does it one test late, so the last bit is never recorded.

When it finds the last bit, because it has failed to record what the last bit is, and because it has identified weather it was a red or blue bit, I just marked it as red or blue, and then had the yellow green bits cycled through to red blue again so the last bit was pumped to the front.

I tried to make aegis's machine for ages, but I kept running out of space.

I think this game would be much easier if I had studied Turing algorithms.

I can't do androids.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: My head hurts! Damn logic game

Post by KDR_11k »

I did that "first blue, then red" mission with pretty much a bubble sort: Run until you find a red, as long as blues follow pass them through and put the red you took back in when you encounter a non-blue (it goes without saying that I use a terminator symbol to mark where the string originally ended, my usual convention is green for terminator symbols, yellow for mid-string markers). Repeat until there is no blue following a red.

EDIT: Oh, wait, I put the taken red back in at the end of the string, not on the next red.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: My head hurts! Damn logic game

Post by SwiftSpear »

Woo! I beat androids! the solution I made like 3 days ago was working, I just had one messed up conveyor belt -____-
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: My head hurts! Damn logic game

Post by TradeMark »

this game totally should have some tutorial showing how to use those objects... doesnt make any sense

send me the third level solution, i dont know what the hell is the logic here
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: My head hurts! Damn logic game

Post by KDR_11k »

It does explain what they do. Especially at that early stage it's pretty easy.

Think about what the stage requires: Accept only with three blues. That means reds don't matter but if the tape ends before there were three blues you have to toss the robot away. You can split the task into three sub tasks consisting of "accept if you find a blue" and lead them into each other.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: My head hurts! Damn logic game

Post by TradeMark »

yeah i tried that, it didnt work... theres something i dont know about the mechanics

just send the level, i dont have time to brute force it, im not kid anymore... i just want to know how to play that game
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: My head hurts! Damn logic game

Post by KDR_11k »

?lvl=3&code=p12:6f2;c12:5f3;c12:7f3;p12:8f2;p13:10f3;c12:9f2;c13:9f3;c14:10f0;

See if that teaches you anything.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: My head hurts! Damn logic game

Post by SwiftSpear »

Lava lamps
Attachments
manufac1.gif
manufac1.gif (4.88 KiB) Viewed 5744 times
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: My head hurts! Damn logic game

Post by TradeMark »

SwiftSpear wrote:Lava lamps
weird, thats what i tried at first o.o maybe i had something in wrong direction.. idk
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: My head hurts! Damn logic game

Post by aegis »

lava lamps
Image
works 99% of the time on the default sets :)
could make it a little more resilient (only requiring two of the blues to be adjacent instead of three) by moving the bottom two down one in the line
Post Reply

Return to “Off Topic Discussion”