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.31: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.31"). 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: | ||
− | {{av}}{{Quality|Exceptional | + | {{av}}{{Quality|Exceptional}} |
− | Animal logic functions by taking advantage of the path finding algorithm in Dwarf Fortress; all | + | Animal logic functions by taking advantage of the path finding algorithm in Dwarf Fortress; all animals seek to find the shortest (lowest cost) path to their desired targets (activity zone, parents, dwarfs, 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. |
==Definitions== | ==Definitions== | ||
Line 12: | Line 12: | ||
'''Path cost''': The number of steps the animal must make to reach ground | '''Path cost''': The number of steps the animal must make to reach ground | ||
− | '''Fusion Gate''': Simply one or more logic gates built into the same system | + | '''Fusion Gate''': Simply one or more logic gates built into the same system (this is more than simply stringing gates) |
'''Compound Gate''': Gate which uses two or more gates set to different path costs. | '''Compound Gate''': Gate which uses two or more gates set to different path costs. | ||
Line 35: | 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) | + | Notation: #:always 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) 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. | ||
Line 67: | Line 67: | ||
===NAND=== | ===NAND=== | ||
− | Reconfigured AND gate, see | + | Reconfigured AND gate, see {{l|Animal logic#AND|AND}}. |
######### | ######### | ||
ABCD ^D | ABCD ^D | ||
Line 89: | Line 89: | ||
Y D^ D | Y D^ D | ||
N ##### | N ##### | ||
− | |||
M ##### | M ##### | ||
####### | ####### | ||
Line 96: | Line 95: | ||
===NOR=== | ===NOR=== | ||
− | Basically a reconfigured OR gate | + | Basically a reconfigured OR gate |
##### | ##### | ||
AD ^D | AD ^D | ||
Line 113: | Line 112: | ||
==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 | + | 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 compund 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 190: | Line 189: | ||
===ANDOR=== | ===ANDOR=== | ||
− | This gate will evaluate if either of x AND statements are TRUE. This gate is built as a straight line similar to the | + | This gate will evaluate if either of x AND statements are TRUE. This gate is built as a straight line similar to the And gate |
###### | ###### | ||
#C#### | #C#### | ||
Line 200: | Line 199: | ||
===NANDOR=== | ===NANDOR=== | ||
− | Reconfigured ANDOR gate, see | + | Reconfigured ANDOR gate, see {{l|Animal logic#ANDOR|ANDOR}}. |
###### | ###### | ||
#C#### | #C#### | ||
Line 208: | Line 207: | ||
− | === | + | ===OrandOr=== |
− | This gate returns true if either A or B and either C or | + | This gate returns true if either A or B and either C or D is true. |
###### | ###### | ||
Line 218: | Line 217: | ||
− | === | + | ===OrandAnd=== |
This gate returns true if either A or B is true, and E and C are true. | This gate returns true if either A or B is true, and E and C are true. | ||
Line 226: | Line 225: | ||
BCED^ D | BCED^ D | ||
####### | ####### | ||
+ | |||
==Complex Gates== | ==Complex Gates== | ||
− | The development of more complex gates requires | + | The development of more complex gates requires carful calibration of the path cost of each path to allow the gate to switch states correctly and display the correct result. |
==Adders== | ==Adders== | ||
− | A | + | A Full adder can be made as a Compound Fusion gate, by combining, And, AndOr, and Or gates |
===Binary Adder=== | ===Binary Adder=== | ||
− | A binary adder is | + | A binary adder is constrcuted of two or three "sum" gates and a purge path. a half adder only adds two numbers and only needs two sum gates, 1 and 2. Full adders using carry to allow chaining require three sum gates, 1,2 and 3. Because binary is base two that translates to 01,10,11 as the sums, when the second bit is a 1, the gate is "carrying" the value up to the next level. |
− | + | An building the adder the highest path must have the most preferential path to ground or it will not properly function. | |
− | Standalone | + | Standalone Adders (they don't carry into another adder) require 22 mechanisms, and 14 doors. |
− | Start | + | Start Adders (They feed into the next Adder and include a carry) require 32 mechanisms, and 14 doors. |
− | Chain | + | Chain Adders (The receive Carry, and pass a Carry bit up) require 32 mechanisms, and 14 doors |
− | + | While Materials intensive the gates only take up 13x9 urists, ideal for chaining along mining tunnels. | |
− | |||
− | |||
− | |||
− | |||
Line 264: | Line 260: | ||
Image:9bit adder prototype 10100010notes.PNG|9bit adder, notes show the decimal value of each adder's bit | Image:9bit adder prototype 10100010notes.PNG|9bit adder, notes show the decimal value of each adder's bit | ||
</gallery> | </gallery> | ||
+ | |||
+ | |||
+ | The above design is flawed as the Sum 1, and 2 paths can become "stuck" if the adder improperly cycles. It can be manually readjusted however this defeats the purpose. A new design which solves these problems is forthcoming, however simply lengthening the coridoors will solve the problem. | ||
+ | |||
Line 287: | Line 287: | ||
− | === | + | ===Kittens=== |
− | + | While kittens are the most reliable cores for logic gates because of their three pathing goals they're also problematic as they grow into cats which only have two, and may cause catsplosions inside your logical cores. Ideally kittens should be replaced yearly or biyearly as their growth defines. | |
+ | Kittens path to the activity zone, their parents, and vermin. | ||
===Puppies=== | ===Puppies=== | ||
− | Puppies are quite reliable with | + | Puppies are quite reliable with Two pathing goals, but retain the problem of maturation. |
Puppies path to the activity zone, and their parents. | Puppies path to the activity zone, and their parents. | ||
+ | |||
+ | ===Animal Children=== | ||
+ | |||
+ | Using the non matured animals for something useful before butchering may be quite effective, however they still must be flushed when they mature. | ||
+ | Animal children path to the activity zone, and their parents. | ||
+ | |||
+ | |||
+ | ===Cats=== | ||
+ | |||
+ | Aggravating animals, throw them into the computer and get some worth out of them. Otherwise useless cats become useful when used for logic, with two pathing goals they're responsive, and multiply quickly. Watch out for catsplosions while using these critters | ||
+ | Cats path to the activity zone, and Vermin. | ||
===Dogs=== | ===Dogs=== | ||
− | While dogs may seem an attractive option for logic cores, they will be far more useful as wardogs or hunting dogs to protect | + | While dogs may seem an attractive option for logic cores, they will be far more useful as wardogs or hunting dogs to protect dorfs. |
Dogs path to the activity zone. | Dogs path to the activity zone. | ||
+ | |||
+ | ===Cattle=== | ||
+ | |||
+ | Large lumbering bovines, the advantage of Cattle is you can tell the sexes apart, they also make the pressure plates continue to work even if you forget to reassign the trigger weight. | ||
+ | Cattle path to the activity zone. | ||
===Other animals=== | ===Other animals=== | ||
− | + | Any 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 | + | Other animals have different pathing goals, but most only path to the activity zone. |
− | === | + | ===Goblins=== |
− | + | Goblin powered logic is highly ironic, especially if it involves controlling your goblin killing magma trap. | |
==Putting it all together== | ==Putting it all together== | ||
− | When it comes time to automate your systems the first thing you need to know is what needs to be automated and what should remain manual. An obsidian farm with completely autonomous control of the casting process is all well and good, until it drowns all your legendary miners when it prematurely triggers. All systems should have manual controls and failsafes to help avoid | + | |
+ | When it comes time to automate your systems the first thing you need to know is what needs to be automated and what should remain manual. An obsidian farm with completely autonomous control of the casting process is all well and good, until it drowns all your legendary miners when it prematurely triggers. All systems should have manual controls and failsafes to help avoid {{l|Fun}} (but because we all love Fun sometimes you forget to fully connect that emergency drain, or that failsafe system you built somehow failed.) | ||
Once you know the steps you need in your system, it comes time to select the parts you need to automate, whether it be basic logic gates or more sophisticated multiple trigger systems. | Once you know the steps you need in your system, it comes time to select the parts you need to automate, whether it be basic logic gates or more sophisticated multiple trigger systems. | ||
− | |||
− |