This is from a different thread and it seemed to cause some head scratching amongst a couple of members:
Thought I'd post this as a challenge for anyone who is interested:
Design a 16 input AND gate with only one moving part.
To clarify, I'm counting a block of material that moves as a "moving part", connectors don't count.
Here is a hint if you get stuck:
[SPOILER]My n-input AND gate consists of:
[/SPOILER]
- a rectangle of dark matter,
- a rectangle of some other material,
- 1 mag switch,
- 1 mag key,
- 1 other switch,
- a number of connectors.
Here is a solution:
[SPOILER](4 inputs shown, but should work with any number)
Set your inputs to directional and connect them to the chains. gS is your output.[/SPOILER]Code:Dark Matter moving Part |------| |------| | gS |ccccccccccc| gK | | | | | | |ccccccccccc| | | | | | | |ccccccccccc| | | | | | | |ccccccccccc| | | | | | | gr |ppppppppppp| | |------| |------| where: ccccc is a chain, set to strength 10, ppppp is a piston set to stiff / strength 5 gK is a green mag key gS is a green mag switch (set to invert) gr is a grab switch (set to direction / inverted) and connected to the piston.
And here is a better solution (edited in waaaaay after the thread died):
[SPOILER](4 inputs shown, but will work with any number)
Set your inputs to directional and connect them to the chains and the piston. gS is your output.[/SPOILER]Code:Dark Matter moving Part |------| |------| | gS |ccccccccccc| gK | | | | | | |ccccccccccc| | | | | | | |ccccccccccc| | | | | | | |ppppppppppp| | |------| |------| where: ccccc is a chain, set to strength 10, ppppp is a piston set to stiff / strength 5 gK is a green mag key gS is a green mag switch (set to invert)
And if that's too easy for you, design a n-input AND gate with no moving parts - no hints this time.
Edit - if you want to have a go at challenge #2, don't read on, the solution is further pown the posts!
P.S. I couldn't work out where this should go, I didn't think it fitted into any of the forums.

- Forum
- LittleBigPlanet 1 - PSP - Tearaway -Run Sackboy Run
- LittleBigPlanet 1
- [LBP1] Everything Else LittleBigPlanet 1 [Archive]
- AND gate design challenge
Results 1 to 20 of 48
Thread: AND gate design challenge
-
04-16-2009 #1fun and frivolous
- PSN
- rtm223
- Join Date
- Mar 2009
- Location
- Malmö, Sweden
- Posts
- 8,677
- Blog Entries
- 12
AND gate design challenge
Last edited by rtm223; 10-25-2009 at 03:57 PM.
-
-
04-16-2009 #2
I like the last challenge.
Maybe try and get someone to "sponsor" you for the n-input no parts (ie to donate XP) and put it in contests.
-
04-16-2009 #3
Quite a nice idea, rtm!
-
04-16-2009 #4
Just a permanent switch with lots of dissolve blocks?
Or are you looking for a reversable one?
Could you possibly explain how the diagram works?
-
04-16-2009 #5fun and frivolous
- PSN
- rtm223
- Join Date
- Mar 2009
- Location
- Malmö, Sweden
- Posts
- 8,677
- Blog Entries
- 12
Probably for most levels a disolve based one would work, but the design I have in mind is fully reversible.
How the diagram works:
[SPOILER]
Green mag key is inverted so if the moving bar is pulled in, output is false; bar pushed out, output is true.
The weak piston is always pushing out (it's switch is inverted direction).
If all of the chains are set to out, then none of them affect the moving bar and the piston pushes it away.
Otherwise, the chain(s) that are set to "in" will pull in the bar setting output false. A single chain is enough because it's stronger than the piston.
You could always replace the piston with gravity, but I prefer having the movement a bit more controlled.
[/SPOILER]
-
04-16-2009 #6
Hm, the only way i could think of to make an AND-switch with no moveable parts would be to bend something. But bending materials is something i don't want my logics to be depending on. :/

I organize all my LBP ideas in a Google Docs folder. Feel free to have a look. I'd love to have some feedback too! http://tiny.cc/lbpvandoc
-
04-16-2009 #7
Emitters aren't moving parts, are they?
-
04-16-2009 #8fun and frivolous
- PSN
- rtm223
- Join Date
- Mar 2009
- Location
- Malmö, Sweden
- Posts
- 8,677
- Blog Entries
- 12
Nope, but what they emmit may or may not be...
-
04-16-2009 #9
Well I'm thinking emitters then, that place keys. When the input is activated, the emitter gets turned off, meaning the key, which has a lifetime of 0.1 seconds, is destroyed (until the input is released, of course). Then, when all blocks are gone, an inverted key detects this and activates. n-input, non-moving and gate!
EDIT: This method could be used to make almost any type! Just change the different emitters to inverted or not to get it right, or the magnetic switch to normal.
Eg, n-input or, have the switch as normal, then the emitters as normally off. As soon as one input is made, the switch is active, et voilá, n-input or!
-
04-16-2009 #10fun and frivolous
- PSN
- rtm223
- Join Date
- Mar 2009
- Location
- Malmö, Sweden
- Posts
- 8,677
- Blog Entries
- 12
You forgot to mention the keys are on dark matter, but yeah. I'm actually using this as an OR gate at the moment, I like the fact you can change the lifetimes and swap between on and one-shot for various timing effects bult into the gate.
Problem with both of these solutions is you can't invert individual inputs inside the gate, you have to do it at the switch. I don't understand why winches don't have a backwards mode. Actually... just checked, looks like thats new in yarg as well
PS, turning OR gates into AND gates and vice versa like this is De Morgan's theorem.
-
04-16-2009 #11
Well isn't there something about any gate can be made with a combination of nands?
-
04-16-2009 #12
i would like to know how the hell u lot figure this stuff out...
-
04-16-2009 #13
2 hours of Logic Gate DT lessons that got us up to XORs and a lot of forehead-rubbing.
I enjoy making ones that are slightly physics-based. :P I basically accidentally taught myself logic gates before I was taught them in DT, thanks to LBP.
-
04-16-2009 #14fun and frivolous
- PSN
- rtm223
- Join Date
- Mar 2009
- Location
- Malmö, Sweden
- Posts
- 8,677
- Blog Entries
- 12
Good old-fashioned forehead rubbing - brilliant! The elements of digital logic are soo simple, once you get your head round it. dawesbr just worked out a REALLY important piece of electronics theory from first principles and that's the beauty of it.
I believe there were some early computers where the logic was entirely 3-input NAND gates, probably for cost reasons, but doing that in LBP wouldn't pay off. I do have a plan for something far more useful for LBP, but need to test it first.
Also, now you mention XOR gates, I don't have a good solution beyone 2 inputs
-
04-17-2009 #15
Is this more thermo efficient than nesting piston ANDs?
Also, can you put the chains to 0.1 sec timings without it breaking?
-
04-17-2009 #16
Who here still does/did electronics? I'm currently studying electrionics (Year 10) just finished 555's and are doing a lot of gates at the moment. It great, because as I learn more about gates in electrionics, I can apply my knowledge to LBP and replicate the idea.
-
04-17-2009 #17fun and frivolous
- PSN
- rtm223
- Join Date
- Mar 2009
- Location
- Malmö, Sweden
- Posts
- 8,677
- Blog Entries
- 12
I guess so (less edges, less objects, less movement etc) though that depends how the lbp engine handles multiple connectors on the same object. Would need some experimentation to know for sure.
The no moving parts one definately can. I'm pretty sure the one in the OP can too. As I was drifting off to bed I thought up an idea for a single gate that could OR a whole bunch of ANDs, something like:Also, can you put the chains to 0.1 sec timings without it breaking?
(abc' + a'b + acd), or if you prefer:
(a AND b AND NOT c) OR (NOT a AND b) OR (a AND c AND d)
And make the whole thing switch in 0.1s. Which would be nice.
trickster - I did four years of it at university. TBH, not much outside of the first year is directly applicable to LBP
-
04-17-2009 #18
I'd be very surprised if the piston+multichain AND gate is not much more thermo-friendly than the traditional stacked pistons.
The former only requires simple addition of the forces exerted by the winches and the piston. The latter requires additional collision detection, constraint resolution and movement calculations for every moving object in the piston stack. That's far more complicated to solve, and will thus require a lot more computational resources.
Now I only have to confirm it actually works as an AND gate, too ... :)Last edited by tameturtle; 04-17-2009 at 10:29 AM.
-
04-17-2009 #19fun and frivolous
- PSN
- rtm223
- Join Date
- Mar 2009
- Location
- Malmö, Sweden
- Posts
- 8,677
- Blog Entries
- 12
That was my assumption during design and the theory of it is sound...
Oh, ye of little faith! I've lost the original apparently, but unless there are any typos on the settings to use, it's a pretty sound AND. And as dawesbr sort of pointed out, with chains set to backwards and the mag key uninverted, you get an OR gate.
PLUS a bonus feature I just thought of - if you make one with lots of inputs, during develeopment any unused input chains can be hooked up to the grab switch (permenantly on) and you can swap these for "proper" inputs as and when you need them. Once you are done, cut the darm matter and moving part down to size and unused inputs disappear
-- ? --
-
04-17-2009 #20
Yeah, this seems to be the most efficient multiple OR/AND gate I've seen in this game. If this is low thermo then that is quite exciting. The biggest thermo drain on normal piston OR/AND gates is the piston timing. As you make a piston timing shorter, you can actually see the thermo increasing below a certain time. It's actually fairly significant at 0.1 seconds. However, this might not be caused by the piston, but rather the predicted movement of the object the piston is attached to. If this is the case it is possible that this gate uses less thermo. However, it is also possible, that having multiple pistons and chains on one object makes it more complex for the engine and therefore increases the thermo. The only way to know for sure is to experiment. One can make a large number of both types and see how many they can copy before the thermo is filled.
«
Previous Thread
|
Next Thread
»
All times are GMT. The time now is 06:12 PM.
Powered by vBulletin® Version 4.2.2
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
Extra Tabs by vBulletin Hispano
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
Image resizer by SevenSkins
Extra Tabs by vBulletin Hispano




