DarwinBotsManual
Open the app EspañolES

The inspector

A bot's panel in Observe: its summary, what it senses, its memory, its DNA, its console, its family, the eye designer and the Player Bot for driving it with the keyboard.

The inspector is the Bot tab of the side panel in Observe: picking a bot jumps to it. It shows what it has, what it sees, what's in its memory and which genes of its DNA ran, and it lets you touch a few things: write to its memory, move its eyes or drive it with the keyboard.

How to open it

To close it, click × (Close the inspector) or click an empty spot in the world; the panel goes back to the previous tab (Live, or Tournament if a tournament is in progress). If the bot dies while you're watching, The bot died appears: the data stays as it was in its last cycle and Close closes the panel.

The panel updates on its own several times a second while the simulation runs. When paused, One cycle moves it forward one step at a time.

The header

At the top are the color and name of its species, its number (the one that identifies it throughout the run), its generation, how many mutations it has accumulated and its age in cycles. Below, some tags mark its status when applicable:

TagWhat it means
vegetableit photosynthesizes (Chloroplasts and vegetables)
fixedit doesn't move (.fixed)
paralyzedvenom hit it (.paralyzed)
poisonedpoison hit it (.poisoned)
infectedit has a virus incubating (.vtimer, see Viruses)
fertilizedit received sperm (.fertilized)

The species, the lineage and the relatives need the enriched view. With the classic one, the inspector warns you and offers Turn on the enriched view.

Follow, Family and Genetic distance

Three buttons below the header:

Summary

The first tab gathers what's looked at most:

Senses

What the bot perceives, reread every half second.

Eyes. A fan draws the nine eyes as the bot sees them: each one's direction and width, and its range; the focus one is in red. Below, a table with each eye: what it sees (Value), its Direction (.eye1dir and so on), its Width (.eye1width and so on) and its Range. How what each eye sees is calculated is in Vision.

Touch: the contact hits on each side (.hitup, .hitdn, .hitsx, .hitdx), the total .hit and the angle .hitang.

Taste (hits received): the shots that hit it, by side (.shup, .shdn, .shsx, .shdx), their type .shflav and their angle .shang.

Other: .pain, .pleas and .daytime.

Memory

A table with the bot's most-used sysvars, their address and their value, reread every half second. They're grouped: Body and energy, Movement, Actions, Vision, Ties and Counters and free memory. Each name has its profile in the sysvar reference (for example .nrg, .aim, .shoot, .refeye or .numties), and in the table those names are links: a click opens that sysvar's page in the manual (the same goes for the eye table and the ones in the senses). The ? in the inspector's header opens the inspector's page.

To look at something that isn't in the list, type it in the box at the top and click Query. These are valid:

The query stays in the Queries group, at the top, until you remove it with ×. If the name isn't anything the bot knows, the table says “does not exist”.

DNA

The bot's DNA as it has it now, with its mutations, colored and with the line count. It starts with a few comments with its generation and its mutations. Copy puts it on the clipboard, to paste into the DNA editor or a .txt. Reload asks for it again: the DNA may have changed if the bot mutated during its life (Mutations).

Each gene has its own box, with its number (Gene 3, counted the way the engine counts it: see Genes: cond, start, else and stop). What's marked is what happened in the bot's last cycle:

Click a gene's header and its step-by-step stack opens below, with the values the bot had in that cycle, not example values. Only one gene is open at a time.

The bar above runs the simulation:

While the simulation runs, the genes update every half second. When it's paused, they're requested when you open the tab and after each step. The trace is the one of the focused bot, the one you're watching. If no cycle has run since you opened the tab, the bar says “No trace yet” and no genes are marked.

Genes over time, below the text, has one row per gene and one cell per cycle for the last 200 (the newest, on the right). A lit cell is a cycle in which that gene fired. On a phone the grid scrolls sideways.

Open in the editor (with the bot alive) takes this DNA to a new bot in the DNA editor, with the stack turned on and the bot's real memory as example values. How those values are used is explained there.

What ran in the last cycle is also seen in Summary (The inspector), with one square per gene, and in more detail, with debug in the console.

Console

The console is the original's debugging tool: it reads and changes this bot's memory with text commands. Type the command and click Send (or Enter); the ↑ and ↓ arrows go through previous commands. The buttons at the top send the most common ones with a single click, and Clear wipes the output.

CommandWhat it does
printeyeeye status: what each one sees, .eyef, .focuseye, directions and widths
printtouchtouch on the four sides
printtastetaste (hits received) on the four sides
printmem .var or ? .varthe value of a sysvar or an address (? 310)
set .var vstores v in a sysvar or an address
energy esets the bot's energy to e
cycle nruns n cycles
execrobruns every bot's DNA without advancing the cycle
play / pausestarts or pauses the simulation
showdnapoints to the DNA tab
debugthe interpreter trace of this bot in the last cycle
helpthe list of commands
clearwipes the output

After every command, the active genes in Summary are updated.

? .nrg
set .up 30
energy 5000
cycle 1
debug

This example isn't DNA, it's console lines: it checks the energy, pushes the bot forward with .up, gives it 5000 energy, runs a cycle and shows the trace.

With a tournament in progress the console is read-only: set, energy, cycle, execrob, play and pause aren't sent, because they would change the fight (see Compete). The other commands work as usual.

Control

The last tab has two tools for stepping in: the Player Bot and the eye designer. Neither can be used during an F1 match, and what they do to the bot's memory isn't kept in the run. With a tournament in progress, the Player Bot doesn't even show up and the eye designer only reads (see Compete).

Player Bot

It lets you drive the bot. With Control this bot, the bot always aims at the mouse pointer over the world (the app writes to .setaim) and each key writes a value to an address in its memory while you hold it down.

  1. Pick the bot and open the Control tab.
  2. Under Keys, pick a set: Arrows and space, WASD and space, None or your Custom ones.
  3. Click Control this bot. Player Bot on appears over the world.
  4. Move the mouse over the field and use the keys. Esc exits.

The built-in sets write this:

ArrowsWASDAddressValue
↑W1 (.up)40
↓S2 (.dn)40
→D4 (.dx)40
←A3 (.sx)40
spacespace7 (.shoot)−1

With the bot facing the pointer, ↑ takes it toward the pointer and space shoots toward it (−1 is the shot that steals the other bot's energy, see .shoot). The side keys are relative to the bot: .dx pushes it toward its right and .sx toward its left, so → moves it to the right of where it's facing.

The key table is editable: click a row's key and press another to change it; Memory accepts an address (1 to 999) or the name of a sysvar such as .up; Value, an integer between −32000 and 32000; Inverted writes the value while the key is released. Add key adds a row and each row's × removes it. Save preset downloads your table to a .pbkp file and Load preset… reads it back. The app remembers your keys in this browser.

Children born while you control the bot are highlighted and respond too; if the bot dies, control passes to one of them. A click on another bot hands control to it. When you exit, the highlights are removed.

Eye designer

It shows the Direction and Width of the nine eyes (.eye1dir … .eye9dir, .eye1width … .eye9width). Each change is written to the bot's memory instantly, and the fan above shows the effect. It's for trying out a vision setup by eye before writing it into the DNA. Reread reads the bot's values again. What directions and widths mean is in Vision. With a tournament in progress the fields, Reset aim and Ease of access are off: you can read the eyes and use Write to DNA, but not change them.

When you like it, Write to DNA builds a gene that sets those eyes at birth, to add at the end of the DNA. It starts like this (with your values) and goes on the same way, eye by eye, up to 9; here it's cut short after eye 2:

Cond
*.robage 0 =
Start
-70 .eye1dir store
100 .eye1width store
'
-50 .eye2dir store
100 .eye2width store
'
Stop

Since the condition is .robage equal to 0, the gene runs only once, in the bot's first cycle, and the values stay in its memory. Copy puts it on the clipboard and Download eyes.txt downloads it. If the bot is one of yours, Open the DNA of… copies the gene and opens its DNA in the DNA editor for you to paste it.

Ease of access brings three shortcuts for testing at your leisure:

The first two are live parameter changes: they hold for the whole simulation and are recorded in the run. The third only touches the bot's memory and isn't recorded.