lichess.org
Donate

David's Chess Journey - Installment 37

Bringing AI Into the Journey - An Iterative Process

Exploring AI in My Game Analysis

Last week I did a separate post that outlined my initial thoughts about AI and an adult learner's chess journey. Ever since that post I have been exploring the technology and working it into my game evaluation process. This has meant I played much fewer games this month and spent a bunch more time analyzing my own games.

The ChatGPT model is far from perfect. In about 1/2 the games, it just loses the thread of the game by citing the wrong move or the wrong pieces involved in the move. That is not entirely unsurprising. However, the technology is also very impressive and can deliver some remarkable results. Here is my process to this point - it is early days and my GPT has just started its training.

Initial Thoughts on Process

  1. Create a GPT in ChatGPT and train it on all things chess. Spend some time here and focus on positional and tactical knowledge.
  2. Create a Lichess Study (here is my AI study)
  3. Play a game (I like 15+10 for my level)
  4. Copy the game URL into the Lichess Study
  5. Enter the first prompt into your GPT
    1. Here is my first prompt (you can obviously make improvements and tailor to your level)
      1. "Write a move by move annotation in the style of Mikhail Tal from the following game from the perspective of both sides that is targeted to a player with a Lichess 1700 Rapid rating with important tactical and positional takeaways and insights. Don't assume basic concepts and explain them in words evidencing the deep knowledge of a grandmaster and the communication skills of a grandmaster who can communicate very deep and complex concepts is ways that are easily understandable. Periodically provide an evaluation of the game when there are significant shifts in the evaluation.."
  6. Copy the PGN from the chapter of your Lichess study for the game you want your GPT to analyze.
  7. Past the PGN at the end of your first prompt.
  8. Run the GPT.
  9. Once it is done running, that will give you the first draft of the annotation.
  10. Enter your second prompt into the GPT to refine the analysis.
    1. Here is my second prompt:
      1. "Add glyphs to note key moves and add more thorough instructive annotations explaining the moves. Please make sure to accurately track the moves and don’t confuse the pieces on the board throughout the game as this continues to happen periodically in the annotations."
  11. Run the GPT
  12. Once it is done running, that will give you the second draft of the annotation.
  13. Enter your third prompt into the GPT to further refine the analysis.
    1. Here is my third prompt:
      1. "I would like longer and more instructive annotation on each of the moves - the narratives still too short. Write from the perspective of a grandmaster chess coach who has a passion for the game and is trying to help his or her student grow to their maximum potential as a chess player, to learn the beauty of the game and the concepts and knowledge that is currently absent from their student’s game."
  14. Run the GPT
  15. Once it is done running, that will give you the third draft of the annotation.
  16. Enter your fourth prompt into the GPT to further refine the analysis.
    1. Here is my fourth prompt:
      1. "Add more and deeper analysis. As you do, please go back through and make sure all of the annotations reflect the correct moves and the correct pieces at all times. Continue to train your spatial and board awareness. Highlight in the annotations when there is a very good illustration of a Fine principle or one of Silman’s imbalances. This shouldn’t dominate the analysis – but simply enhance it. At several points, highlight in the annotations how a change in thinking/playing in particular points will help the players get to the next level in their chess journey."
  17. Once it is one running, that will give you the final draft of the annotation (of course, you can go through as many iterations as you want).
  18. Copy the final version of the annotations in a Word document entitled something like AI Game Analysis and save it somewhere you will recall.
  19. Then add a fifth prompt regarding the development of variations:
    1. "Please annotate instructive variations that were not played in the game, but help illustrate key chess concepts and principles."
  20. Once you run that prompt, you will have a list of numerous variations that you can explore in the analysis.
  21. Have the Word document and the Lichess study open side by side and layer in the annotations to the extent they are helpful as you click through the game in your study. I like to do the variations after I've walked through the initial annotations of the moves played on the board.

I hope that helps! I will continue to refine the process and the prompts - that is where the magic is in this space for sure. I suppose someone might react that simply reviewing an AI analysis is too passive. I think there is some validity to that notion, but here are two counterpoints: (1) you are always engaged because you are checking to see if the AI has lost its way (as it frequently does) - so you are always reading with a dash of skepticism, testing what you read against what you know and (2) this is like reading a Chernov chess book, but the games are yours and you have an active process in the content creation.

Here is the best annotation to date. My guess is that the annotations will be more helpful to beginners like me than more advanced players, but that still leaves a ton of potential for this tech to help most chess players out there!

https://lichess.org/study/Zq7QGOrK/wuKwHeLx

Stats for the Week

As I noted, my game volume has gone significantly down this week given my exploration of injecting Generative AI into my game analysis. With that said, here are the stats:

  • Total Games: 34
  • Wins: 15
  • Losses: 14
  • Draws: 5

Using Generative AI, here are the insights, trends and actionable advice from all of my games this week. To get these insights I downloaded my games for the week and fed the PGN into ChatGPT with the following prompt:

  • Identify key trends from the chess games below from this week for Chessdad1979 targeted at my current Lichess rating. What did I do well this week? What did I do poorly? What can I improve upon? What should I do to make such improvements?

Pretty amazing to me!

Key Trends From This Weeks Play

  1. Opening Play:
    • Strengths: Your opening play shows consistency, particularly with the English Opening (1. c4) as White and a reliable Caro-Kann Defense as Black. You often secure reasonable positions out of the opening, showcasing knowledge of common setups.
    • Weaknesses: In some games, you struggled with pawn structure and piece coordination, such as overextending with pawn moves (e.g., early pawn breaks or miscalculations) that led to weaknesses.
  2. Tactical Awareness:
    • Strengths: You have good tactical awareness, often finding opportunities to capitalize on opponents' blunders, such as winning pieces or securing a decisive attack. For example, your win against "BidnsCerebralCortex" demonstrated strong tactical play.
    • Weaknesses: Several losses were due to tactical oversights, particularly missing opponent threats or combinations that exploited weaknesses (e.g., game vs. "MlCEL" where you lost material due to a tactical miscalculation).
  3. Endgame Play:
    • Strengths: You have shown solid endgame technique when ahead, converting advantageous positions into wins. Your game against "BidnsCerebralCortex" is a good example of this.
    • Weaknesses: Endgames became problematic in cases where your pieces were uncoordinated or your pawn structure was compromised, resulting in losses even from equal or better positions (e.g., games vs. "Chessdad1979" and "HDR34_a").
  4. Positional Understanding:
    • Strengths: Your positional play is generally good, particularly in complex middlegame situations where you build pressure effectively.
    • Weaknesses: However, some losses occurred due to poor strategic decisions, like weakening your pawn structure or neglecting key squares, leading to passive positions or allowing counterplay (e.g., game vs. "Scacco75").

Areas for Improvement

  1. Avoiding Tactical Oversights:
    • Issue: You tend to miss some tactical threats, especially in critical moments.
    • Improvement Strategy: Engage in regular tactical puzzles, focusing on defensive tactics (avoiding traps, recognizing threats) and calculation exercises to build awareness.
  2. Improving Pawn Structure Management:
    • Issue: Weak pawns or overextended pawn structures have cost you key games.
    • Improvement Strategy: Review pawn structure principles, particularly in your openings. Focus on understanding when to push pawns and how to create a strong, flexible pawn formation.
  3. Endgame Technique:
    • Issue: Endgames can be inconsistent, especially in converting small advantages or holding draws.
    • Improvement Strategy: Study key endgame positions, such as king and pawn vs. king or rook endgames. Practice by solving endgame studies and playing endgames against the engine with a slight disadvantage to improve defensive play.

Actionable Recommendations

  • Tactical Training: Dedicate 10-15 minutes daily to tactical puzzles, emphasizing patterns that have caused recent losses, like pins, forks, and skewers.
  • Opening Review: Analyze common lines in your preferred openings to refine your understanding, focusing on reducing pawn structure weaknesses and improving piece coordination.
  • Endgame Studies: Regularly practice key endgame scenarios, using tools like Lichess' Endgame Trainer to sharpen technique, especially in rook and pawn endgames.
  • Game Review: After each game, use Lichess’ analysis tool to identify missed tactics or strategic errors. Focus on understanding the root cause of the mistake to avoid repetition.

Until the next installment!