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 98: Line 98:
  
 
===Reversibility===
 
===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:
+
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.
  
{{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|\

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: