In the middle of refactoring flocking in trainer.