DarwinBotsManual
Open the app EspañolES

Differences from the original 2.48.32

What was fixed from the original program, what was deliberately left the same, and how certain we are about the questions the original left open.

This is the page the manual points to every time it says “that's how it was in the original”. This version's engine is that of DarwinBots 2.48.32, translated: the same numbers, the same cycle order and the same rules. What changes is the original program's bugs, fixed on purpose, and nothing else.

Here you'll find the criterion used to decide each fix, the fixes grouped by topic (with a link to the page that explains them in detail), what was left the same on purpose, and the questions the original left open.

The criterion

The rule was to fix without changing the language: the loader, DNA execution, the operators and the meaning of every sysvar stayed as they were, so a bot written for the original loads and runs the same as ever. In total, 35 bugs were fixed, which broadly fall into three families:

What was not touched: the balance (the costs, the energy economy, photosynthesis, the population caps), the world rules (the draws and their order: the cycle is still DNA → senses cleared → shots → forces and collisions → movement → actions → births and deaths → the sun) and the engine's functions, which were ported whole even if the app doesn't expose some of them. Fixing a bug is not redesigning: if an oddity was part of the game the community knew, it stayed (see Differences from the original 2.48.32).

That is why a simulation here doesn't give exactly the same numbers as in the original with the same seed: any fix that changes the random numbers consumed separates the two runs for good. What is kept is repeatability within this version: the same seed gives the same run, always (see Seeds and reproducibility).

There was also a one-by-one review against the original source that fixed deviations of the translation itself — roundings and numeric promotions — so that the numbers come out the way they used to.

What is not a fix to the original

Not everything you notice as different comes from the original: the app and the site have a layer of their own, and its fixes don't count as corrections.

Nothing in that layer writes to the simulation: a run saves and loads the same with any view on or off.

The DNA and how it runs

' In the original, the else never ran: address 60 stayed at 0
cond
 *50 0 >
start
 1 60 store
else
 2 60 store
stop

With 50 at 0, this bot writes 2 to 60: the else runs when the gene's conditions are false, as the original's help promised. That was the most awkward bug of 2.48.32: the body of an else after a start never ran, whether the condition was true or false, even though the documentation said otherwise. Here it runs, and the numbering of the genes doesn't change. The Bestiary bots that use it — Lionfish, Zer0Bot, TRON_F1 and several by Moonfisher — behave the way their authors expected, not the way the program let them behave. The details are in Genes: cond, start, else and stop and else.

One more of the same family:

Shots and viruses

Viruses had three bugs: shooting them was charged twice (here, once); the strength depended on the number of the gene copied (copying gene 7 infected seven times harder than gene 1); and going through slime strengthened the virus instead of using it up. All three are fixed, and that is why slime protects much more than in the original (Viruses). The complete shots mechanism is in Shots.

Energy, body and chloroplasts

Senses and vision

Five of the usual senses:

And the vision of shapes had four errors at once: a shape's shadow didn't match the shape (it was rotated and covered too much), the width of the eyes was computed differently for shapes than for bots, .eyef didn't rise to 32000 for a bot inside a shape, and the shape's position was only correct if the focus eye was the front one. All fixed (Vision).

Ties

Reproduction and mutations

The world

What was deliberately left the same

Fixing bugs is not redesigning. Many oddities of 2.48.32 were kept because the DNA sees them: changing them would change what a bot written for that version means, with the bots the community evolved on top of it. Others were kept because they are mechanics, not bugs: design decisions of the original that break nothing. And those with no observable effect nobody will notice. The breakdown:

Oddity keptWhere it is covered
With def in the DNA, the first token is lost if it doesn't open a geneThe structure of a bot
The asymmetries of the stack operatorsThe integer and boolean stacks
Approximate comparisons are always false with a negative reference%=
Setting a tie's angle or length only works with the two-operand storesWriting to memory
mkvirus doesn't clear itself: you have to clean it up by handViruses
A negative eye width makes it panoramicVision
A .shoot that is an exact multiple of 1000 comes out as spermShots
The birth tie uses port 0Ties and multicellular bots
.fixang with 32000 releases the angle instead of fixing itWriting to memory
.hitang has a name but nobody writes it: it is free memoryFree and epigenetic memory

Mechanics, not bugs: a whole organism respects the edges of the toroidal world as if it were a single bot; corpses collide; a bot can reproduce in the cycle it dies (Death and corpses); the mixing in sexual reproduction loses stretches of DNA, as it came out in the original (Reproduction); and the rules for switching venom and poison and the floor of the cost of moving are what they were (Defenses). The original's anti-giant rule wasn't touched either: its threshold is above the body cap, so it never acts — in either version (Death and corpses).

And the file format: the original's simulations and bots are read and written in the same format as ever, oddities included, so that a .dbsim or a .txt from that era keeps working (File formats).

The questions the original left open

Rebuilding the engine raised questions that the source alone can't answer: how the executable behaved in detail. And the executable doesn't run on today's Windows, so it can't be checked against the binary. Those questions were closed where possible, and it is worth knowing how certain each answer is:

If you find a new difference

If a simulation behaves differently from what this manual says, it is a bug in the manual or in the port, and reporting it helps. The project's repository is public (github.com/japentaca/darwinbots2-wasm, linked on the site's home page): open an issue with what happened, and if you can, the exported scenario and the seed, since with those the run repeats exactly (Seeds and reproducibility). If it is an oddity of the original that doesn't appear on this page, it probably stayed the same on purpose: say so anyway, and we'll decide whether it's a bug or character.

How the port was made, layer by layer, is in How the port is built; where each thing comes from, in Credits and license.