Welcome to Darwinbots!
  • Home
  • Guide
    • Select Bots
    • Tutorials
  • Links
    • Darwinbots Wiki
    • Darwinbots Forum
    • Sysvars
Darwinbots is a free, on-profit A-life stimulator.  Small critters called "bots" fight each other for food in a physically simulated 2D universe. Successful bots will live to reproduce and, over time, evolve.  It simulates Von Neumann Machines (and Von Neumann probes like the Monolith) better than it simulates biological life necessarily.

Darwinbots

Similar to other ALife programs (such as Avida notably) organisms (called "bots" hereafter) are simulated by a DNA script which defines behavior. Conceptually the DNA is a large Finite State Machine that reads various sensory inputs, modifies them, and connects them to various outputs and actions. Bot DNA files are in ASCII with a .txt extension, which allows anyone familiar with the DNA language to write and share DNA files with notepad.
The bots' world is a large non-discrete plane. There are no "grids" bots are placed in, as in cellular automata. Rather, the bots move and roam around like ants on a giant pane of glass.
Bots receive energy ("nrg") by eating other bots. A few bots (deemed "veggies") get nrg from the simulation for free to simulate an inflow of energy. Most actions (movement, DNA execution, eating, etc.) cost nrg.
Conceptually, Darwinbots is the ALife descendant of C Robots, as opposed to Avida or Tierra which descend from Core Wars. Most of the universe rules in Darwinbots descend from that conceptual past.
A certain level of abstraction is necessary to keep the simulation running at decent speeds. Concepts help to provide that level of abstraction. For instance, Darwinbots does not simulate proteinbiosynthese or enzymatics. Instead, the DNA directly controls a bot's behavior. However you can simulate simple hormones by variables which control feeding, reproduction, growth, or any other physical process.


What are bots?
Every bot is represented by a circle of a given size and color. A bot's "eye" is marked by a white dot on the circle. The eye consists of nine simple sub eyes called eyeX where X is between 1 and 9. These simple eyes return a value that roughly corresponds to the apparent size of the nearest object it can see through that eye.
Bots also have tactile senses allowing them to feel when another bot has bumped into them or when the bot is being attacked. At present there are no long range senses available to the bots (such as sounds in higher organisms or chemical signals in bacteria).
The sensory inputs of bots are analyzed through its DNA, which is essentially a program, written in a specially designed FILO (First in last out memory stack/array) language, designed to be as robust to mutations as possible. Most bots' DNA is made of only ~6-20 procedures called genes, themselves made up of 20-200 operations. Each operation can potentially change through mutations.
Every bot has its own Energy supply. Most actions cost nrg. If a bot reaches 0 nrg, it dies. Most bots reproduce when their nrg levels are above a certain threshold determined by the DNA. Energy can be replenished by taking energy from other bots in the simulation (analogous to hunting in real ecosystems), by feeding on stored energy reserves (called "body"). Bots also are resupplied by the simulation if they are veggies or alga. Veggies receive energy for free over time (analogous to plants in real ecosystems).
Bots use non-material shots to feed, attack, remove waste, infect, or communicate. Shots are single points with no mass or physical dimensions.
Bots can also make Ties to each other that can harden to form more complex multicellular structures that can share food or tasks, or just drag each other around.


Mutations and Natural Selection
When bots reproduce, their DNA is passed to the child, sometimes with a random change, which might affect the pattern of bot's behavior. Just as in real evolution, when a change in DNA improves the bot's ability to survive and reproduce, these new mutations will spread through the population; otherwise, they will likely disappear. Note that the simulation itself is not directly interfacing with the DNA or mutations. Increases or decreases in fitness are strictly emergent. Junk code generally gives an evolutionary disadvantage through higher DNA maintenance or processing energy costs. However, this is often outweighed b the advantage of having a buffer so that mutations affect the "junk", instead of a potentially fatal error, as in real life. Junk DNA can also evolve into functional code, although it is rare. Many evolved bots accumulate short pauses of junk DNA.
Because the program does not directly decide how fit an organism is, a bot's survival depends on its long term, combined strategies for movement, energy management, reproduction, etc. There is no limit on sophistication of the DNA code: most user written bots can be quite complex.
Unfortunately, Darwinbot evolution takes time. Because a bot generation can last many thousand cycles, and most simulations run at maybe 15 cycles a second, (sometimes as low as 1.5 to 0.1 cycles for very complex or fecund bots) it can take many hours or even several days before significant natural selection can occur.
The optimal strategy for the impatient is to find an old computer and set up a simulation and forget it for about a week, or link several computers with a LAN network and use IM (internet mode) to link the stimulations.

Battle Bots
Battle bots are similar to Von Neumann Berserker probes, like the replicators in Star Gate
While the program has been developed mainly to simulate artificial life and evolution, it has also been used as a playground for testing programming skills. Complex DNA programs for bots can be designed from scratch since the DNA language is human-understandable. The user designed bots are placed in an arena where they fight until one species wins. Several leagues have been established with different rules and ratings that are periodically updated as new species are introduced.


Getting Started

Make sure you have the newest release of Darwinbots before you begin. If you're not sure if you have the latest version, check out the Main FTP which is updated with the most recent version regularly. If you have problems installing take a look at the Installation Instructions or ask a question at the forum.
The changes from release to release are not trivial. Don't cheat yourself with older versions.

 Your First Sim
Open the program. A warning will appear stating that there is no settings file and that the default will be used. Do not worry since this is your first time there is no settings file ready to be used.
Go to Animal Minimalis and save the Animal Minimalis to your robots folder in a text file named Animal Minimalis.txt. All bots are run from text files. Remember this page since the Basic Bot Tutorial is a good next step to take.
Once this is done go to file > new simulation. This opens the simulations settings which will allow you to create a new simulation or change the settings in a simulation that is already running. Go to the species tab click add species and add Alga Minimalis and Animal minimalis. Alga Minimalis is a vegetable and will provide the food for your Animal Minimalis. Click Animal Minimalis in the loaded species box and change its colour to red. Click the Alga Minimalis (Alga Minimalis v2 for2.46 and later) then set its colour to green and click the Repopulate/Autotroph box to the right of the screen.
click the physics and costs tab and select solid, click the menu to its right and select metal. Look to the right and click custom simulation costs. Set cost multiplier to 1 and age cost to 8. Now click start new and you will see the bots come to life.
You should see a bunch of green and red bots running around and firing little dots at the green ones. To speed up the simulation look along the top of the screen and search for an icon that appears to be a graph. Select the arrow next to it and choose the population and average mutations graphs. These graphs allow you to see changes in the bots easier. Now look towards the left of the screen for an icon that looks like a computer monitor click this and you will notice that there is a message that says video output is enabled. This will increase the speed of the simulation, to reactivate video output click it a second time.
As Emeril would say, let's kick it up a notch.

Running Something Worth Running
Find a bot called Ymir. You probably don't have him on your computer, so you have to download him from either the forum bestiary.
Download that to your */darwinbotsII/robots/ folder. Or just open notepad, copy and paste, and save to */darwinbotsII/robots/ Darwinbots is by default installed to your C:/program files/darwinbotsII folder, but you may have specified a different directory when you installed the program. I know I did!
Do you have Ymir now? Let's load him into the program. Go back to Darwinbots and hit file -> new simulation.
Now click on the button called 'new species'. You now enter a file-selection-window. Go to the directory where you saved Ymir. Select Ymir.txt and double-click it. You now re-enter the simulation window with 3 species: the plant (green), the Martian Tank 3 (yellow), and Ymir (some random color). By default, Ymir gets assigned 3000 energy and 5 bots to begin with.
What colour's Ymir? Probably nothing nice, as he got a random colour after you added him. click on the list underneath Ymir's picture, and select a nice colour. I like to pick custom, and choose 100% red. Like the blood of the fallen that Ymir squashes under his feet.
Now, let's hit 'start new'. You see? Ymir's cool! Much more exciting.
You should now have the knowledge necessary to play around with bots you find in the Bestiary. Explore at your leisure.

Some Screenshots
Picture
 This is from the Darwinbots program. 

One unique feature of Darwinbots is the "Genes Activation" pop-up, which shows which genes in which
bot are being used by the virtual creature. Clicking the "bot" also shows the "eyes", the blue triangles. They return where and how close something is.

The darwinbots DNA is a stack language with reverse-polish notation, structured as follows:

     cond
     start
     stop

     else 
     stop

Between cond and start are the requirements for the gene to activate,
 
Between start-stop is the gene. 

Else activates when the corresponding condition is false.  It is not mandatory. 
Picture
Here you can see another cool feature of Darwinbots- the single robot's data (species name, energy, age, offspring, mutations number, and so on), his complete DNA (a program written in a simple interpreted language), a console to debug it easily -just in case you want to program your own.
Picture
 Another feature of Darwinbots (or DB) is the ability to pull u graphs, showing everything from populations to species diversity.

Powered by Create your own unique website with customizable templates.