The world’s leading publication for data science, AI, and ML professionals.

Why You Should Play Chess

What Chess Teaches Us About Data Science

Data Science – Opinion

As I’m sure was the case for many viewers, the recent Netflix hit "The Queen’s Gambit" rekindled my interest in Chess. I remember fondly the many after school sessions of my grandpa teaching and beating me until I could squeak out a win by playing unorthodox, and probably terrible, moves. But as I grew up, I moved on, and a single elementary school tournament remains my only competitive experience with chess.


After logging into Lichess for the first time a month ago, I was hooked again. The balance of long-term strategy, short-term gain, problem solving, and pattern recognition has made chess incredibly engaging for the past 1500 years!

What’s more is that after recently graduating from a data science program, I saw strong similarities between chess and data science. And as I played in my spare time to relax after long days of coding, presentations, and job searching I found myself appreciating these shared qualities.


Problem Solving

Data science is all about solving problems. It’s why companies are willing to build teams of expensive tech professionals and build custom software or models. These problems can range from detecting fraud, to optimizing a process or an ad campaign, to combating bias in facial recognition models.

These problems are difficult because there is no clear, obvious path. In chess, there is the obvious problem of "win the game", but also smaller problems to be solved in service of that larger goal. How do I develop my knight? Can I get away with pushing this pawn? Should I castle this turn or keep developing?

Chess requires that you weigh your available options, generate some pros and cons, and follow through on your plan.

If our plan is to control the center e5 square, should we trade some minor pieces with Ne5? Take the pawn on c5? Or pin the knight on c6 with our light-squared bishop?


Remaining Flexible and Patient

Just as it’s important to have a plan and to follow through, chess is not a cooperative game! Your opponent has their own plan to win! They will likely introduce serious obstacles to your plan that forces you to overcome or change plans. If you refuse to change, your opponent could easily identify your plan, adjust accordingly, and punish you for your inflexibility.

I strongly believe that patience and flexibility are two overlooked soft skills that all data scientists should possess. We will never have all the data or information we need to build a perfect process or model, and new stipulations or client-requested features could throw a spanner in the works! It’s important to recognize that our end goal hasn’t changed, just the journey we’ll have to take. You must remain patient, incorporate the new information, reorganize, and visualize a new plan.

So maybe we’re using this well-known tactic of forking the king and rook with Nc7 while protected by our bishop. But instead of Nc6 our opponent plays Na6, protecting his pawn on c7 and disrupting our plan. Now what? Well we adjust, form a new plan, and keep developing.


The Value of Creativity

Data science is, by definition, an analytic endeavor. We are analyzing huge amounts of data and generating new insights in service of our target problem. But that doesn’t mean that Creativity is not required! The fastest route between two points is not always a straight line (I mean, mathematically it is, but not in reality)! As I mentioned earlier, we may have to change our plan, but how we do so has implications, too.

If we only ever follow traditional lines of thinking, we’ll never discover something new! And what’s more is that creativity tends to beget more creativity – "yes, and…", if you will – because when you throw out one "rule" you might as well throw them all out. While this can often be scary because you don’t have the same experience, you’ll definitely learn something, unlike if you were to "stay the course".

Take the Crab Opening, for example. It eschews all traditional opening principles (take the center, develop minor pieces, castle, attack) for a novel, unexpected strategy that will take your opponent by surprise!


Win or Lose – Learn

Failure is inevitable. This sounds like quite the pessimistic statement, but it shouldn’t be! To fail is to learn. And adopting this mindset will go a long way toward being successful in the long run and being resilient when presented with obstacles or failure. In Data Science, this is epitomized by training neural networks. They make predictions, often quite poorly at first, then adjust weights and try again. We should all be like neural networks (and we are, because they are modeled after our brains, after all).

In chess, you’ll fail constantly, too. You’ll misplay, misinterpret, or misclick. And if you’re playing on a website with balanced matchmaking then you’ll always be playing opponents at your skill level. And this means you’ll likely lose 40–50% of your games! And you don’t just give up, right? You learn and you study and you try again. It’s just as easy to be discouraged by a streak of losses as it is failing to push 90% accuracy on a model to 92%. What’s important is that you keep learning.


Conclusion

I hope this article has convinced you to try out some chess, even if you haven’t played in years. I promise you won’t be disappointed. And hopefully you apply these lessons on and off the board. I think you will find them useful for approaching setbacks, continuing to learn, and finding success in your long-term plans.

For full disclosure, I’m a beginner (~1200 rating on Lichess), but I’m always up for a game!


Connect

I’m always looking to connect and explore other projects!

LinkedIn | Medium | GitHub


Related Articles