AI optimization

Good Luck Implementing!
Making AI on a separate thread is a huge work to do.
Go for it!