A question out of curiosity., When the AI builds watchtowers is it hard coded in them to place them Strategically or just plain random?

Thanks!