The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2014-02-23 19:20:02

Sybernetik
Member
Registered: 2014-02-08
Posts: 36

How does this happen?

No clock, how do the electric floors come on when using a wire cutter?
cd_how.jpg

Offline

#2 2014-02-23 19:27:25

TheSquashedOrange
Member
Registered: 2014-02-23
Posts: 16

Re: How does this happen?

Ah, the wonders of paradox circuits. Someone more familiar with electronics can give the full picture, but in short paradox circuits form a loop that causes all the electronics in that loop to turn on if the any part of the loop is severed, say by a pair of wire cutters chopping up an electric floor. The wiki also has a section on them and other advanced electronics: http://thecastledoctrine.gamepedia.com/ … ox_Circuit.

I lost a great house to one of these bloody things, electric floors are so unpredictable...

Offline

#3 2014-02-23 19:35:58

Sybernetik
Member
Registered: 2014-02-08
Posts: 36

Re: How does this happen?

I thought that garbage was patched. Guess not... Boy do I feel cheated.

Offline

#4 2014-02-23 19:37:16

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: How does this happen?

Ah, one of my favorite traps big_smile  Here's 2 versions that'll do that:

http://castledraft.com/editor/v9o7xb

Before anything is cut, the power flows through the grates and cuts off the power.  This creates a "paradox"/loop, which the game resolves by turning everything in it off.  As soon as you cut a grid, though, no power is reaching the switch, so the grids turn on.

To recognize the (most basic) form of this trap, look for a few wired wooden walls at the entrance of a grid hallway.  This trap can't be done if the wired wooden walls extend the whole way down the electric grid hallway (although they might extend just one screen down it)


Fortress Theory Mod - New objects, tools, and paintings!

I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.

Offline

#5 2014-02-23 21:47:33

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: How does this happen?

Sybernetik wrote:

I thought that garbage was patched. Guess not... Boy do I feel cheated.


This one isn't a bug - its just the natural result of the sophisticated electronics system and the ability to send signals across unpowered wires. This kind of thing has been a part of the game for a while now. Dying to this kind of trap is just another learning experience - I'm sure you will think twice before making the same mistake. To remove this kind of thing you'd have to really dumb down the electronics.

Offline

#6 2014-02-23 23:33:57

JoyOfTrapping
Member
Registered: 2014-02-08
Posts: 158

Re: How does this happen?

iceman wrote:

Ah, one of my favorite traps big_smile  Here's 2 versions that'll do that:

http://castledraft.com/editor/v9o7xb

Iceman, I have a question about this.  I'm not an electronics whiz yet but I'm at an intermediate level.  I think I basically understand cycles and settling.  I have gone through the sequences on other circuits and seen how they settle.  These have mostly made sense to me.  The paradox circuit though, I do not understand.

Here is my question, if I can try and articulate it correctly.  Does it not happen like this:

Cycle 1: Power flows from the power supply, through the switch, to the elec. floors, up through the wire, and stops at the top of the switch.  (ON)
Cycle 2: The switch is now tripped; circuit broken.  Power attempts to leave the power supply and is impeded at the switch.  Power does not reach floors, or top of switch.  (OFF)
Cycle 3: No power to top of switch last turn, so now switch is back to normal.  Power flows from power supply, through switch, to elec. floors, up wire, stops at top of switch like cycle 1.  (ON)

*** Is this not the point at which the electronics settle?  Doesn't it work such that if a state is repeated, the circuit settles in that state?  If so, we have a case of ON, a case of OFF, and then a case of ON.  This would mean that ON was the repeated state, not OFF.  Why then, does the circuit settle in the OFF position?  Please help me understand.

Or is there a "Cycle 0" I am not including in which there is no power in anything, thereby making OFF the repeated state?


YT: www.youtube.com/user/JoyOfTrapping - The Bushido Code of Castle Doctrine:
Death  --> Observation --> Knowledge --> Power  --> Application --> Testing --> Skill
Seriousness --> Caution --> Deliberation --> Clearer Thinking --> More Success --> Less Frustration
Lack of Attachment to Results --> Lighthearted Play --> Respect for Enemies --> No Anger After Failures --> Faster Skill Building

Offline

#7 2014-02-24 03:37:15

Deuteros
Member
Registered: 2014-02-24
Posts: 2

Re: How does this happen?

You tried to rob my house, I feel famous now. Your name was Oliver William Allen, you were worth a 8600 bounty, plus all the tools you brought in. You spent quite a while scouting, I think checking if there was a clock, and then you came in with all your tools and died right at the entrance. Hope your house wasn't too valuable, but I guess it probably was.

This game does make you feel guilty when people die, I've robbed 3 people with mostly concrete houses worth $25k and then afterwards one of them came in my house and hung themselves sad

Offline

#8 2014-02-24 04:54:17

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: How does this happen?

JoyOfTrapping wrote:
iceman wrote:

Ah, one of my favorite traps big_smile  Here's 2 versions that'll do that:

http://castledraft.com/editor/v9o7xb

Iceman, I have a question about this.  I'm not an electronics whiz yet but I'm at an intermediate level.  I think I basically understand cycles and settling.  I have gone through the sequences on other circuits and seen how they settle.  These have mostly made sense to me.  The paradox circuit though, I do not understand.

Here is my question, if I can try and articulate it correctly.  Does it not happen like this:

Cycle 1: Power flows from the power supply, through the switch, to the elec. floors, up through the wire, and stops at the top of the switch.  (ON)
Cycle 2: The switch is now tripped; circuit broken.  Power attempts to leave the power supply and is impeded at the switch.  Power does not reach floors, or top of switch.  (OFF)
Cycle 3: No power to top of switch last turn, so now switch is back to normal.  Power flows from power supply, through switch, to elec. floors, up wire, stops at top of switch like cycle 1.  (ON)

*** Is this not the point at which the electronics settle?  Doesn't it work such that if a state is repeated, the circuit settles in that state?  If so, we have a case of ON, a case of OFF, and then a case of ON.  This would mean that ON was the repeated state, not OFF.  Why then, does the circuit settle in the OFF position?  Please help me understand.

Or is there a "Cycle 0" I am not including in which there is no power in anything, thereby making OFF the repeated state?

When the system detects a loop that does not settle into a single state, like the paradox circuit which switches between on and off, the settled state is not taken from the last one computed but is rather the "lowest" state achieved during that loop. In these cases the lowest state always happens to be the unpowered state and so the circuit remains unpowered. An easy way to remember it is simply that unsettled electronics - those caught in a repeating loop that varies between "on" and "off" - always default to an off state.

Offline

#9 2014-02-24 12:17:48

JoyOfTrapping
Member
Registered: 2014-02-08
Posts: 158

Re: How does this happen?

joshwithguitar wrote:

When the system detects a loop that does not settle into a single state, like the paradox circuit which switches between on and off, the settled state is not taken from the last one computed but is rather the "lowest" state achieved during that loop. In these cases the lowest state always happens to be the unpowered state and so the circuit remains unpowered. An easy way to remember it is simply that unsettled electronics - those caught in a repeating loop that varies between "on" and "off" - always default to an off state.

Thank you, Josh.  I think I understand.  I do have some questions, which may just reflect gaps in my current knowledge:

1)  So, is my described order of cycles correct so far?  Cycle 1: ON.  Cycle 2: OFF.  Cycle 3: ON?

2)  So "repeating" a state, and "looping," are actually two different things?  In the examples here http://castledraft.com/editor/2sP62y (those that are not infinite loops) the states settle because they literally settle- a specific state repeats itself and thereby the circuit is resolved into that state.  However, resolution through "looping," like in the paradox circuit, is a different process entirely.  What I had thought was, "The first state which is repeated will be the state into which the electronics settle."  This is not true.  In reality, actual permanent loops are resolved in the manner you describe above.

3)  Is there a firm definition for "lowest" state?  What does this mean?  Unpowered?

4)  In your Tiny Signal Generator, the heart of the 8 bit clock, I understand it to work this way:  Cycle 1: Sends ON.  Cycle 2: Sends OFF.  Cycle 3: Sends OFF.  Thereby settles to OFF.  This is the manner in which it sends one single pulse per game turn.  The paradox circuit however, loops, and runs for far more cycles than 3.  Therefore, how many single pulses does the paradox circuit send per turn?

Nice to meet you Josh, I've appreciated your posts.

Last edited by JoyOfTrapping (2014-02-24 12:22:42)


YT: www.youtube.com/user/JoyOfTrapping - The Bushido Code of Castle Doctrine:
Death  --> Observation --> Knowledge --> Power  --> Application --> Testing --> Skill
Seriousness --> Caution --> Deliberation --> Clearer Thinking --> More Success --> Less Frustration
Lack of Attachment to Results --> Lighthearted Play --> Respect for Enemies --> No Anger After Failures --> Faster Skill Building

Offline

#10 2014-02-24 12:38:47

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: How does this happen?

JoyOfTrapping wrote:
joshwithguitar wrote:

When the system detects a loop that does not settle into a single state, like the paradox circuit which switches between on and off, the settled state is not taken from the last one computed but is rather the "lowest" state achieved during that loop. In these cases the lowest state always happens to be the unpowered state and so the circuit remains unpowered. An easy way to remember it is simply that unsettled electronics - those caught in a repeating loop that varies between "on" and "off" - always default to an off state.

Thank you, Josh.  I think I understand.  I do have some questions, which may just reflect gaps in my current knowledge:

1)  So, is my described order of cycles correct so far?  Cycle 1: ON.  Cycle 2: OFF.  Cycle 3: ON?

2)  So "repeating" a state, and "looping," are actually two different things?  In the examples here http://castledraft.com/editor/2sP62y (those that are not infinite loops) the states settle because they literally settle- a specific state repeats itself and thereby the circuit is resolved into that state.  However, resolution through "looping," like in the paradox circuit, is a different process entirely.  What I had thought was, "The first state which is repeated will be the state into which the electronics settle."  This is not true.  In reality, actual permanent loops are resolved in the manner you describe above.

3)  Is there a firm definition for "lowest" state?  What does this mean?  Unpowered?

4)  In your Tiny Signal Generator, the heart of the 8 bit clock, I understand it to work this way:  Cycle 1: Sends ON.  Cycle 2: Sends OFF.  Cycle 3: Sends OFF.  Thereby settles to OFF.  This is the manner in which it sends one single pulse per game turn.  The paradox circuit however, loops, and runs for far more cycles than 3.  Therefore, how many single pulses does the paradox circuit send per turn?

Nice to meet you Josh, I've appreciated your posts.

1. So far, yes. As soon it reaches the repeated state it all settles into the unpowered state.

If the state of the map repeats exactly, then it will continue to loop since there is no random element to wiring; if you start in the same state then you will get the same outcome, which as the game has seen is this state.

The game looks for the lowest seen state in the detected loop (by running through the loop again). Unpowered states are always "lower" in all current objects, you can see which states have lower numbers by looking through your houseObjects folder (it's the number of the folder containing the state); it's always its unpowered state. Also note that, although a broken unpowered state may have a higher number than a powered unbroken state, you can never get something's broken state and it's unbroken state in the same loop.

I'm not sure if the code specifically looks for two repeated states in a row and decides to leave it alone, but you can always imagine the same thing happening and it works: If there is a repeated state it looks in that loop and picks out the lowest state, as the "loop" is staying the same the lowest seen state will still be the on state.

Last edited by colorfusion (2014-02-25 09:57:46)

Offline

#11 2014-02-24 18:25:40

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: How does this happen?

Well, technically the way things are resolved is a bit more complicated. Each cycle the the program checks to see if the state of the entire house is identical to a previous state (by comparing hashes). Now it runs through the entire loop again from the repeated state and sets each powered object to the lowest seen state, so if something has settled to "on" it will remain on but if at any time during the final loop it is "off" it will remain off. So, technically there is no difference between how "settled states" and "looping states" are resolved but because of the way it works any unsettled state will always be off, while those that settle to always being on will always be on during the final loop and so their lowest seen state will be "on". The final loop could simply be a settled state that repeats itself.

So, in answer to 4) a paradox circuit will continue to send pulses until the entire house repeats a state or reaches the upper limit of 32 cycles. It is easier to think of it as continuously sending a pulse every odd cycle.

JoyOfTrapping wrote:

Nice to meet you Josh, I've appreciated your posts.

Nice to meet you too, it's always good to see people interested in exploring electronics in the game.

Offline

#12 2014-02-24 20:28:31

Blip
Member
Registered: 2013-05-07
Posts: 505

Re: How does this happen?

I just wanted to add that I love this trap. It gets even better when you put it in the very corner of your house, so that, once you step there, there's no way out unless you did something else previously.


Current life: Not dead, but I have no clue who I am
The Life and Times of Christopher Alvin Harris
Record: 149 Paintings!

Offline

#13 2014-02-24 23:18:08

JoyOfTrapping
Member
Registered: 2014-02-08
Posts: 158

Re: How does this happen?

I have a ways to go, but I believe I've understood the concepts here.  Thanks Colorfusion and Josh for the replies.


YT: www.youtube.com/user/JoyOfTrapping - The Bushido Code of Castle Doctrine:
Death  --> Observation --> Knowledge --> Power  --> Application --> Testing --> Skill
Seriousness --> Caution --> Deliberation --> Clearer Thinking --> More Success --> Less Frustration
Lack of Attachment to Results --> Lighthearted Play --> Respect for Enemies --> No Anger After Failures --> Faster Skill Building

Offline

#14 2014-02-25 21:39:58

Sybernetik
Member
Registered: 2014-02-08
Posts: 36

Re: How does this happen?

Not a fan personally. I believe if you have the correct tool you should be able to escape, if you over commit and don't have the tool necessary then you should die. I should be able to rely on a wire cutter doing what it is supposed to do with out it insta-killing me. Takes some of the fun out of robbing when I can't ever step on an electric grill unless it is cut first. I believe this detracts from the tactical aspect of the game and just makes it random. There is enough random guessing on pathing without having to guess if your tool is actually going to work. What's next, a ladder that breaks when you step on it?

Offline

#15 2014-02-25 21:55:38

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: How does this happen?

Sybernetik wrote:

Not a fan personally. I believe if you have the correct tool you should be able to escape, if you over commit and don't have the tool necessary then you should die. I should be able to rely on a wire cutter doing what it is supposed to do with out it insta-killing me. Takes some of the fun out of robbing when I can't ever step on an electric grill unless it is cut first. I believe this detracts from the tactical aspect of the game and just makes it random. There is enough random guessing on pathing without having to guess if your tool is actually going to work. What's next, a ladder that breaks when you step on it?

If you know what you are doing it is not random at all. In most situations you can safely walk along electric grills with wire-cutters or some way to bash into the walls. The exception is when the wired floors potentially form a loop. In this case you will want to cut part of the loop while not standing on electric floors that make it up to check whether it will fire up. This seems very tactical to me, the house owner can try to make it as difficult for the robber as possible to safely cut the loop and the robber can try to find the best and safest place to cut.

There are already lots of situations where dog food and clubs will not save you if you make the wrong move and a dog sees you. Sure, with enough guns you can back your way out of anything, but who brings that many guns? The best thing to do here is to ensure that dogs don't end up behind you by checking down each path before committing to one - often having to use dogfood to pre-emtively ensure safety. How is this situation different from paradox-wire floor traps?

Offline

#16 2014-02-26 09:43:51

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: How does this happen?

Sybernetik wrote:

Not a fan personally. I believe if you have the correct tool you should be able to escape, if you over commit and don't have the tool necessary then you should die. I should be able to rely on a wire cutter doing what it is supposed to do with out it insta-killing me. Takes some of the fun out of robbing when I can't ever step on an electric grill unless it is cut first. I believe this detracts from the tactical aspect of the game and just makes it random. There is enough random guessing on pathing without having to guess if your tool is actually going to work. What's next, a ladder that breaks when you step on it?

If you step onto an unsafe tile then there is never any guarantee of safety, and it's been like that since before clocks were even invented. If you want to be completely safe, then you need to disable the tile first.

Last edited by colorfusion (2014-02-26 09:44:15)

Offline

#17 2014-02-26 09:52:35

BoxDrunken
Member
Registered: 2014-02-14
Posts: 41

Re: How does this happen?

Deuteros wrote:

I've robbed 3 people with mostly concrete houses worth $25k and then afterwards one of them came in my house and hung themselves sad


That is funny....

Offline

Board footer

Powered by FluxBB 1.5.8