This is a teaching illustration of what a hive "AI diagnostic assistant" actually computes: sliders stand in for four signals a real system would read from sensors — brood-camera activity counts, acoustic spectral anomalies, hive-scale weight trend and an internal thermometer — and a small classifier turns them into a probability over four outcomes, exactly the shape of a softmax output layer.
stress = |temp - 33°C| / 20 (deviation from ideal brood temperature)
weightTrend = weight / 3 kg/day (positive trend, normalised 0-1ish)
z_healthy = 2.5 - 3.0·mite - 2.0·stress - 2.0·max(0, weightTrend - 0.3)
z_swarm = -1.0 + 3.0·weightTrend + 1.0·activity - 1.0·mite
z_disease = -1.5 + 2.5·mite + 1.5·stress - 0.5·activity
z_varroa = -2.0 + 4.0·mite + 0.5·stress
p_i = exp(z_i) / Σ exp(z_j) (softmax over the four classes)
diagnosis = argmax(p_i), confidence = max(p_i)
- Colony activity — simulated brood-camera / entrance traffic count; low activity alongside high mite load pulls weight toward the disease and varroa classes.
- Varroa mite load — the dominant driver of the varroa-detected logit; also raises disease-alert probability since mite damage and pathogen spread correlate.
- Hive weight trend — a strong sustained gain plus high activity raises swarm-risk (bees crowding, colony strength growing) before a flow even shows up as certain.
- Ambient temperature — deviation from the ~33-35°C brood-nest ideal is treated as thermoregulation stress, lowering the healthy-class score.
Exactly as the article on AI hive tools stresses: this softmax score is a triage input, not a diagnosis — real notifiable diseases like American or European foulbrood need a qualified bee inspector, and a model trained on one region's bees can be unreliable elsewhere without local validation.