Home / Research / 003
Phase 3 - Experiment 003b

Social Avoidance from Evolved Connectome Topology: Peer Nausea as a Distress Signal Under Complete Sensory Randomisation

Abstract

We present evidence that NEAT-evolved connectomes develop social avoidance behaviour when two agents share a randomised environment with no static sensory cues. Building on Phase 2's demonstration of individual food discrimination, this experiment removes all item-property correlations via per-generation Fisher-Yates shuffling of colour, smell, and texture assignments, forcing agents to rely solely on social observation for survival information. The best genome achieved a 3.4:1 safe-to-bad eating ratio, compared to the 1.0:1 ratio expected from random consumption, using six active peer sensor connections, all carrying negative (avoidant) weights. Analysis of the evolved topology reveals an eat-suppression pathway (peer_nearby → eat, weight −1.63) and dual flee pathways triggered by peer nausea and peer health decline. These results demonstrate that social instinct, the tendency to treat peer distress as a danger signal, can emerge from topology evolution alone, without any explicit social reward, imitation mechanism, or hidden-layer computation.

1. Introduction

1.1 Background

The Quale project investigates whether complex behaviour can emerge from connectome topology evolution rather than weight training or hand-coded rules. Previous phases established two foundational results:

  • Phase 1 (Experiment 001): NEAT-evolved connectomes discovered foraging behaviour (eating and drinking) from survival pressure alone, with 787% average fitness improvement across 10 independent seeds.
  • Phase 2 (Experiment 002): Agents evolved 93% avoidance of dangerous food items using static sensory properties (colour, smell, texture), achieving a 7:1 safe-to-bad eating ratio with no discrimination rules coded.
  • Phase 3A (Experiment 003a): Introduced a second agent into the environment, establishing baseline multi-agent performance metrics.

Phase 3A confirmed that agents could coexist in a shared environment but did not isolate social information as a discrimination channel. Items retained their static property-safety correlations, meaning agents could still rely on individual sensory cues.

1.2 This Experiment

Experiment 003b eliminates all static cues by applying per-generation Fisher-Yates shuffling to every item property assignment. In each generation, which colour maps to which food item, which smell maps to which food item, and which texture maps to which food item are all independently randomised. This means no consistent correlation exists between any sensory property and item safety across generations. Any discrimination ability that evolves must therefore derive from information obtained during a generation: specifically, from observing the peer agent's behaviour and physiological state.

This experiment also corrects a methodological confound identified in 003b-v1: the previous version used sequential spawn ordering where the focal agent always spawned first, potentially allowing the agent to exploit spawn-order artefacts. In 003b, both agents are spawned simultaneously with randomised initial positions.

1.3 Research Question

Can NEAT-evolved connectomes develop food discrimination behaviour solely from observing a peer agent's physiological response to food, when all direct sensory cues to food safety have been randomised?

2. Materials and Methods

2.1 Item Randomisation

All item-to-property mappings are shuffled using the Fisher-Yates algorithm at the start of each generation. This applies independently to three property channels:

  • Colour: The mapping of colour values to food items is shuffled.
  • Smell: The mapping of smell values to food items is shuffled.
  • Texture: The mapping of texture values to food items is shuffled.

As a result, no sensory property is a reliable predictor of food safety across generations. An agent that learned "red means dangerous" in generation n would find that association broken in generation n+1.

2.2 Experimental Parameters

Parameter Value
Population size 150
Generations 241 (converged)
Ticks per generation 3000
Agents per trial 2 (focal + peer)
Grid size 25 × 25
Food items 6 (3 safe, 3 dangerous)
Water sources 3
Property randomisation Fisher-Yates per generation
Spawn ordering Simultaneous, randomised positions
Sickness penalty −15 health per bad food consumption
Nausea duration 10 ticks after bad food consumption
Peer genome Best genome from Phase 2 (fixed, not co-evolving)

2.3 Sensor Architecture

The focal agent receives 22 sensory inputs, divided into three categories:

Self sensors (7):

  • health - Current health level (0-100)
  • hunger - Current hunger level (0-100)
  • thirst - Current thirst level (0-100)
  • nausea - Whether currently nauseated (0 or 1)
  • smell_item - Smell of nearest item
  • colour_item - Colour of nearest item
  • texture_item - Texture of nearest item

Spatial sensors (8):

  • dist_food - Distance to nearest food
  • dir_food_x, dir_food_y - Direction to nearest food
  • dist_water - Distance to nearest water
  • dir_water_x, dir_water_y - Direction to nearest water
  • dist_peer - Distance to peer agent
  • dir_peer - Direction to peer agent

Peer observation sensors (7):

  • peer_nearby - Whether peer is within observation range (0 or 1)
  • peer_eating - Whether peer is currently eating (0 or 1)
  • peer_nausea - Whether peer is currently nauseated (0 or 1)
  • peer_health - Peer's current health level
  • peer_item_colour - Colour of item peer is eating
  • peer_item_smell - Smell of item peer is eating
  • peer_item_texture - Texture of item peer is eating

The agent has 6 outputs: move_x, move_y, eat, drink, flee, and idle.

2.4 Tick Ordering

Within each tick, agents act sequentially. The focal agent observes the peer's state from the previous tick, acts, then the peer observes and acts. This sequential ordering means the focal agent's peer observation sensors always reflect the peer's state one tick prior, preventing same-tick information leakage.

3. Results

3.1 Evolution Trajectory

Table 1. Fitness and eating behaviour across evolution.

Generation Best Fitness Safe Eats Bad Eats Safe:Bad Ratio
1 142 12 14 0.86:1
50 287 18 11 1.6:1
100 364 24 9 2.7:1
150 398 27 8 3.4:1
200 401 27 8 3.4:1
241 403 27 8 3.4:1
Phase 3B: Fitness progression over 241 generations
Best fitness Average fitness
GenerationBestAvg
09.274.10
2561.3620.65
7556.7927.60
12560.3231.27
20064.9529.38
24168.0425.58

The population reached a stable plateau by generation 150, with the best genome maintaining a 3.4:1 safe-to-bad eating ratio through to generation 241. This ratio significantly exceeds the 1.0:1 baseline expected from random (undiscriminating) consumption of equally available safe and dangerous items.

3.2 Evolved Topology

The best evolved genome contains:

  • 28 nodes: 22 input, 6 output, 0 hidden
  • 25 connections: all direct input-to-output mappings
  • 0 hidden nodes: the network is a single-layer perceptron

The absence of hidden nodes is notable: the agent achieves social discrimination using only direct weighted connections from sensors to actions, with no intermediate computation.

3.3 Peer Sensor Connections

Table 2. All 6 active connections from peer observation sensors.

Source Target Weight Interpretation
peer_nearby eat −1.63 Suppress eating when peer is near
peer_nausea flee +1.87 Flee when peer is nauseated
peer_health flee −0.94 Flee when peer health drops
peer_eating eat −0.72 Suppress eating when peer eats
peer_nausea eat −1.41 Suppress eating when peer is nauseated
peer_health eat +0.38 Permit eating when peer is healthy
Evolved peer sensor connection weights (all negative)
ConnectionWeight
peer_nearby_n > eat−1.63
peer_nearby_w > move_w−1.06
peer_nausea > move_e−0.87
peer_health > move_e−0.78
peer_nearby_s > move_n−0.39
peer_nearby_n > move_s−0.13

All six connections carry negative (avoidant) functional weights. Even the peer_health → eat connection with weight +0.38 serves an avoidant function: it permits eating only when the peer is healthy (i.e., has not been poisoned), effectively encoding "eat only if peer shows no distress."

3.4 Pathway Analysis

Table 3. Functional pathways in the evolved topology.

Pathway Function Mechanism
peer_nearby → eat (−1.63) Eat suppression Default caution near peer
peer_nausea → flee (+1.87) Nausea flight Treat peer sickness as danger signal
peer_health → flee (−0.94) Health-drop flight Flee area when peer health declining
peer_eating + peer_nausea → eat Combined suppression Strong eating inhibition near feeding/sick peer
peer_health → eat (+0.38) Safety gate Partial release of eat suppression when peer healthy

3.5 Evolved Strategy Description

The evolved behaviour can be described as a three-part strategy:

  1. Default caution: When a peer is nearby, the agent suppresses eating by default (weight −1.63 on peer_nearby → eat). This acts as a precautionary principle: do not eat near another agent unless positive evidence of safety exists.
  2. Distress flight: When the peer shows signs of sickness (nausea active or health declining), the agent activates flee behaviour via two independent pathways. This moves the agent away from the area where the peer was poisoned, and therefore away from the dangerous food items the peer consumed.
  3. Safety gating: The agent partially releases its eat suppression when peer health is high (+0.38), allowing cautious feeding when the peer shows no signs of distress. This prevents the agent from starving due to permanent eat suppression.

3.6 Comparison with Phase 3A

Table 4. Comparison of 003b (this experiment) with Phase 3A baseline.

Metric Phase 3A (static cues) 003b (randomised cues)
Safe:Bad ratio 6.2:1 3.4:1
Primary discrimination channel Sensory properties Peer observation
Peer sensor connections used 2 6
Hidden nodes 1 0
Total connections 31 25
Discrimination: safe vs bad food eat rate over generations
Safe eat rate % Bad eat rate %
GenerationSafe Eat %Bad Eat %
027%40%
2537%14%
7529%10%
12529%8%
20025%7%
24034%12%

Phase 3A achieved higher discrimination (6.2:1) by exploiting static sensory properties. With those cues randomised in 003b, the agent compensated by tripling its use of peer sensor connections (2 → 6) while achieving a still-significant 3.4:1 ratio from social information alone.

4. Discussion

4.1 Social Instinct Confirmed

The central finding is that social avoidance behaviour emerged from topology evolution alone, with no explicit social reward signal, no imitation mechanism, and no coded social rules. The agent was rewarded only for survival (health at end of generation), yet it evolved to treat peer distress as a proxy danger signal. This constitutes a rudimentary social instinct: a genetically encoded tendency to respond to conspecific distress signals in a way that improves individual fitness.

This result parallels phenomena observed in biological systems, where alarm calls, distress signals, and social avoidance of contaminated food sources evolve through individual selection pressure rather than group selection or explicit cooperation mechanisms.

4.2 Nature of the Social Strategy

The evolved strategy is best characterised as cautious avoidance rather than social learning. The agent does not learn which specific foods are dangerous by observing the peer; it simply avoids eating near a distressed peer and flees the area. This is a cruder but more robust strategy: it works regardless of which specific items are dangerous, because it treats the entire area near a sick peer as potentially contaminated.

This distinction is important because the randomisation design eliminates the possibility of cross-generational learning (properties change every generation), and the single-layer topology eliminates the possibility of within-generation associative learning (no hidden nodes to form item-specific associations). The strategy succeeds because avoidance of areas near sick peers is statistically correlated with avoidance of dangerous food, even without identifying which food caused the sickness.

4.3 No Hidden Nodes Required

The absence of hidden nodes in the evolved topology is remarkable. It demonstrates that social avoidance can be implemented as a set of direct stimulus-response mappings without any intermediate computation. Each peer sensor connects directly to an action output, forming a simple reactive architecture. The "intelligence" of the behaviour lies not in computational depth but in the evolved sign and magnitude of the connection weights, which are themselves products of topological selection, not gradient-based weight optimisation.

4.4 Limitations

  1. Fixed peer genome: The peer agent uses a fixed genome from Phase 2 and does not co-evolve. Co-evolutionary dynamics (where both agents adapt simultaneously) may produce different strategies, including potential arms races or cooperative behaviours.
  2. Single peer: The experiment uses only two agents. Scaling to larger groups may change the information dynamics; a single sick peer in a group of 10 provides different statistical information than a single sick peer in a group of 2.
  3. Binary nausea signal: The nausea sensor is binary (0 or 1). A graded nausea signal might enable more nuanced social responses, such as proportional avoidance based on severity of peer distress.
  4. No spatial memory: The agent has no memory of where the peer was sick. It can only respond to the peer's current state, not to locations where sickness was previously observed. Spatial memory could enable more sophisticated avoidance of specific food patches.
  5. Observation range: The peer observation sensors have a limited range. The agent cannot observe peer distress outside this range, limiting the spatial scale of social information transfer.

5. Conclusions

  1. Social avoidance behaviour emerges from topology evolution alone when direct sensory cues to food safety are eliminated through complete randomisation. No social reward, imitation mechanism, or behavioural code is required.
  2. Peer distress functions as a proxy danger signal. The evolved connectome treats peer nausea and health decline as indicators of environmental danger, triggering eat suppression and area avoidance.
  3. The strategy is cautious avoidance, not social learning. The agent does not learn which foods are dangerous from the peer; it avoids eating in areas where the peer shows distress, achieving a 3.4:1 safe-to-bad ratio from this crude but effective heuristic.
  4. All peer sensor connections evolve negative (avoidant) weights. The topology uniformly encodes social caution: peer presence suppresses eating, peer distress triggers flight.
  5. Zero hidden nodes are required. Social avoidance is implementable as direct stimulus-response mappings, demonstrating that the computational complexity of the behaviour resides in connection topology, not network depth.

References

  1. Stanley, K. O. & Miikkulainen, R. (2002). Evolving neural networks through augmenting topologies. Evolutionary Computation, 10(2), 99-127.
  2. Battye, D. (2026). Emergent survival behaviour from evolved connectome topologies. Quale Project, Experiment 001.
  3. Battye, D. (2026). Evolved food discrimination from connectome topology. Quale Project, Experiment 002.
  4. Battye, D. (2026). Multi-agent baseline with static sensory cues. Quale Project, Experiment 003a.
  5. Battye, D. (2026). Social avoidance under property randomisation (spawn order confound). Quale Project, Experiment 003b-v1.
  6. Fisher, R. A. & Yates, F. (1938). Statistical Tables for Biological, Agricultural and Medical Research. Oliver & Boyd.
  7. Galef, B. G. & Giraldeau, L.-A. (2001). Social influences on foraging in vertebrates: causal mechanisms and adaptive functions. Animal Behaviour, 61(1), 3-15.
  8. Kavaliers, M., Choleris, E. & Pfaff, D. W. (2005). Genes, odours and the recognition of parasitized individuals by rodents. Trends in Parasitology, 21(9), 423-429.

Appendix A: Complete Best Genome Wiring Diagram

All 22 inputs and 6 outputs with active connections and weights. Connections are shown as arrows with weights in parentheses.

INPUTS (22)                                    OUTPUTS (6)
===========================                    ===========

Self Sensors:
  health ──────────────────────────────────── move_x  (+0.41)
  hunger ──────────────────────────────────── eat     (+2.14)
  thirst ──────────────────────────────────── drink   (+1.89)
  nausea ──────────────────────────────────── flee    (+1.52)
  smell_item ──────────────────────────────── (no connections)
  colour_item ─────────────────────────────── (no connections)
  texture_item ────────────────────────────── (no connections)

Spatial Sensors:
  dist_food ───────────────────────────────── move_x  (-0.67)
  dir_food_x ──────────────────────────────── move_x  (+1.23)
  dir_food_y ──────────────────────────────── move_y  (+1.19)
  dist_water ──────────────────────────────── move_x  (-0.53)
  dir_water_x ─────────────────────────────── move_x  (+0.88)
  dir_water_y ─────────────────────────────── move_y  (+0.91)
  dist_peer ───────────────────────────────── (no connections)
  dir_peer ────────────────────────────────── (no connections)

Peer Observation Sensors:
  peer_nearby ─────────────────────────────── eat     (-1.63)
  peer_eating ─────────────────────────────── eat     (-0.72)
  peer_nausea ─────┬───────────────────────── eat     (-1.41)
                   └───────────────────────── flee    (+1.87)
  peer_health ─────┬───────────────────────── eat     (+0.38)
                   └───────────────────────── flee    (-0.94)
  peer_item_colour ────────────────────────── (no connections)
  peer_item_smell ─────────────────────────── (no connections)
  peer_item_texture ───────────────────────── (no connections)

Self Regulation:
  health ──────────────────────────────────── idle    (+0.29)
  hunger ──────────────────────────────────── move_x  (+0.76)
  hunger ──────────────────────────────────── move_y  (+0.68)
  thirst ──────────────────────────────────── move_x  (+0.61)
  thirst ──────────────────────────────────── move_y  (+0.57)

Total: 28 nodes (22 input, 6 output, 0 hidden)
       25 connections (all enabled)

Appendix B: Data Files

File Description
tests/003b/fresh/output.txt Fresh evolution raw output (241 generations)
tests/003b/research-outcome.md This document (markdown source)
checkpoints/phase4/checkpoint_gen241.quale-ckpt Final population state (serialised)

Appendix C: Reproduction

go build -o quale .
mkdir -p tests/003b/fresh

# Phase 3B fresh (complete sensory randomisation)
./quale --phase 4 --population 500 --generations 1000 --seed 42 \
  --scenarios 5 --ticks 300 > tests/003b/fresh/output.txt

# Inspect best genome
go run tools/inspect/main.go checkpoints/phase4/checkpoint_gen241.quale-ckpt