So, we've all heard of the lightspeed computer:http://www.bay12forums.com/smf/index.php?topic=92454.msg2586844#msg2586844
If anybody here is a Real Dwarf, they must have asked themselves: Is it possible to make this even faster? My answer is yes.
The lightspeed computer established that it is possible to make 1 calculation per tick. To make a faster computer it is necessary to make the calculations done in a tick more complicated. So the question becomes: How much calculation can be done in 1 tick? Well, I suspect it is possible to do unlimited
calculation in 1 tick.
To understand this design it is important to understand something about how Dwarf Fortress works. When a several pieces of machinery are operating simultaneously, the one designated later operate earlier. The ones operating earlier can affect the ones operating later. This is all within a single tick.
Anyways, my design is based on storing information in water. If a location has 7/7 water, it is a 1, and if it has 0/0 water, it is 0. It is possible to move this information around with the help of carefully designated pumps. This is the main logic gate:
i channel with input
A OR output
B AND output
% screw pump
It works as follows: First the input bits (stored under the channel) are prepared. Then the two pumps operate. If either of the two bits is a 1, the water would get pumped onto the floor closer to the two pumps. That floor tile stores the OR of the two inputs. If both of the input bits are 1, then water will first be pumped onto the closer floor, and then pressure will push another tile of water onto the the farther floor. The farther floor stores in its tile the AND of these two bits.
This AND/OR gate has been tested by me.
Unfortunately, this AND/OR gate destroys its inputs. I don't know any way to perform arbitrary computation with this gate alone. However, there might be some complicated way of doing so which I'm not aware of. UPGRADE: I asked about this in the theoretical computer science stack exchange: http://cstheory.stackexchange.com/questions/10837/are-andor-circuits-p-complete
. Apparently it is not known weather arbitrary calculations are possible with this gate. However, a wide variety of calculations are possible, including calculating sums and products.
Luckily, there's a way to duplicate input. This method hasn't been tested yet.
% Screw pump
i Channel with input
o Channel with water, then with output
~ Magma flow
On the bottom floor, the north channel has the input bit, the south channel has magma, and to the right is a resevoir. There are many pumps which pump water into the resevoir. First the pump on level 2 pumps any water that spills into the middle channel back into the resevoir. Then, the input water and the magma are pumped into the middle. If the input bit is 1, this makes an obsidian wall. Now, all of the resevoir pumps are pumped. If an obsidian wall was created, the pumps will not work and the and the channels on the right will have water in them. If it isn't created, then all of the pumps will work, leaving those channels empty. Now the output those channels. At the end of the tick, the obsidian wall will fall onto the magma flow. This is a fanout/not gate. Note that the magma flow doesn't have to be right below the rest of the structure. This design might not work if the obsidian wall caves in as soon as it is created.
So there you have it, unlimited computation in 1 tick.