Bay 12 Games Forum

Please login or register.

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

Author Topic: Base 7 DF computer  (Read 2764 times)

Derekristow

  • Bay Watcher
    • View Profile
    • Steam ID
Base 7 DF computer
« on: September 09, 2010, 06:57:09 am »

I've recently started taking a course at Digipen, and my teacher said the main reason for binary is that computers are bad at measuring ranges of values, so we ended up designing them around just on and off for simplicity's sake.  In the early 1900's some experimentation was done with decimal computing on mechanical computers, but the machines quickly spiraled in complexity.  Dwarf Fortress, however, avoids the difficulty with measuring thanks to the pressure plates ability to measure different levels of water [citation needed]. 

My question is, would it be possible to build a computer in Dwarf Fortress that is not base 2, what would the applications be, and what new unheard of logic gates and such would be needed to do this? I'm still learning and this is literally day 4 of the class, but learning binary and hexadecimal got me thinking.

(I'm not certain pressure plates can actually measure more than 'water' and 'no water', so th whole thing may be moot.  Also, I stopped at base 7 because of 1/7's liability to evaporate.)
Logged
So my crundles are staying intact unless they're newly spawned... until they are exposed to anything that isn't at room temperature.  This mostly seems to mean blood, specifically, their own.  Then they go poof very quickly.

nekoexmachina

  • Bay Watcher
    • View Profile
Re: Base 7 DF computer
« Reply #1 on: September 09, 2010, 07:08:35 am »

Quote
I stopped at base 7 because of 1/7's liability to evaporate.)
If a good thing is to be done, do it with magma. Magma does not evaporate, base 8 so.
Logged
Whenever i read the "doesn't care about anything anymore" line, i instantly imagine a dwarf, sitting alone on a swing set. Just slowly rocking back and forth, somberly staring at the ground, and stopping every once in a while to sigh.
It's mildly depressing.

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: Base 7 DF computer
« Reply #2 on: September 09, 2010, 07:08:53 am »

While having 7 states to work with would be interesting, you have to take noise into consideration. Same applies to real-world stuff.

Lord Snow

  • Bay Watcher
    • View Profile
Re: Base 7 DF computer
« Reply #3 on: September 09, 2010, 07:16:38 am »

wouldn't it be base 8? value range 0-7.
Logged

Halykan

  • Bay Watcher
    • View Profile
Re: Base 7 DF computer
« Reply #4 on: September 09, 2010, 07:22:20 am »

While having 7 states to work with would be interesting, you have to take noise into consideration. Same applies to real-world stuff.

There's 8 states for a tile in terms of liquid, if you include 0/7. But since I don't know how you'd make that trigger anything, I think you're correct to say there's only 7 states available for computing.

Realistically though, noise is a pretty big problem with DF machinery. Also processing speed - particularly for complex computers it can take a while for it to do its business. If your pressure plates were trying to differentiate between 3/7 and 4/7, you'd get a lot of random signals coming from the fluid's motion.

Also, magma is a horrible idea for any sort of practical computer, since it's soooooooo slow.
Logged
If you don't remember whether the lever will collapse half the fortress, flood it with magma, flood it with water, flood it with water THEN magma, or kill the invaders, you pull it and hope you take the god damned goblins down with you
clicky

Osmosis Jones

  • Bay Watcher
  • Now with 100% more rotation!
    • View Profile
Re: Base 7 DF computer
« Reply #5 on: September 09, 2010, 07:34:34 am »

It's exactly the same speed as water. Only difference is it isn't pressurised by z-levels. Pumps yes, z's no.
Logged
The Marx generator will produce Engels-waves which should allow the inherently unstable isotope of Leninium to undergo a rapid Stalinisation in mere trockoseconds.

GuudeSpelur

  • Bay Watcher
    • View Profile
Re: Base 7 DF computer
« Reply #6 on: September 09, 2010, 09:02:07 am »

It's exactly the same speed as water. Only difference is it isn't pressurised by z-levels. Pumps yes, z's no.

No, it's much slower.  If you run it through a pump, then it speeds up (and gets pressurized).
Logged
This fortress is turning into some kind of supervillain lair or something.
You do remember that you've been farming gigantic wingless dragon-fish for profit and Fun, right?

Osmosis Jones

  • Bay Watcher
  • Now with 100% more rotation!
    • View Profile
Re: Base 7 DF computer
« Reply #7 on: September 09, 2010, 09:29:52 am »

It's exactly the same speed as water. Only difference is it isn't pressurised by z-levels. Pumps yes, z's no.

No, it's much slower.  If you run it through a pump, then it speeds up (and gets pressurized).

No, they are exactly the same. Go to the arena and test it yourself if you don't believe me. There is a segment with two parallel canyons two tiles wide that go north/south. Fill one with 1 z-level of magma, one with water, and watch the speed at which the liquids spread. Exactly the same.
Logged
The Marx generator will produce Engels-waves which should allow the inherently unstable isotope of Leninium to undergo a rapid Stalinisation in mere trockoseconds.

Normandy

  • Bay Watcher
    • View Profile
Re: Base 7 DF computer
« Reply #8 on: September 09, 2010, 09:35:54 am »

Lord Snow is correct. Water would naturally be base 8. Irrelevant whether or not it can trigger a pressure plate at any value. It only needs to trigger at 7/7.

Note that pressure plates are only on/off (i.e. binary). But you don't need pressure plates: adding a 6/7 stack of water to a 2/7 stack of water will result in 8 units of water across at least 2 tiles; if you use a clever system of floodgates, you can get this representation to 7/7 in the less significant tile and 1/7 in the more significant tile.
Logged

GuudeSpelur

  • Bay Watcher
    • View Profile
Re: Base 7 DF computer
« Reply #9 on: September 09, 2010, 11:08:00 am »


No, they are exactly the same. Go to the arena and test it yourself if you don't believe me. There is a segment with two parallel canyons two tiles wide that go north/south. Fill one with 1 z-level of magma, one with water, and watch the speed at which the liquids spread. Exactly the same.

Hm, it seems we are talking about two different things here.  I was talking about water from a brook or a river- i.e., water with natural flow.  This is the water one would use in a dwarf computer, since it's an unlimited source (either that or an unlimited cavern lake, which would have to be pumped and thus effectively become water with natural "flow").  The water you can place in arena mode is standing water, like the water in murky pools.  It has no "flow," and is slower than running water.  That is the kind of water that is the same speed as magma.
Logged
This fortress is turning into some kind of supervillain lair or something.
You do remember that you've been farming gigantic wingless dragon-fish for profit and Fun, right?

Khift

  • Bay Watcher
    • View Profile
Re: Base 7 DF computer
« Reply #10 on: September 09, 2010, 11:16:26 am »

Quote
I stopped at base 7 because of 1/7's liability to evaporate.)
If a good thing is to be done, do it with magma. Magma does not evaporate, base 8 so.
Magma does evaporate if left at 1/7 just like water.
Logged

Osmosis Jones

  • Bay Watcher
  • Now with 100% more rotation!
    • View Profile
Re: Base 7 DF computer
« Reply #11 on: September 09, 2010, 11:26:49 am »

Hm, it seems we are talking about two different things here.  I was talking about water from a brook or a river- i.e., water with natural flow.  This is the water one would use in a dwarf computer, since it's an unlimited source (either that or an unlimited cavern lake, which would have to be pumped and thus effectively become water with natural "flow").  The water you can place in arena mode is standing water, like the water in murky pools.  It has no "flow," and is slower than running water.  That is the kind of water that is the same speed as magma.

Again, "flowing" water moves at the exact same spead as regular water (and hence magma). The reason water from a brook appears to fill faster is because it is in effect pump pressurised to the level of the brook, by the map edge source tiles. Same with water caverns incidentally. The flow state has absolutely no effect on flow speed, and is merely a boolean toggle that defines whether or not a water wheel will function, and what tilda to display.
Logged
The Marx generator will produce Engels-waves which should allow the inherently unstable isotope of Leninium to undergo a rapid Stalinisation in mere trockoseconds.

GuudeSpelur

  • Bay Watcher
    • View Profile
Re: Base 7 DF computer
« Reply #12 on: September 09, 2010, 12:23:18 pm »

Again, "flowing" water moves at the exact same spead as regular water (and hence magma). The reason water from a brook appears to fill faster is because it is in effect pump pressurised to the level of the brook, by the map edge source tiles. Same with water caverns incidentally. The flow state has absolutely no effect on flow speed, and is merely a boolean toggle that defines whether or not a water wheel will function, and what tilda to display.

If this is true, then something has changed since 40d.  I spent a long time frustrated in a few forts in 40d because of how much slower magma went than water.
Logged
This fortress is turning into some kind of supervillain lair or something.
You do remember that you've been farming gigantic wingless dragon-fish for profit and Fun, right?

Quatch

  • Bay Watcher
  • [CURIOUSBEAST_ GRADSTUDENT]
    • View Profile
    • Twitch? Sometimes..
Re: Base 7 DF computer
« Reply #13 on: September 09, 2010, 02:33:20 pm »

Call the difference moot, any natural flow is too slow and unpredictable to use in DF mechanics, you need to overpressurise (eg pump into the square from multiple separate sources so pump timing is not a factor) it to ensure there will always be 7/7 liquid hitting your input.
Logged
SAVE THE PHILOSOPHER!
>>KillerClowns: It's faster to write "!!science!!" than any of the synonyms: "mad science", "dwarven science", or "crimes against the laws of god and man".
>>Orius: I plan my forts with some degree of paranoia.  It's kept me somewhat safe.

Syff

  • Bay Watcher
    • View Profile
Re: Base 7 DF computer
« Reply #14 on: September 09, 2010, 03:31:12 pm »

If this is true, then something has changed since 40d.  I spent a long time frustrated in a few forts in 40d because of how much slower magma went than water.

This test used 40d, and took place long before .31.x was released.  Two Experiments with a Major River, also under 40d, helps confirm the behavior of rivers themselves.  It seems more likely to me that you spent a long time frustrated at how slow fluids diffuse in general.


Back on topic.  The idea of computing with fluid levels pops up now and then, and I was trying to figure it out myself for a little while, but it's generally a terrible idea.  Values of 1 evaporate (sorry nekoexmachina, even with magma), and pressure plates are still pretty binary; toggle on/off based on whether it is higher or lower than whatever fluid level.

The only effective way to split water into smaller values than 7/7 would be to isolate small areas, and then allow them to diffuse into larger areas.  Each "cell" would have to have multiple pressure plates hooked up to determine the water level, and then the output would have to interpret what to do with that information, which will probably just end up being essentially binary again; there isn't really a way to input "some" and equally output "some".

The sensitivity of controlling the water levels means you'd have to be incredibly precise, and even if you did get that working the isolation/diffusion process would inevitably render the whole thing incredibly slow.
Logged
Pages: [1] 2