Pretty well working AI