preload

What testers can learn from playing chess

Posted by Albert Gareev on May 08, 2013 | Categories: Notes

(If they haven’t learnt that from doing testing)

This is another my notebook entry, but entry unusual. I started it while playing chess.

This is also one of the proud parent moments: my 9 years old son brought this initiative of evening chess parties – all by himself!
As much as we, parents, try to protect and guide our children, we also try to develop them self-driven and self-sustainable – and that’s not easy, you know.

A couple of years ago my dad introduced chess to my son, and the three of us had some quality time learning about this game. But it didn’t stick that time.
Then this winter my son asked me to help installing chess game on his tablet, and I saw him playing it now and then, along with arcades, shooters, and other typical for his age games.
And suddenly my son approaches me, saying that he is one of the best in the school’s chess club, and he wants to get even better by playing regularly with me. He asks me to dedicate time for regular evening sessions and promises to help more with household stuff to help freeing up time.
Well, that’s exactly the moment of feeling proud of your child, and having real confirmation that you’re doing a good job as a parent.

More to say, it’s been over a month since we started playing regularly, lots of losses for my son, and he is still persistent and strong spirited about the game.

Now, here are the connections with testing.

Have a strategy, and be ready  to change it

It is about goals, not “steps to perform”

Winning the party is an ultimate goal, which is reached by series of small wins (mixed with some losses, possibly) through the party. No one can prescribe a sequence of moves to win the game.

Know the context

You need to know what kind of game you play: modern chess, hexagonal chess, xiangqi, shogi, or chaturanga. Think it’s an edge case example? It should be assumed “normal”, modern chess? Well, do you know all Laws of Chess?

Requirements cannot cover everything

If you clicked the link above,  this is what you’d see first on the page.

The Laws of Chess cannot cover all possible situations that may arise during a game, nor can they regulate all administrative questions. Where cases are not precisely regulated by an Article of the Laws, it should be possible to reach a correct decision by studying analogous situations which are discussed in the Laws. The Laws assume that arbiters have the necessary competence, sound judgment and absolute objectivity. Too detailed a rule might deprive the arbiter of his freedom of judgment and thus prevent him from finding the solution to a problem dictated by fairness, logic and special factors.

Too detailed rules might cause damage, having a freedom of judgment is critical

Continuing with citation above: not only requirements and rules cannot regulate everything, if they try to do so, they begin an obstacle in finding solutions and moving towards goals.

Instead, context-specific, experience-based solutions – heuristics – should be thoughtfully applied for finding a solution.

Know who you are playing with

Every player has his own style. Knowing it helps to win. Studying it helps to know :)

Know your stakeholders! Their interests, their style, their goals. Knowing that you can shape your own tasks and actions in order to reach your goals and the big common goal.

Know how to estimate and budget your time

There is a whole set of rules on Chess Clock. The core idea: you cannot think unlimited time; you must act.

We’re on the clock in testing as well. Thinking too long ends up in being too late. Additionally, we never have a complete awareness of the situation.

Game Tactics

Is there a problem?

Whenever a move on the chessboard happens, players assess the new information. Where it leads? What is the threat?

Whenever testers discover a new piece of information about the product, “is there are problem?”, – they ask themselves.

There are no single best strategy, but there are good tactical moves

These moves come from the experience. Tarrasch rule, Lucena position, Sicilian Defence… These moves are usually right thing to do, but not always. There are exceptions. There could be better moves.

What this reminds of?  Heuristics, again.

Recording moves

1. e4 e5 2. Qh5?! Nc6 3. Bc4 Nf6?? 4. Qxf7# 1–0

Recording moves is common practice in chess. It has very well developed notation.

Sadly, in testing it’s often replaced by following a pre-recorded testing steps. But even such conservative tools like HP QC now offer additional capabilities for run-time note taking.

Game Analysis

“In chess, analyzing your games is a main task in your training toward mastery.” – This is a quote from article “A hardcore guide to analyze your chess games in 12 steps“. I’ve just found it by googling “chess game analysis”. And you know what? It’s so amazing, it just all applies to testing with minimum words replaced.

Why should we analyze our games?

Because…

A- We can compare our decisions against concrete evidence.

B- We can look deep inside our thought processes.

C- If done correctly, we will learn about the openings we play, the structures presented in those openings, and the endgames that we never had a chance to practice. If the analysis is completed new ideas will appear and you will know a little more about yourself when started.

D- When you analyze your games properly, all your mistakes come to the surface (knowledge, mental processes, recurring errors, etc.), and you will be one step further towards correcting them. The sweat you spend analyzing is worth its weight in gold.

The guidelines for analyzing your chess games

1. Write down the time spent in the game on every move as you play.
2. During the game create code signs on your score sheet to point out the critical moments of the game.
3. Immediately after the game, write down what you remember from the game.
4. Write at least three things you learned from the game you just completed
5. (IMPORTANT!) Identify the critical moments of the game …
6. After establishing the critical points, you can begin to analyze them.
7. Check opening theory
8. Positional patterns searching.
9. Analyze the game by yourself (and know when to use programs…)
10. Reports and diagnostics.
11. Publish your analysis.
12. Time to wrap up and verbalize the acquired knowledge.

Each rule has explaining paragraph in the article. It’s worth reading, believe me.

A closing note

With all “testing vs. checking” debates occurring and reoccurring, one might ask how far my analogy goes. After all, computers can play chess, and can do it pretty well. So, isn’t it a proof that testing can be completely automated, and tester-machine will beat even a master human tester?

My answer here is to consider a few major factors.

Artificially limited vs. unlimited and evolving context.

Even though quite complex, Chess is a very formalized and 100% predictable game. There is huge, but finite set of combinations of moves, which can be won through a computing power, similarly to brute force password hacking.

Even tiniest software development project will be undoubtedly more complex context, with ever changing rules, which also can and will be broken from time to time.

There is no way the machines can win by evolving in this direction.

Machines are unable to learn, so far.

In the famous “Deep Blue versus Garry Kasparov” match the whole team of engineers was working in between of the games, adjusting and improving its algorithms. Moreover, the grandmaster himself helped them to tune up the machine.

It’s not really the machine’s victory, but rather a triumph of engineering thought.

However, there is limited progress in this direction. Chess programs now use heuristic algorithms, dynamic algorithms, try to “remember and guess” opponent’s moves.

Theoretically, for a quite simple testing context such a tester-machine can be created, and, supported by a team of highly paid software engineers (programmers and testers) will be able to perform its testing duties at acceptable level. Wait! Wouldn’t be faster and cheaper ask those pro testers to provide test results? :)

The SkyNet factor.

Given that human may create machine-based artificial intelligence one day, it’s quite possible that it won’t be interested playing chess, but would want to win over the entire humanity.


  • One response to "What testers can learn from playing chess"

  • Kobe Bryant
    13th September 2013 at 22:47

    Chess is great, and you will love it if you will learn more about it. To improve at chess you need to study endgames, tactics and strategy. You can learn these from books. Just playing chess is not enough to improve your game, you need to study chess.

Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This work by Albert Gareev is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported.