Trying to implement a smarter AI