Because I'm too lazy to make a stackexchange account, and there's plenty of programmers here.
So, I'm working on a football game, where the players are boids. I've tried manually writing a function for intercepting a ball, and it works fine most of the time, but there's still too many cases where a player misses the ball he should've easily intercepted. I was too lazy to do proper math, so I decided that this looks like a job for a neural network. I wrote an implementation of NEAT, and it does manage to train to consistently pick up the ball, but it does so in a terrible way. Namely it just sets target along the four diagonals, and travels along one until either the x or the y coordinate match the ball, and then proceeds to alternate between the two diagonals adjanced to the cardinal direction in which the ball is, and thus move towards the ball (the goal direction flips pretty fast so it doesn't deviate that much from the straight line to the ball). I consistently get this behavior in ~30 generation with a population of 300. I've tried scoring time to pick up the ball (distance to ball if it's not picked up by simulation's end) and closest distance to ball throughout the simulation. For outputs I've tried just target coordinates (offset from player's position), and target coordinates plus target speed (in previous case the boid always tried to move at max speed). For inputs I've tried just relative ball position and I've tried relative position and relative speed. No matter what, I always get the same results. Has anyone here had similar problems, and if yes can you tell me what's causing it and how to fix it?