and has 0 comments

  So you've been watching someone on YouTube DESTROYING their opposition (note that my use of capitalization and over the top language is ironic here. All this post needed was me making an O face in a picture with a fire background) and you tried to do it, but you just failed miserably. You watch the videos again and again, vaguely remember some lines and it doesn't matter anyway because your opponents play something else than you had prepared for. What to do?

  Well, it's easy with the LiChess Tools browser extension, in 10 easy steps! (again, irony)

Step 0: install the LiChess Tools extension on your Chrome/Brave/Edge/Kiwi/Any other chromium browser.

Step 1: go to and export the games of your idol

  • make sure you check the box for Opening, you will need it later


Step 2: remove all the moves after a certain depth, since you want to learn theory

  • this can be done using regular expression search and replace in a decent text editor like Notepad++ (here is a pattern to select all moves after depth 20: 21\.\s+.*?$ which you can replace with nothing)
  • Note that regular expressions look daunting, but are very simple in what they do. The one above looks for 21, a dot, some spaces, then gets everything until the end of the string. If you remove this, you get with the first 20 moves, since lichess exports games as one line.

Step 3: select all the games with required opening

  • again this can be done using regular expressions. Here is a pattern for "Elephant Gambit" games : (\[\w+\s+"[^"]*"\][\s]*)+(\[\w+\s+"Elephant Gambit*"\][\s]*)+(\[\w+\s+"[^"]*"\][\s]*)*\s*1\.\s+.*?$ 
  • Notepad++ has a nice feature of marking all matches and then copying them wholesale (Note that when you copy them, the matches will be separated by four dashes ---- which you will need to remove, just search and replace)
  • the reason I am using the PGN opening name to find what I am interested in is transpositions. Also it makes for easier regular expression patterns. However you can use any search pattern, for example the exact move order to get a position. Just remember that any brackets and dot are special characters in regular expressions, so you have to escape them with a backslash. Example: . (dot) means any character in regular expressions, but \. means an actual dot. 

Step 4: go to Analysis and copy paste the games there and import them

  • the enhanced import functionality that will merge multiple games will only work if you install LiChess Tools
  • there might be an error that there are too many PGN moves. In that case, try to import less games (less than 100 usually). This will generate a merged PGN which you then can merge with the other merged PGNs. Anyway, there will always be a maximum move limit imposed by the limitation of lichess
    • the limitation for number of PGNs has been removed in v1.7.4, although I just tried it with about 1000 PGNs (25000 moves!) and the site moves kind of slow. I suggest moderation :)

Step 5: transform the analysis with all the moves into a study


Step 6: examine moves and delete everything after obvious blunders (like hanging pieces)

Step 7: examine moves and remove transpositions, if any

  • transpositions can only be detected after installing LiChess Tools: they will appear highlighted when one of them is the currently selected move

Step 8: examine moves and add glyphs to them (good move, mistake, blunder, etc)

Step 9: edit the chapter and set it to Interactive Lesson


And you're done! All you have to do now is hit the Preview button and play as your favorite chess player. Note that the functionality to play all variations of a PGN is only available, you guessed it, if you install the LiChess Tools browser extension. The glyphs now come in handy, because you see when you are making a mistake or not or when the opponent does it.

Play to the end of a variation, trying to guess what they would play in that position, then exit Preview, mark the ending move with a comment, perhaps an evaluation. Go back in the tree of moves until you get to the first branching and cite the game that was imported from the game explorer window. You do that by clicking the game and choosing the Cite option. Then play again. And again.

Soon you will start to anticipate the style of your preferred chess master and play the same moves. When that happens, go back to the battle field and kick ass!

As an example, you can check out my own study which imports all Jonathan Schrantz (zolpi) Elephant Gambit games: Zolpi's Elephant Gambit , a PGN with 3292 moves from 114 games. I've also added a chapter with only the wins, so you can learn the good moves only :)

That's all! Let me know if you found this use case... well... useful.


Be the first to post a comment

Post a comment