This thought came to me because I was thinking about conditional universal consistency: many years ago, I wrote some algorithms to play the game of Matching Pennies (you guess which hand I'm hiding the penny in) based on the opponent's pattern of play. I still have the web page I wrote that uses JavaScript to make the guesses (I wasn't able to get friends to play it very much: I required the player to make 50 guesses, which I considered the minimum number to get the benefit of spotting patterns in their play, and they found it too boring: also, it didn't take long to find ways to beat my algorithm). I compared multiple algorithms, and what I found was that conditional universal consistency wasn't just the best algorithm I looked at - it absolutely thrashed all the other algorithms!
To be able to use this algorithm to guess an opponent's move, we need to find a way to classify their moves - so that's what this is really about: how would we go about classifying an opponent's moves in chess? Would it even be possible to do this without building a sophisticated model of their move selection process - which might not be possible because our sample size of their games would be too small (mathematically: number of variables too large for the sample data size)?
To be honest, I'm really thinking about non-chess projects for this - but in theory it absolutely could be applied to chess (though re-reading what I've written here, I think I might just have answered my own question!).
In case anyone is not familiar with conditional universal consistency, I've asked Gemini to describe it for you (I searched for explanations online, but IMO Gemini's is better. Unfortunately, Gemini's beautiful layout of this answer is lost here - but you've got the text):
Gemini wrote:In essence, CUC is a desirable property of learning algorithms (or strategies) used in repeated decision-making scenarios. Imagine a player who repeatedly faces an opponent (or a complex environment) whose behavior is unknown and potentially changing over time. A learning algorithm with CUC has the remarkable ability to:
Adapt and Learn: Figure out the patterns and regularities in the opponent's behavior.
Perform Optimally (Conditionally): Achieve a payoff that is almost as good as if the player knew the true probabilities of the opponent's actions given specific "conditions" or categories of past observations.
How Does It Work?
Categorization: The CUC algorithm divides the history of observed actions and outcomes into different categories or "bins." These categories might be based on patterns, recent history, or other relevant features.
Fictitious Play within Categories: Within each category, the algorithm essentially simulates a game of "fictitious play." This means it tries to predict the opponent's next move based on the frequency of their past actions within that category.
Randomization and Adaptation: To avoid being predictable and exploitable, the CUC algorithm introduces some randomness into its own choices. It also adapts its strategy over time based on new observations and the success or failure of its past decisions.
Why CUC Matters
Robustness: CUC algorithms are robust to changes in the opponent's behavior. They can quickly adapt to new patterns and maintain good performance even in uncertain and dynamic environments.
Theoretical Guarantee: CUC provides a strong theoretical guarantee. It assures that, in the long run, the player's average payoff will be close to optimal, conditional on the information captured by the categorization scheme.
Wide Applicability: The CUC concept is applicable to a variety of settings, including game theory, online learning, and decision-making under uncertainty.
Key Points to Note
Categorization is Key: The effectiveness of a CUC algorithm depends heavily on how well it categorizes the observed history. A good categorization scheme captures the relevant regularities in the opponent's behavior.
Not Always Perfect: While CUC guarantees good performance in the long run, it doesn't mean the algorithm will always make the best decision in every single round. There might be some initial learning and adjustment periods.