Some actual AI, works much better than last version.