* Formicidae assembly code Formicidae assembly files begin with a line containing the number of states in them. Following that is that number of states. Finally, it contains a possibly empty sequence of aliases, or lists of two elements denoting that the first element is an alias for the state indexed in the current file by the second element. A Formicidae state is a list of at least two elements in the form: ( ( ...) ...) STATE-ID is a symbol or #F denoting the identifier of the state, to be used during state linking. Each CONTINUATION is a zero-based index to a state in the same brain, or a symbol denoting the name of a state which has not yet been linked. The precise details of each OPERAND are specific to the operator. (SENSE ( ) ) Sense in DIRECTION for ATTRIBUTE. DIRECTION is a symbol in the set {HERE, AHEAD, LEFT, RIGHT}; ATTRIBUTE is either an integer in the range [0,7) or a symbol in the set {FRIEND?, FOE?, HOME?, FOE-HOME?, FRIEND-WITH-FOOD?, FOE-WITH-FOOD?, FOE-MARK?, FOOD?, ROCK?, WATER?}. If the specified attribute is found to be in the cell in DIRECTION, control jumps to SUCCESS; if not, it jumps to FAILURE. (TURN () ) Turn the ant in DIRECTION, which should be either the symbol LEFT or the symbol RIGHT. Control jumps unconditionally to TARGET. (MOVE ( )) Attempt moving forward. If there is an ant or a rock in front of the ant, control jumps to FAILURE; if there is water in front of the ant, the ant dies; otherwise, control jumps to SUCCESS. (PICK-UP ( )) Attempt picking up food. If there is food to pick up, control jumps to SUCCESS; otherwise, control jumps to FAILURE. (DROP ()) If there is food to drop, drop it on the current hex. Control jumps unconditionally to TARGET. (MARK () ) (UNMARK () ) Mark or unmark the pheromone flag indexed by INDEX for the current ant's team on the current hex. specifies the amount of pheromone deposited, a. For each unit of pheromone, the marker will persist for 50 ticks. This operation takes one tick for each 100 units of pheromone, with a one tick minimum. Control jumps unconditionally to TARGET. Unmarking a pheromone completely neutralizes any pheromone on the cell, regardless of amount. (FLIP ( )

) If a random integer between [0,p) is zero, control jumps to LEFT; otherwise, it jumps to RIGHT. P should be an integer greater than zero and representable in twelve bits, i.e. in the range [1,4096). A P of 1 is acceptable, but not very useful. All operands should be literal constants; no operands are evaluated for their value. Operand evaluation should have occurred in compilation.