Creating a suitable score/fitness function for genetic neural networks

I have created a neural network that sword fights using classic linked swords, now I am at the stage of training it however I can’t come up with a good score function. I’ve tried these already:

  • 2+ score per kill, -1 on death, -10 if their score is 0 i.e. they didn’t fight
  • Subtract a small amount every frame where they are more than 12 studs away and they activate their sword (promotes only activating sword when near an enemy), and if the distance is less than 12, add a small amount each frame, and add score based on how high velocity is

Some other things to note about my set up:

  • Running 100 generations of population 75
  • Each generation is 15 seconds
  • The lowest 50% of scores are killed (10% are randomly spared)
  • Crossing over 60% of the best scorer to some of the others
  • Mutating 10%

Have you considered doing online learning when they take damage? I do like your methods already though.

give them the ability to run away, stare at enemies or look at an angle for more reach, to equip swords and to jump