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:
Petr Baudis 2011-12-08 03:14:57 +01:00
parent b693b5d6f4
commit 23f2fce7ff
6 changed files with 100 additions and 9 deletions

View file

@ -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;