BG1, PRELOAD BG2, PRELOAD

Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 48
  1. #1
    fun and frivolous rtm223's Avatar
    Points: 64,735, Level: 78
    Level completed: 93%, Points required for next Level: 115
    Overall activity: 0%
    Your First Group 10000 Experience Points 5000 Experience Points 1000 Experience Points 500 Experience Points
    PSN
    rtm223
    Join Date
    Mar 2009
    Location
    Malmö, Sweden
    Posts
    8,677
    Blog Entries
    12

    Default AND gate design challenge

    This is from a different thread and it seemed to cause some head scratching amongst a couple of members:

    Quote Originally Posted by rtm223 View Post
    I don't like that "pistons in series" method of AND gating, you can make a 16 input (poss more) AND gate with only one moving part.
    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:
    1. a rectangle of dark matter,
    2. a rectangle of some other material,
    3. 1 mag switch,
    4. 1 mag key,
    5. 1 other switch,
    6. a number of connectors.
    [/SPOILER]

    Here is a solution:
    [SPOILER](4 inputs shown, but should work with any number)

    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.
    Set your inputs to directional and connect them to the chains. gS is your output.[/SPOILER]


    And here is a better solution (edited in waaaaay after the thread died):
    [SPOILER](4 inputs shown, but will work with any number)

    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)
    Set your inputs to directional and connect them to the chains and the piston. gS is your output.[/SPOILER]



    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.
    Last edited by rtm223; 10-25-2009 at 03:57 PM.


  2. #2

  3. #3

    Default

    Quite a nice idea, rtm!

  4. #4

    Default

    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?

  5. #5
    fun and frivolous rtm223's Avatar
    Points: 64,735, Level: 78
    Level completed: 93%, Points required for next Level: 115
    Overall activity: 0%
    Your First Group 10000 Experience Points 5000 Experience Points 1000 Experience Points 500 Experience Points
    PSN
    rtm223
    Join Date
    Mar 2009
    Location
    Malmö, Sweden
    Posts
    8,677
    Blog Entries
    12

    Default

    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]

  6. #6

    Default

    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

  7. #7

  8. #8
    fun and frivolous rtm223's Avatar
    Points: 64,735, Level: 78
    Level completed: 93%, Points required for next Level: 115
    Overall activity: 0%
    Your First Group 10000 Experience Points 5000 Experience Points 1000 Experience Points 500 Experience Points
    PSN
    rtm223
    Join Date
    Mar 2009
    Location
    Malmö, Sweden
    Posts
    8,677
    Blog Entries
    12

    Default

    Nope, but what they emmit may or may not be...

  9. #9

    Default

    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!

  10. #10
    fun and frivolous rtm223's Avatar
    Points: 64,735, Level: 78
    Level completed: 93%, Points required for next Level: 115
    Overall activity: 0%
    Your First Group 10000 Experience Points 5000 Experience Points 1000 Experience Points 500 Experience Points
    PSN
    rtm223
    Join Date
    Mar 2009
    Location
    Malmö, Sweden
    Posts
    8,677
    Blog Entries
    12

    Default

    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.

  11. #11

  12. #12

    Default

    i would like to know how the hell u lot figure this stuff out...

  13. #13

    Default

    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.

  14. #14
    fun and frivolous rtm223's Avatar
    Points: 64,735, Level: 78
    Level completed: 93%, Points required for next Level: 115
    Overall activity: 0%
    Your First Group 10000 Experience Points 5000 Experience Points 1000 Experience Points 500 Experience Points
    PSN
    rtm223
    Join Date
    Mar 2009
    Location
    Malmö, Sweden
    Posts
    8,677
    Blog Entries
    12

    Default

    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

  15. #15

    Default

    Is this more thermo efficient than nesting piston ANDs?

    Also, can you put the chains to 0.1 sec timings without it breaking?

  16. #16

    Default

    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.
    Co-Leader of Sackcast.
    ----> Click to watch Sackpad trailer! <----


  17. #17
    fun and frivolous rtm223's Avatar
    Points: 64,735, Level: 78
    Level completed: 93%, Points required for next Level: 115
    Overall activity: 0%
    Your First Group 10000 Experience Points 5000 Experience Points 1000 Experience Points 500 Experience Points
    PSN
    rtm223
    Join Date
    Mar 2009
    Location
    Malmö, Sweden
    Posts
    8,677
    Blog Entries
    12

    Default

    Quote Originally Posted by dcf View Post
    Is this more thermo efficient than nesting piston ANDs?
    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.

    Also, can you put the chains to 0.1 sec timings without it breaking?
    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:

    (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

  18. #18

    Default

    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.

  19. #19
    fun and frivolous rtm223's Avatar
    Points: 64,735, Level: 78
    Level completed: 93%, Points required for next Level: 115
    Overall activity: 0%
    Your First Group 10000 Experience Points 5000 Experience Points 1000 Experience Points 500 Experience Points
    PSN
    rtm223
    Join Date
    Mar 2009
    Location
    Malmö, Sweden
    Posts
    8,677
    Blog Entries
    12

    Default

    Quote Originally Posted by tameturtle View Post
    I'd be very surprised if the piston+multichain AND gate is not much more thermo-friendly than the traditional stacked pistons.
    ...
    That's far more complicated to solve, and will thus require a lot more computational resources.
    That was my assumption during design and the theory of it is sound...

    Quote Originally Posted by tameturtle View Post
    Now I only have to confirm it actually works as an AND gate, too ...
    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
    -- ? --

  20. #20

    Default

    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.

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •