orrery · Training view · treadcore

The net in orrery

These are pictures of orrery's Training view on this Mac, drawn from the real fleet, grove. Each one is explained in plain terms. After them comes what the interface does today, and what it would need before it can show how training is going, not just where it stands.

The net being shown is bc2, the clone trained on 47 million moments of the scripted brain's play. It is a small fully connected net: 143 senses in, two layers of 64 units, 47 scores out. Every number below was measured from its file, nets/bc2.bin, and from 200,000 recorded moments of real matches.

16,431numbers in the net
24 of 143senses never non-zero in the sample
31.8its largest weight; the median is 0.07
59–60%of the first two layers' weights are negative

The Training view

One screen answers two questions: what is the fleet doing right now, and how good is the net. The numbers mark what each part is.

orrery's Training view 1 2 3 4 5 6 7 8
Drawn by orrery at 1280 × 760 from the document scripts/fleet-view.py printed, after the recording run rec2400 had ended.
  1. 1
    What is happening, in one sentence. Here the last recording run has ended and nothing is running.
  2. 2
    The round's three steps: record the scripted brain's matches, train on calber's GPU, judge in the census on columbia. The current step lights up.
  3. 3
    The fleet, a card per machine: its role, its CPU load against its cores (calber also shows its GPU), and what it is doing now in words, with the command doing it. saskatchewan shows its own work, make converge, at 23 of 24 cores.
  4. 4
    The net's three weight matrices, small: inputs across, outputs down. Click one to enlarge it (below).
  5. 5
    The colour legend shared by the three: red takes away from a unit, green adds to it.
  6. 6
    The 47 scores, split into the 7 decisions they choose: where to drive (10 choices), where to shoot (9), how far to lead a moving target (3), where to fire the mortar (9), which drone to launch (5), and squad and signal (7 and 4), which are not trained yet.
  7. 7
    How often the net makes the scripted brain's choice on matches it never saw, one bar per decision. The dark tick is the first clone, bc1. The red tick is what you would get by always picking the most common choice. A bar is only good if it reaches well past its red tick.
  8. 8
    The census: the net's whole-team score against the scripted brain, and how it compares with the official net, map7. bc2 is level with map7.

Why the first matrix looks pale and striped

This matrix connects the 143 senses (across) to the first layer's 64 units (down). Each cell is one weight: how much that sense pushes that unit up (green) or down (red).

The first weight matrix, enlarged A B C D E F
senses → layer 1, enlarged by clicking. Its colour scale runs from −31.83 to +31.83.
  1. A
    Almost everything looks pale because one weight sets the scale. The colour runs from the matrix's largest weight, 31.83, but the median weight is only 0.071, and 99% of weights are under 2.32. So a typical weight is drawn at about a twentieth of full strength. The picture shows the extremes and hides the rest. Improvement 1 below fixes this.
  2. B
    The compass repeats every 11 columns. The first 88 senses are 8 compass sectors × 11 channels, so whatever the net does with a channel shows up 8 times across. Channel 0, a hostile tank in that direction, carries the most weight of any channel (mean |w| 0.43). The net cares most about where the enemy is.
  3. C
    The hints are a pale band because they were never on. All 9 hint senses (124–132) were zero in every recorded moment. A weight on a sense that is always zero never gets a training signal, so it stays at its random starting value (between ±0.084). They measure mean |w| 0.041, just what an untouched start gives. The same goes for the friend's-call channel in every sector (the last column of each group of 11) and for the six contact senses that describe a call. Scripted matches make no calls.
  4. D
    Sense 92, the tank's speed, has the second-largest weight (23.1). The drive decision's commonest answer is "stop", and speed is what tells stopped from moving.
  5. E
    Horizontal stripes are units that listen to many senses at once. A row with many strong cells is a unit that combines much of what the tank feels. A pale row is a unit that barely listens.
  6. F
    Sense 140, how close a drone is, has the largest weight in the net (31.8). It fits what the gauntlet found: the clones dodge an incoming strike drone 96–99% of the time, better than the scripted brain itself. An input that is often 0 and sometimes near 1, and that strongly predicts one decision, can grow a large weight.

The slight orange cast across the picture is real: 59% of this matrix's weights are negative. That is common in nets whose units switch off below zero (ReLU). Many weights learn to keep a unit quiet unless the right senses are present.

Why the middle matrix looks like noise

This one connects the first layer's 64 units to the second layer's 64 units. It looks like static, and that is expected. The 64 units have no natural order: shuffle them, and shuffle the matching rows and columns, and the net computes exactly the same thing. So no picture of a hidden-to-hidden matrix shows a meaningful shape. Only whole rows or columns that stand out mean anything, as units that matter more.

It has learned all the same. Its weights average 0.186 in size, three times the 0.0625 an untrained layer of this size starts with, and its largest is 6.50.

The middle weight matrix, enlarged
layer 1 → layer 2, enlarged. Its scale runs from −6.50 to +6.50, so it reads stronger than the first matrix.

Why the last matrix has quiet bands at the bottom

The last matrix turns the second layer's 64 units (across) into the 47 scores (down), grouped by decision.

The last weight matrix, enlarged G H I
layer 2 → scores, enlarged. The rows are labelled by the decision they score.
  1. G
    The drive and lead rows are the strongest (mean |w| 0.24 and 0.26). Drive is the decision the net was most often asked about. Lead is nearly always "aim where the target is", so a few strong weights settle it.
  2. H
    Squad and signal are flat, faint noise because they were never trained. The recordings give no label for them, so their 11 rows are still their random starting weights. Their largest weight is 0.12, just under the starting bound of ±0.125. Anything the net does with these two decisions today is random.
  3. I
    Vertical stripes are units used by many decisions. Units 18, 7, 0, 60 and 33 have the strongest outgoing weights across the trained decisions. They are the second layer's most-used features.

The interface today

orrery has three views, chosen in the header or with Command-1, 2 and 3. All of them only display; none of them change anything yet.

Lab: the real fleet

Lab shows the machines of the fleet named grove: calber, columbia, nasser and saskatchewan, read from copal fleet state. They say "off bus" because they have not been enrolled into grove: no fleet agent runs on them to report uptime, temperature or scene. Enrolling them would fill these tiles.

orrery's Lab view of the grove fleet
Lab, the fleet grove: four machines, up, not yet enrolled.

Media

The SD cards and images the machines were installed from. It plays no part in training.

Training

Described above. It refreshes every 5 seconds. Each refresh asks every machine over ssh for its load, memory and GPU, reads the newest recording run and the training loop's state, and reads the best net's weights and results. It is all one document of about 140 KB, which scripts/fleet-view.py prints in about 1.5 seconds. Text is drawn a pixel bolder than the font, for legibility. Clicking a matrix enlarges it, with labelled axes, a legend, and the weight under the pointer.

What it needs to show how training is going

Today the view is a snapshot of one net. Analysing training means seeing change: from round to round, from one net to the next, and from what the net sees to what it decides. In order of value:

  1. A colour scale that a few weights cannot wash out. Scale each matrix to its 99th-percentile weight, mark the cells beyond it, and put a histogram of weight sizes beside the legend. The first matrix would show its structure instead of two dots (A above).
  2. Progress over time, on one screen. For each round: training loss per epoch, agreement per decision, and the census score with its error bars. Draw it as lines over rounds, with the official net as a reference line. Whether training is improving is a trend, and the view can only show one point of it.
  3. What each round changed. A difference map, candidate minus best, for each matrix. It shows where learning happened: which senses and decisions moved, and which never move.
  4. Which senses each decision listens to. A 7 × 7 map, decisions by sense group (compass, body, navigation, contacts, hints, shells, air). Compute it from the weights or from gradients on held-out moments. It answers "why does it stop?" directly. For the clones, drive should show it never uses the senses a route would need.
  5. Where each decision goes wrong. A confusion table per decision: what the scripted brain chose against what the net chose. The drive head's habit of choosing stop, the clones' main failing, would be one bright column.
  6. Which inputs are alive. A strip under the first matrix showing how often each sense is non-zero in the recordings. Mark the senses that never fire, and the decisions that are untrained. 24 senses and 2 of the 7 decisions get no training today, and the picture cannot say so.
  7. Healthy units. For each hidden layer, how many units are never active, or always active, on held-out moments. Dead units are capacity the net is wasting. This net is small, so every unit counts.
  8. The 110 scripted-brain weights, as the trainer tunes them. A curve per weight, the score against its value, read from every census. Show the trials in the queue and the candidates waiting for you. The other half of the trainer you asked for. Its results are curves, not matrices.
  9. The queue and its controls. Jobs by kind, each machine's use over time, and buttons for "stop adding" and "collect results and stop now", only when orrery runs as operator. The engine and both stops are built and tested; the view does not show them yet.
  10. Names on hover. Name the exact sense under the pointer ("sector 3, hostile tank"), not just its group, and the exact choice ("drive: sector 5"). Reading a single weight should not need the source code open.
  11. Compare two nets side by side, and choose which round to show. Promotion decisions are comparisons.
  12. Separate fast and slow refreshes. Machines every few seconds; the net, its 16,431 weights and its results only when a round ends. It keeps the view quick and the network quiet as the fleet grows.