Massively increased performance by tweaking getRandomAgent