mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 02:13:35 +02:00
Support for breeding
One party initiates the breeding; the other party exerts most of the energy if its breeding key matches. It is that party's responsibility to set up the newborn agent's connection (but the father can pass it an arbitrary message). Newborn is spawned immediately but can be renegotiated on first connect.
This commit is contained in:
parent
b693b5d6f4
commit
23f2fce7ff
6 changed files with 100 additions and 9 deletions
4
world.h
4
world.h
|
@ -9,6 +9,8 @@ struct world {
|
|||
const static int move_cost = -50;
|
||||
const static int attack_cost = -400;
|
||||
const static int defense_cost = -200;
|
||||
const static int breed_out_cost = -newborn_energy/4;
|
||||
const static int breed_in_cost = -newborn_energy*3/4;
|
||||
const static int pheromone_cost = -10;
|
||||
|
||||
const static int move_idle_cost = -15; /* ... * attr.move */
|
||||
|
@ -24,6 +26,8 @@ struct world {
|
|||
const static int herb_rate = 15; /* initially, one herb per herb_rate tiles */
|
||||
const static double herb_phintensity = 1.0;
|
||||
|
||||
const static long breeding_kappa = 10000;
|
||||
|
||||
const static double phseep_alpha = 0.1;
|
||||
const static double phseep_beta = 0.05;
|
||||
const static double phdecay_gamma = 0.95;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue