davidrmiller / biosim4

Biological evolution simulator
Other
3.1k stars 435 forks source link

Kill doesn't work #96

Closed Sarkilo closed 8 months ago

Sarkilo commented 8 months ago

I changed "killEnable" to true in biosim4.ini, put "KILL_FORWARD" before "NUM_ACTION", compiled it, and the things in the simulation doesn't kill each other and while it's running there is no kill action listed in actions

davidrmiller commented 8 months ago

Hi @Sarkilo, sorry you're having problems with the "kill" feature. I'm afraid I can't reproduce the problem, so we might need more information about your environment. Here is what I tried just now:

On a fresh install of Linux Mint 21 (equivalent to Ubuntu 22.04), I cloned the biosim4 repository, installed the dependencies as described in the README, and used "make" to compile a Debug version. I verified that it worked as expected with the default biosim4.ini file. The average number of survivors after gen 0 was about 750 and increased in subsequent generations. Then I modified biosim4.ini and src/sensors-actions.h as you described, executed make again, and ran the program. The output in stdout reported that the kill neuron was found in about two-thirds of the initial gen-0 population:

Actions in use:
  2371 - move X
  2420 - move Y
. . .
  1817 - move reverse
  1935 - kill fwd   <------

And the average number of survivors after gen 0 dropped to around 480 and decreased over subsequent generations. The sample genomes in the output also showed that the kill neuron was actually wired up:

. . .
Ly MvY 10792
N1 Klf -22965   <-----
N3 Res -14932
. . .

So, what could we be doing differently?

Sarkilo commented 8 months ago

For everyone in the future i just used cmake command instead of make and now it works