changed AI to be located in the individual entity threads