Added AI option and logic