/** * DNA strings contain the makeup of a creature, seriving as a template for the creature factory * The DNA string must be automatically generatable so that random mutations can occur. * * In essence, it is a list of cell types with potential neurons. Any 'sensor' cell can have one or more connections to 'activatable' cells such as locomotion cells or mouths. * * A DNA string should be able to be parsed to a simple string (hence the name), meaning the factory must be able to interpret relations from a data structure that doesn't support references. * * definitions: * - cell: one out of many objects of uniform size that make up a creature * - sensor: a cell that is able to detect things * - activator: a cell that can respond to the signal of a neuron * - neuron: a connection between a sensor and an activator * - braincell: a cell that acts as a hybrid activator/sensor. It receives inputs like an activator would, but instead of doing something on its own, it has outbound neuron connections of its own to one or more sensors (or other brain cells) * * Types of mutations that can occur: * - add or remove connections between sensors and activators * - add or remove cells of any type * - change the strength of neurons * * Types of cells: * ACTIVATORS * - Mouth: can Bite, which will eat whatever is in front of it, be that a cell or a food pellet * - Locomotor: When activated, pushes the creature in the direction of the creature's center, relative from the locomotor cell * * SENSORS * - Eye: Activates whenever there is a cell or food pellet near it within a certain range and in a certain direction * * OTHER * - Stomach: Can contain energy. Each cell/pellet eaten increases energy in any available Stomach cells. All Activators require an amount of energy from any of the available Stomach cells to function. * * A creature will multiply when all its Stomach cells are completely full, draining each of them by 50%. This spawns an Egg which will hatch into a copy of the parent creature with a slight mutation applied as soon as there is space available (read: the parent creature has moved suffficiently far away). */