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 10: Line 10:
 
* Similarly, creature logic requires no infrastructure-- you can build your circuits anywhere, without worrying about bringing water or [[power]] from one end of your map to the other.
 
* Similarly, creature logic requires no infrastructure-- you can build your circuits anywhere, without worrying about bringing 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 [[mechanical logic]].
+
* 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!
Line 97: Line 97:
 
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.
  
===Reversibility===
 
The reader may have noticed the near symmetry of the preceding gates.  However, the output works as well when placed before the path-limiting furniture as after!  While it's easier to visualize the effects of these circuits when displayed as above, it is often more effective to use a reversed design.  When a single creature is used to traverse a large, compound circuit, reverse design can lead to reduced latency.  A clever logician might wonder, "But if they can evaluate the signal before traversing the path, why traverse the path at all?"  Consider the following XOR/XNOR gate, redesigned both for reuse and reversed operation:
 
 
{{diagram|spaces=yes|\
 
    ╔═╦═╗ 
 
    ╔╝[#0F0][#F0F]¢O[#0F0]┼╚╗
 
════╝[#F0F]^[#FF0][#F0F]¢+[#FF0]┼+╚═
 
[#F00]p[#F0F][#00F]┼[#0FF]¢[#0FF]^[#0FF]¢O═══O+[#F00]p
 
════╗[#00F]^[#00F][#0F0]¢[#FF0]¢++╔═
 
    ║[#00F]¢OO+╔╝
 
    ╚╗[#0F0]┼[#FF0]┼╔╝ 
 
    ╚══╝  }}
 
A creature waits at the start point, atop the cyan hatch, until evaluation is triggered by an '''off''' signal to the cyan hatches (typically following a redundant '''on''' signal).  The creature, suddenly granted path to its goal, races toward either XOR or XNOR, but evaluation occurs earlier than in previous designs.  Its original path is blocked upon evaluation and the creature is rerouted back to its start point.  (Note that while the creature is reset in this design, furniture is not necessarily reset.  Some circuits may require additional furniture to control path without altering operands.)
 
 
Whereas the creature needed to travel 8 tiles for evaluation in the previous design, this allows evaluation in 2 tiles, and the refractory period-- the time during which the circuit cannot be used to evaluate another operand-- is improved to an even larger extent.
 
 
==Creature memory==
 
==Creature memory==
 
{{diagram|spaces=yes|\
 
{{diagram|spaces=yes|\
Line 125: Line 110:
  
 
==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 or [[minecart]] routes.
+
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.
  
 
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 174: Line 159:
  
 
====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 or minecart routes.  In fact, one can see the entire game of Dwarf Fortress as one big logic circuit with dwarves as the driving creature. The more philosophically oriented overseer may wonder what cyclopean, ineffable circuit he or she is traversing through the act of playing Dwarf Fortress....
+
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===

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: