Herding / flocking via GeneSociability (boids)

Social species (deer 0.8, wolf 0.6, chicken 0.55, boar 0.3) now school together:
AnimalDecisionSystem scans nearby same-species neighbours (HerdScan) and, when
wandering, a lone social animal steers toward the herd centroid (cohesion) while
close members just mill about (separation). "Safety in numbers" shrinks the
threat-detection radius in a group, so herded prey are calmer and scatter less.
Asocial animals (sociability < 0.3) keep the old random wander. GeneSociability
+ trait; `animal` console prints insulation/sociability. Build + --check-content
clean (42 genes, 41 traits). Not GUI-verified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-06-14 17:02:28 +03:00
co-authored by Claude Opus 4.8
parent 5ac34f4dc7
commit c0822de650
5 changed files with 106 additions and 10 deletions
+8 -4
View File
@@ -31,7 +31,8 @@
"GeneGestationDays": 30,
"GeneLitterSize": 1,
"GeneHerbivory": 1.0,
"GeneToxinTolerance": 0.1
"GeneToxinTolerance": 0.1,
"GeneSociability": 0.8
}
},
@@ -64,7 +65,8 @@
"GeneBreedingSeason": 3,
"GeneGestationDays": 35,
"GeneLitterSize": 4,
"GeneCarnivory": 1.0
"GeneCarnivory": 1.0,
"GeneSociability": 0.6
}
},
@@ -99,7 +101,8 @@
"GeneHerbivory": 0.4,
"GeneCarnivory": 0.2,
"GeneOmnivory": 0.85,
"GeneToxinTolerance": 0.25
"GeneToxinTolerance": 0.25,
"GeneSociability": 0.3
}
},
@@ -129,7 +132,8 @@
"GeneLitterSize": 6,
"GeneHerbivory": 0.8,
"GeneToxinTolerance": 0.15,
"GeneEggLaying": 1.0
"GeneEggLaying": 1.0,
"GeneSociability": 0.55
}
}
]