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: | ||
− | |||
− | |||
− | |||
− | |||
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 80: | ||
− | 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 95: | Line 91: | ||
║[#F00]p║}} | ║[#F00]p║}} | ||
− | 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 | + | 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 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 106: | ||
==Clock generation, repeaters, and delay== | ==Clock generation, repeaters, and delay== | ||
− | + | Probabilistic movement rates combined with [[attribute]] rust make perfect clock generation impossible-- or at least, no one has done it yet. Without rust, however, its possible to design a device that will measure the speed of a given creature to any arbitrary level of confidence (less than total). This may be possible, for instance, when using [[undead]] creatures. Repeaters based on the rate with which creatures fall through open space hold promise for the design of perfect creature-driven delay. | |
+ | |||
+ | A low resolution clock generator can be designed via borg logic: using military scheduling to create a clock that will not run fast or slow. Such a clock is limited to increments of [[calendar|months]], and will involve unpredictability in its exact function, but any error will not accumulate. | ||
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 135: | Line 118: | ||
╚═╝ }} | ╚═╝ }} | ||
− | Here, each pressure plate is linked to the two orthogonally adjacent hatches. The southern hatch is linked to the eastern pressure plate, while the northern hatch is linked to western pressure plate. This repeater tends to fire about every 250 ticks, with open and close signals offset by about 125 ticks, when built as shown. | + | Here, each pressure plate is linked to the two orthogonally adjacent hatches. The southern hatch is linked to the eastern pressure plate, while the northern hatch is linked to western pressure plate. This repeater tends to fire about every 250 ticks, with open and close signals offset by about 125 ticks, when built as shown. Although it's not a perfect delay, over sufficient repetitions, after attribute rust has run its course, the repeater will behave as a regular repeater-- that is, as the time for which it has ran approaches infinity, the repeater approaches full reliability. In other words: it's very effective at rapidly triggering any device with a refractory period of 100, and it's perfectly acceptable for running a calendar. Similar, non-repeating systems can be used to institute delay. |
Linking both pressure plates to output doubles its rate, turning it into very effective spike repeater. The period can be increased by introducing floor space into the center of the design. | Linking both pressure plates to output doubles its rate, turning it into very effective spike repeater. The period can be increased by introducing floor space into the center of the design. | ||
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 | + | 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. 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=== | ||
− | [[Undead]] are an intriguing choice for creature logic choices. The absence of attribute rust opens up the possibility for a | + | [[Undead]] are an intriguing choice for creature logic choices. The absence of attribute rust opens up the possibility for a very accurate, very precise creature logic clock. They can be used in fully submerged circuits-- even in magma-submerged systems. In some [[biome]]s, they are self-repairing. However, undead path like wildlife, which can make it difficult to set up a circuit for them. Without a clear target, they may not behave predictably. One way to work around this is to build a visible target to which the undead path, by walling the circuit with [[channel]]s instead of walls, and placing a captured invader in clear line-of-sight of the undead logician. |
− | ===Other choices=== | + | ====Other choices==== |
− | There are a few things to stay away from, but in general, any sufficiently understood creature can be used for creature logic. Building destroyers are problematic, but full-bridge design is possible. Likewise, flyers and swimmers cause difficulty, but nothing that can't be worked around. Creatures with trapavoid are | + | There are a few things to stay away from, but in general, any sufficiently understood creature can be used for creature logic. Building destroyers are problematic, but full-bridge design is possible. Likewise, flyers and swimmers cause difficulty, but nothing that can't be worked around. Creatures with trapavoid are unfortunately useless (with the possible exception of [[gremlin]]s, who might be able to output via levers), as are creatures with a [[size]] less than 10000, as they're too small to set off pressure plates. The essence of creature logic, however, is predictable pathing. This may or may not exclude the use of certain types of wildlife. |
{{Category|Computing}} | {{Category|Computing}} | ||
− |