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:Animal 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|Exceptional|07:53, 2 June 2010 (UTC)}}
+
{{av}}{{Quality|Exceptional|07:53, 2 June 2010 (UTC)}}
{{Computing}}
+
Animal logic functions by taking advantage of the path finding algorithm in Dwarf Fortress; all domestic animals seek to find the shortest (lowest cost) path to their desired targets (activity zone, parents, dwarves, valuable objects, etc), this can be used to create very very complex logic gates. Animal logic has three principal advantages: speed, compactness, and simplified functions. However, animal logic is slower than mechanical logic and less reliable than either fluid or mechanical logic.
{{av}}
 
Animal logic functions by taking advantage of the path finding algorithm in Dwarf Fortress; all domestic animals seek to find the shortest (lowest cost) path to their desired targets (activity zone, parents, dwarves, valuable objects, etc.) Furthermore, animals tend to continue to path through tightly closed doors, despite them not being able to pass. This defines the difference between animal and [[creature logic]]: animal logic does not need to regulate paths actually travelled by a creature, only potential paths. Using these features of animal pathfinding, it is possible to create very complex logic gates.  
 
 
 
Animal logic has three principal advantages: speed, compactness, and simplified functions. However, animal logic is slower than mechanical logic and less reliable than either fluid or mechanical logic.
 
  
 
==Definitions==
 
==Definitions==
Line 31: Line 27:
  
 
'''XOR Gate''': XOR takes 2 or more inputs and output TRUE if ANY are TRUE but NOT ALL are TRUE.
 
'''XOR Gate''': XOR takes 2 or more inputs and output TRUE if ANY are TRUE but NOT ALL are TRUE.
 +
  
 
'''NOR Gate''': NOR takes 2 or more inputs and returns TRUE if ALL inputs are FALSE.  
 
'''NOR Gate''': NOR takes 2 or more inputs and returns TRUE if ALL inputs are FALSE.  
Line 38: Line 35:
 
For a better explanation of gates see:http://en.wikipedia.org/wiki/Logic_gate
 
For a better explanation of gates see:http://en.wikipedia.org/wiki/Logic_gate
  
Notation: #:wall ^:pressure plate X:floodgate,grate,bars,bridge,etc. (explained per entry) D:door,open, but kept tightly shut(pet impassable) d:door, input value not specified Letters:doors/floodgates,grates,bar,etc. Specified inputs(these are generally interchangeable, if not this will be noted in the entry), generally controlled by mechanism g:Ground, some entries need it for clarity. C: Either an input in diagrams, or the state Carry is refereed to as a state within an adder.
+
Notation: #:wall ^:pressure plate X:floodgate,grate,bars,bridge,etc(explained per entry) D:door,open, but kept tightly shut(pet impassable) d:door, input value not specified Letters:doors/floodgates,grates,bar,etc Specified inputs(these are generally interchangeable, if not this will be noted in the entry), generally controlled by mechanism g:Ground, some entries need it for clarity. C: Either an input in diagrams, or the state Carry is refereed to as a state within an adder.
  
 
Gates will always be capitalized in the way they are within the entry, e.g. AND, OR, ANDOR, XNOR, etc.
 
Gates will always be capitalized in the way they are within the entry, e.g. AND, OR, ANDOR, XNOR, etc.
  
  
Since animal logic is based on the interaction between animals and this particular setting of doors, all doors not wired to mechanisms need to be unlocked but tightly closed.
+
The basics of construction for an animal logic takes advantage of an animal's tendency to continue to path through tightly closed doors, despite them not being able to pass. It goes without saying that all doors not wired to mechanisms need to be tightly closed.
  
  
Line 55: Line 52:
 
===AND===
 
===AND===
  
This simple gate is made by confining the animal into a straight corridor; the ground path will have two or more doors which are connected to the input, while the second longer path remains clear. The gate can be configured as an NAND gate by simply moving the pressure plate. If the plate is by the ground path it functions as an AND gate returning TRUE if the ground path is open, and if the plate is by the purge path it will return FALSE when the inputs are TRUE.
+
This simple gate is made by confining the animal into a straight coridor; the ground path will have two or more doors which are connected to the input, while the second longer path remains clear. The gate can be configured as an NAND gate by simply moving the pressure plate. If the plate is by the ground path it functions as an AND gate returning TRUE if the ground path is open, and if the plate is by the purge path it will return FALSE when the inputs are TRUE.
 
  #########
 
  #########
 
   ABCD^ D
 
   ABCD^ D
Line 116: Line 113:
 
==Compound Gates==
 
==Compound Gates==
  
Basically two or more gates arranged with different path costs to ground. These gates can be configured in a number of different ways, these being the simplest. It may be possible to make these gates as single gates but that would require inverting some of the input. Simple compound gates use two simple gates and handle two inputs; complex compound gates have more than two simple gates and need more than two inputs. A complex compound gate might be used to convert decimal numbers into binary using And gates.
+
Basically two or more gates arranged with different path costs to ground. These gates can be configured in a number of different ways, these being the simplest. It may be possible to make these gates as single gates but that would require inverting some of the input. Simple compound gates use two simple gates and handle two inputs; complex compound gates have more then two simple gates and need more than two inputs. A complex compound gate might be used to convert decimal numbers into binary using And gates.
  
 
===XOR===
 
===XOR===
Line 287: Line 284:
 
==Animals==
 
==Animals==
  
Choosing the animal which works as the logic core for an animal logic systems is somewhat important, depending on your needs and the available animals. The main requirements are that the animal must be large enough to activate pressure plates and able to stay alive while locked up in a logic cell. As long as these conditions are met, pretty much anything will do as long as you can remember which animal belongs into which gate (to avoid designating the same animal for more than one pit).
+
Choosing the animal which works as the logic core for an animal logic systems is somewhat important, depending on your needs and the available animals. However pretty much anything will do as long as you can remember which animal fits into which gate (to avoid designating the same animal for more than one pit).
 +
 
 +
 
 +
===Cats===
  
===Minimum weight===
+
Unfortunately, cats are both too small to trigger pressure plates.
  
A creature must have a size of 10,000 in order to trigger pressure plates at all. Everything smaller will not generate output. This excludes cats and many children of animals like puppies.
 
  
For reference, this [[List of creatures by adult size]] gives a full listing of ''average'' sizes of creatures, with relevant cutoffs for pressure plates already marked in.
+
===Puppies===
  
Pigs and dogs are an easy choice as animals to use. They are heavy enough to trigger pressure plates if adolescent or adult. They will normally path to a meeting area. While they have other uses as war animals or a prime source of meat, they are fast-breeding domestic animals that can be brought on embark.
+
Puppies are quite reliable with two pathing goals, which is presumed to lead to faster response times than animals with only a single pathing goal, but tend to spit out babies upon maturation.
 +
Puppies path to the activity zone, and their parents.
  
===Viability===
+
===Dogs===
  
Children are presumed superior to adults due to an extra pathing goal (to their mother), but keep in mind that they are generally much smaller than adults and thus may be too small to activate pressure plates.
+
While dogs may seem an attractive option for logic cores, they will be far more useful as wardogs or hunting dogs to protect dwarves.
 +
Dogs path to the activity zone.
  
Female animals can become pregnant and have children, even if locked away far from others of their kind. Such children may disrupt the pathing of their mother or send signals by themselves. [[Grazer]]s are likely to starve to death before you get any logic out of them.
+
===Other animals===
  
Exotic animals undeniably add style to your computing zone. A GCS powered computer would be awesome. Such uses prevent other potential applications, like using the spider to create valuable silk. Flyers may ignore hatch-based logic blocks.
+
Many animals work, but the above are probably your best choice, excluding any modded animals. However if you have a GCS handy, a GCS powered computer would be awesome, so take this as you will.
 +
Other animals have different pathing goals, but most only path to the activity zone.  Children are presumed superior to adults due to an extra pathing goal (to their parents). Some animals may be too small to trigger pressure plates; grazers may starve before you get any logic out of them; flyers may ignore hatch-based logic blocks.
  
 
===Invaders===
 
===Invaders===
  
Invaders such as elves or goblins will not work with any of the designs on this page, unless you managed to dehand them before capture-- securely closed doors are no barrier to them.  Any mounts or warbeasts, on the other hand, might work, and exotics are unlikely to bear any children, and can be extraordinarily long-lived.  Job cancellation may be a problem with more complicated designs.  Invader animals path to the map edge following capture.  Be careful of any flyers or building destroyers.
+
Invaders such as elves or goblins will not work with any of the designs on this page, not unless you managed to dehand them before capture-- securely closed doors are no barrier to them.  Any mounts or warbeasts, on the other hand, might work, and exotics are unlikely to bear any children, and can be extraordinarily long-lived.  Job cancellation may be a problem with more complicated designs.  Invader animals path to the map edge following capture.  Be careful of any flyers or building destroyers.
  
  
Line 317: Line 319:
  
 
{{Category|Computing}}
 
{{Category|Computing}}
{{Category|Logic}}
 

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)