Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Dwarven Calculator (very basic, homemade computing)  (Read 4173 times)

Trif

  • Bay Watcher
  • the Not-Quite-So-Great-as-Toady One
    • View Profile
Re: Dwarven Calculator (very basic, homemade computing)
« Reply #15 on: April 05, 2012, 01:09:27 pm »

Well, as far as I understand it, it's basically a number recognition device now. One pit full of water equals 1, two pits equal 2 etc.
But it can be used for adding if you take the fluid amounts for one number and the amounts for another number and let them both flow down the staircase. It's only limited by the length of the staircase.

I have to agree, an interesting design. Unconventional and complicated, but interesting.
Logged
Quote from: Toady One
I wonder if the game has become odd.

Talvieno

  • Bay Watcher
  • Hello, Death. How's life?
    • View Profile
Re: Dwarven Calculator (very basic, homemade computing)
« Reply #16 on: April 05, 2012, 01:58:25 pm »

Very, very dwarfy idea... Welcome to the forums, my good sir - you've definitely made quite the entrance for yourself. As Loud Whispers already said of himself, you have my respect.

Trif has a good point, though... this is big enough to be an official megaproject, if someone was to undertake building it. As to recognizing numbers, it wouldn't be too hard to designate numerals to be mined that no dwarf could reach (i.e. within black, "unknown" rock), once per level - unless I'm misunderstanding this whole thing.
Logged
Quote from: Mr Frog
Talvieno ... seems to be able to smash out novella-length tales on demand

Trif

  • Bay Watcher
  • the Not-Quite-So-Great-as-Toady One
    • View Profile
Re: Dwarven Calculator (very basic, homemade computing)
« Reply #17 on: April 05, 2012, 02:18:57 pm »

At first glance, it's limited by the z-levels, but the device is expandable by setting up a pumpstack at the lowest possible level and pumping the water back up to the top. Then, one could build a second staircase for longer additions.
Logged
Quote from: Toady One
I wonder if the game has become odd.

nzybwnb

  • Bay Watcher
    • View Profile
Re: Dwarven Calculator (very basic, homemade computing)
« Reply #18 on: April 05, 2012, 02:26:59 pm »

Spoiler: Trif's math (click to show/hide)

Neat. Your method is certainly much neater and cleaner. Like I said, I don't really know math, so I had to kind of cobble mine together from the little bit I've got. Sequences seem like a cleaner way of doing it, and your method in general is much more elegant.

I did run the number 157 again, and I got 202 (I forgot to subtract 1 at the end last time), so I'm happy that at least my code works. And like you say, it is quite impractical- but hey, it's far more practical than my first design, which was just an infinite staircase with a 1/7 detecting pressure pad every 7 stairs.
« Last Edit: April 05, 2012, 02:30:11 pm by nzybwnb »
Logged

Anathema

  • Bay Watcher
    • View Profile
Re: Dwarven Calculator (very basic, homemade computing)
« Reply #19 on: April 05, 2012, 02:39:40 pm »

If I understand correctly you're just taking a certain amount of water and 'counting' how much of it you have, to add two numbers, just toss the amount of water corresponding to each into your device and see what it totals to? Just a semantic peeve, but this isn't really a "calculator" - I think you're making an "adder".

Note you don't actually need, say, 87 steps to count up to 87, you could do it with 20. You make two stairways of 10 steps each; when the first stairway fills to 10, the last pressure plate triggers several things: cut off the source of water, open some release floodgates/pumps/whatever that empty the 10 steps, release enough water into your second stairway to fill exactly one step (that last part is nontrivial but possible). When the last pressure plate is empty, it closes off the release and opens the source, so you can count the next 10. Each step filled on the second stairway corresponds to 10 of the first stairway - so 8 steps filled on stairway 2 + 7 steps filled on stairway 1 = 87. With this method you can count to any number x with 10*log10(x) steps, organized into log10(x) stairways of 10 steps each. More importantly for practical engineering purposes, it makes the whole design more compact, these little 10-step stairways can be anywhere - side-by-side, for example - rather than needing to string them together in one huge stairway.
« Last Edit: April 05, 2012, 02:49:49 pm by Anathema »
Logged
The good news is that ghosts die of old age.

Maynot

  • Bay Watcher
    • View Profile
Re: Dwarven Calculator (very basic, homemade computing)
« Reply #20 on: April 05, 2012, 02:45:19 pm »

My first attempt at a dwarf shower was running water down a bunch of stairs.  Unfortunately it did not work out like this calculator idea and it completely flooded the caves.  On top of that, my dwarves had trouble climbing back up the stairs.
Logged
I play games of games inside games in my head.

Trif

  • Bay Watcher
  • the Not-Quite-So-Great-as-Toady One
    • View Profile
Re: Dwarven Calculator (very basic, homemade computing)
« Reply #21 on: April 06, 2012, 06:09:29 am »

Note you don't actually need, say, 87 steps to count up to 87, you could do it with 20. You make two stairways of 10 steps each; when the first stairway fills to 10, the last pressure plate triggers several things: cut off the source of water, open some release floodgates/pumps/whatever that empty the 10 steps, release enough water into your second stairway to fill exactly one step (that last part is nontrivial but possible). When the last pressure plate is empty, it closes off the release and opens the source, so you can count the next 10. Each step filled on the second stairway corresponds to 10 of the first stairway - so 8 steps filled on stairway 2 + 7 steps filled on stairway 1 = 87. With this method you can count to any number x with 10*log10(x) steps, organized into log10(x) stairways of 10 steps each.
Very nice. That should make it easier to combine the adder with some sort of decimal representation.

I thought about the whole machine a bit more, and it occurred to me that there is a major flaw with all the 1/7 bits of water lying around: evaporation. Especially when adding large numbers, there will be discrepancies when the 1/7 on the doors and on top of the water pits vanish because they will be filled again when the new number passes over them, leading to water loss. Four levels without the 1/7 are enough to distort the result by one.

One strategy would be to wait until all the 1/7 are gone and just add 2/7 water to the next addend per used up level, like this:
x + y < z  [because parts of y get lost on the staircase]
x + (y + 2/7*x) = z  [2/7*x is needed to overcome the evaporation]
Storing 2/7 for every 9/7 units of water that passed through the beginning of the staircase is possible, but very complicated.

It's probably the best to use pressure plates that are activated by 1/7 water to have a small buffer. It should work fine for small numbers, but unfortunately there are limitations to the process.
Logged
Quote from: Toady One
I wonder if the game has become odd.
Pages: 1 [2]