When sensing defeat in a match against a skilled chess bot, advanced models sometimes hack their opponent, a study found.