Javascript boid controllers for autonomous character movement