v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Editing v0.34:Creature logic
Jump to navigation
Jump to search
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "v0.34"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | {{ | + | {{quality|Fine|22:44, 17 March 2012 (UTC)}}{{av}} |
− | |||
− | {{av}} | ||
Creature logic is a form of dwarven [[computing]] that functions by taking advantage of creature's natural [[path]]-finding goals to trigger pressure plates. Creature logic is complete-- you can build memory, repeaters, or any sort of logical circuit. | Creature logic is a form of dwarven [[computing]] that functions by taking advantage of creature's natural [[path]]-finding goals to trigger pressure plates. Creature logic is complete-- you can build memory, repeaters, or any sort of logical circuit. | ||
− | ==Creature logic vs | + | ==Creature logic vs [[mechanical logic|mechanical]] or [[fluid logic]]== |
Pro: | Pro: | ||
− | * Creature logic requires no [[water|fluid]] or [[windmill|wind]]. In dry, windless environments, | + | * Creature logic requires no [[water|fluid]] or [[windmill|wind]]. In dry, windless environments, creature logic is the only kind of logic you can use. |
− | * Similarly, creature logic requires no infrastructure-- you can build your circuits anywhere, without worrying about | + | * Similarly, creature logic requires no infrastructure-- you can build your circuits anywhere, without worrying about bring water or [[power]] from one end of your map to the other. |
* All creature logic circuits can be designed with only [[stone]] and a pick-- although you're free to use [[wood]] or [[metal]] if you prefer! | * All creature logic circuits can be designed with only [[stone]] and a pick-- although you're free to use [[wood]] or [[metal]] if you prefer! | ||
− | * Creature logic doesn't need anything but creatures to send or receive signals. There's no need to translate signals as with | + | * Creature logic doesn't need anything but creatures to send or receive signals. There's no need to translate signals as with with mechanical logic. |
* Creature logic can be very intuitive. Watching creatures physically travel through your logic pathways simplifies debugging. | * Creature logic can be very intuitive. Watching creatures physically travel through your logic pathways simplifies debugging. | ||
* It's fun to watch the creatures run around! | * It's fun to watch the creatures run around! | ||
Con: | Con: | ||
− | * Reliable creature logic requires a | + | * Reliable creature logic requires a lot of [[hatch]]es, [[door]]s, and [[mechanism]]s. |
* Creature logic requires creatures-- sometimes, a great number of creatures. Sometimes, those creatures die or have babies. Sometimes, they interrupt your [[dwarf|dwarves]]. Sometimes, your dwarves fill them full of crossbow bolts. | * Creature logic requires creatures-- sometimes, a great number of creatures. Sometimes, those creatures die or have babies. Sometimes, they interrupt your [[dwarf|dwarves]]. Sometimes, your dwarves fill them full of crossbow bolts. | ||
* Creature logic is vulnerable (surprise) to the presence of unexpected creatures in the logic circuits. Because creature logic circuits require a path either to the map edge or to the [[Activity_zone#Meeting_Area|meeting hall]] (in most cases), this is a real possibility. | * Creature logic is vulnerable (surprise) to the presence of unexpected creatures in the logic circuits. Because creature logic circuits require a path either to the map edge or to the [[Activity_zone#Meeting_Area|meeting hall]] (in most cases), this is a real possibility. | ||
Line 84: | Line 82: | ||
− | As XOR is the intersection of OR and NAND, it is simply an OR followed by a NAND. The XNOR, as the union of AND and NOR, requires two arms. Each operand is linked to one door and one hatch in the XOR path, and to one door and one hatch in the XNOR path. The pressure plate will signal when either operand is true but not both are true. When modifying the XOR to take more than two operands, be careful to leave space between the doors and hatches as shown; this space is unnecessary for evaluation of two operands. Similarly, the expanded XNOR is appropriate when dealing with more than two operands, but a condensed version for taking only two operands exists. | + | As XOR is the intersection of OR and NAND, it is simply an OR followed by a NAND. The XNOR, as the union of AND and NOR, requires two arms. Each operand is linked to one door and one hatch in the XOR path, and to one door and one hatch in the XNOR path. The pressure plate will signal when either operand is true but not both are true. When modifying the XOR to take more than two operands, be careful to leave space between the doors and hatches as shown; this space is unnecessary for evaluation of two operands. Similarly, the expanded XNOR is appropriate when dealing with more than two operands, but a condensed version for taking only two operands exists (shown in the next circuit). |
===Multiple use=== | ===Multiple use=== | ||
Line 97: | Line 95: | ||
This is one such device for re-routing creatures mid-path. Upon stepping on the pressure plate, the creature opens two hatches, thus blocking retrograde motion as well as access to its pathing goal, and opens a door, giving access to a new pathing goal. This new pathing goal can lead back to the original position of the creature. This principle is demonstrated in the designs to follow. Because the creature is constrained on the pressure plate, the door can be opened by outside mechanisms rather than being linked to the pressure plate, permitting controlled movement of a creature through one or more arms of a circuit. | This is one such device for re-routing creatures mid-path. Upon stepping on the pressure plate, the creature opens two hatches, thus blocking retrograde motion as well as access to its pathing goal, and opens a door, giving access to a new pathing goal. This new pathing goal can lead back to the original position of the creature. This principle is demonstrated in the designs to follow. Because the creature is constrained on the pressure plate, the door can be opened by outside mechanisms rather than being linked to the pressure plate, permitting controlled movement of a creature through one or more arms of a circuit. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Creature memory== | ==Creature memory== | ||
{{diagram|spaces=yes|\ | {{diagram|spaces=yes|\ | ||
Line 125: | Line 108: | ||
==Clock generation, repeaters, and delay== | ==Clock generation, repeaters, and delay== | ||
− | A high resolution borg-logic clock or delay can be designed around the rate with which creatures fall. A simpler, low resolution clock can be designed based around the military [[scheduling]] menu | + | A high resolution borg-logic clock or delay (working in increments as small as 7 ticks) can be designed around the constant rate with which creatures fall. A simpler, low resolution clock can be designed based around the military [[scheduling]] menu. |
The memory design above, slightly modified, can make a decent (not perfectly regular) repeater. | The memory design above, slightly modified, can make a decent (not perfectly regular) repeater. | ||
Line 150: | Line 133: | ||
North of the circuit is the pathing goal. The eastern and western pressure plates are linked to adjacent hatches. Input is linked to the hatch southeast of the eastern pressure plate and to the door. The central and southern pressure plates are linked to output. This circuit generates both an open and a close every time it is sent an open or a close signal from input -- that is, it generates two properly-ordered signals for every properly-ordered signal it is sent, allowing for ''edge triggered'' logic. Either output pressure plate can be removed to send an open and a close only upon receiving one kind of signal or the other kind of signal. Output can linked to the same device or to two different devices. | North of the circuit is the pathing goal. The eastern and western pressure plates are linked to adjacent hatches. Input is linked to the hatch southeast of the eastern pressure plate and to the door. The central and southern pressure plates are linked to output. This circuit generates both an open and a close every time it is sent an open or a close signal from input -- that is, it generates two properly-ordered signals for every properly-ordered signal it is sent, allowing for ''edge triggered'' logic. Either output pressure plate can be removed to send an open and a close only upon receiving one kind of signal or the other kind of signal. Output can linked to the same device or to two different devices. | ||
− | Note that the memory design forms a sort of inverse of this circuit, in that a single open-close cycle is translated into a | + | Note that the memory design forms a sort of inverse of this circuit, in that a single open-close cycle is translated either into a steady on or off signal. |
==Alternative design== | ==Alternative design== | ||
Line 174: | Line 157: | ||
====Dwarves==== | ====Dwarves==== | ||
− | Dwarves themselves can be used to run logic circuits, and are perhaps the most interesting choice; logic designs involving dwarves are generally referred to as borg logic. While longer-lived than most domestics, dwarves [[food|starve]] and [[alcohol|dehydrate]] easily, requiring frequent, careful maintenance. Idle dwarves path unpredictably, and dwarves are vulnerable to [[sleep|drowsiness]], leading to very high latency. Married female dwarves are fecund. At the same time, dwarves are excellent choices for logic circuits because of their varied pathing goals that can be altered through direct interaction by the player. Dwarves can trigger events both through the use of pressure plates and through the use of [[lever]]s, while their pathing goals can be controlled by many means-- most easily and predictably, by military scheduling | + | Dwarves themselves can be used to run logic circuits, and are perhaps the most interesting choice; logic designs involving dwarves are generally referred to as borg logic. While longer-lived than most domestics, dwarves [[food|starve]] and [[alcohol|dehydrate]] easily, requiring frequent, careful maintenance. Idle dwarves path unpredictably, and dwarves are vulnerable to [[sleep|drowsiness]], leading to very high latency. Married female dwarves are fecund. At the same time, dwarves are excellent choices for logic circuits because of their varied pathing goals that can be altered through direct interaction by the player. Dwarves can trigger events both through the use of pressure plates and through the use of [[lever]]s, while their pathing goals can be controlled by many means-- most easily and predictably, by military scheduling. In fact, one can see the entire game of Dwarf Fortress as one big logic circuit with dwarves as the driving creature. |
+ | |||
+ | The addition of [[vampire]]s to the game opens up many possibilities for borg logic-- the simplest implementation being placing one in a room full of levers. | ||
===Undead=== | ===Undead=== | ||
Line 183: | Line 168: | ||
{{Category|Computing}} | {{Category|Computing}} | ||
− |