AI tweaks, winner and invalid card loop fix