Parameters: Shapes (vision and drift)
How obstacles interact with the bots' vision and shots, and whether they move around the field on their own.
Shapes are the rectangular obstacles you put in the world, loose or in mazes, from the World bar in Observe or from the scenario's objects in Experiment (see The world). To a bot's body they are always solid, however you configure them: a bot that gets inside one is put back outside (see Physics). What this group decides is everything else: whether the eyes see them, whether they hide what is behind them, what happens to the shots that hit them, and whether they move.
All of them can be changed while the simulation is running, and with no shapes in the world they do nothing.
Seeing and blocking
The two vision options combine like this:
| Block what's behind | Don't block (Transparent to vision) | |
|---|---|---|
| Invisible (factory) | Ghost walls: you can't see them, but they hide the bots behind them. | They don't exist as far as vision is concerned: the eyes see through them and don't register them. |
| Visible (Bots see the shapes) | They are seen as walls and hide what's behind. | They are seen, and so is whatever is behind them. |
The factory combination is the oddest one: a bot hidden behind a wall shows up in no eye, and neither does the wall. If you want the bots to learn to dodge walls, turn visibility on. How the eye measures a shape and which senses it changes is in Vision.
Drift
With drift on, each shape changes its speed a little at random every cycle, sideways (Horizontal drift), up and down (Vertical drift) or in both directions; Shape drift rate says by how much. Since what changes at random is the speed and not the position, the movement accumulates: the shape takes a heading and gradually bends it. A shape can leave the field almost entirely; when it leaves completely, the engine puts it just outside the edge and makes it slowly come back in.
Moving mazes
Two mazes in the World bar use these parameters:
- Polar turns drift on in both axes and sets the speed to 20 when it is created. It is an options change like any other: it stays in the scenario and keeps going even if you later delete the plates.
- Trash moves its two walls at a speed of 0.1 × Shape drift rate units per cycle, even if drift is off. With the speed at 0, which is the factory value, the walls stay still: set a value before creating the maze (with 20 they advance 2 units per cycle).
Bots see the shapes
Eyes detect the obstacles.
- Default
- no
- Usual range
- yes / no
- Variable
shapesAreVisable- Key
opt:80- Live
- can be changed while the simulation runs
- Mode
- advanced only
On, the eyes register shapes the way they register a bot: they give a value according to the distance to the closest point of the shape, and if the closest thing in the focus eye is a shape, .reftype is 1. Off (factory), the eyes don't see them, and a bot only finds out about a wall when it hits it (.hit). See Vision.
Transparent to vision
Vision goes through shapes.
- Default
- no
- Usual range
- yes / no
- Variable
shapesAreSeeThrough- Key
opt:81- Live
- can be changed while the simulation runs
- Mode
- advanced only
On, shapes don't block: the eyes see the bots behind them. Off (factory), each shape casts a shadow and whatever is behind it doesn't show up in any eye, even if the shape itself is invisible. Combined with Bots see the shapes off, shapes disappear from sight completely.
Absorb shots
Shots die when they hit a shape.
- Default
- no
- Usual range
- yes / no
- Variable
shapesAbsorbShots- Key
opt:82- Live
- can be changed while the simulation runs
- Mode
- advanced only
On, a shot that hits a shape vanishes, along with its energy or contents. Off (factory), it bounces: it reverses direction along the side it came in on, like a ball against a wall, and keeps traveling until its range runs out. With bounces, a bot can receive shots that don't come from where the shooter is. See Shots.
Horizontal drift
Shapes drift sideways.
- Default
- no
- Usual range
- yes / no
- Variable
allowHorizontalShapeDrift- Key
opt:84- Live
- can be changed while the simulation runs
- Mode
- advanced only
Makes shapes randomly change their sideways speed, cycle by cycle. It only moves anything if Shape drift rate is greater than 0. It doesn't affect the walls of the trash maze, which have their own movement.
Vertical drift
Shapes drift up and down.
- Default
- no
- Usual range
- yes / no
- Variable
allowVerticalShapeDrift- Key
opt:83- Live
- can be changed while the simulation runs
- Mode
- advanced only
The same as Horizontal drift, for the up-and-down speed. With both on, shapes wander in any direction.
Shape drift rate
How much shapes move.
- Default
- 0
- Usual range
- 0 to 32000
- Variable
shapeDriftRate- Key
opt:85- Live
- can be changed while the simulation runs
- Mode
- advanced only
How much a shape's speed can change each cycle: at most a hundredth of this number, on each axis that has drift. With 20, the change is 0.2 per cycle at most, and a shape takes hundreds of cycles to move a noticeable distance. It also sets the speed at which a shape that left the field comes back in (a hundredth of this value) and that of the trash maze's walls (a tenth). With 0, nothing moves.