Added AI code but disabled it since it doesn't work well enough