AI choose target

fix some thread-like problem