I am creating a set of chess positions to be used [as a data set] for a project. It's based on supervised machine learning, but I need to have labeled data (see more italicized text below) before any machine learning can be done. I wish to label each position as open or closed or possibly some combination of the two.

I started out with assigning each position to just "open" or "closed," but this wasn't clear for a lot of the positions. Then I decided to go with a third label, semi-open/semi-closed, which is like the middle and in between open and closed. I’ve labeled most of the positions, but there are many positions that I still haven’t comfortably labeled with a distinct class.

I know that open positions are characterized as having pawnless ranks, files, and diagonals, while closed positions have them clogged up with pawns. In open positions you can usually centralize your pieces, while closed positions give you a hard time moving an arbitrary piece to a random location on the board. There are many other related patterns, features, and qualities.

I can easily go with my gut feeling when assigning "closed" to a position that has 7 pawns on each side with each pawn blockading another, and "open" to a position that has pawns only on the flanks and in their starting squares. However, it's hard for me to classify some positions such as these two examples:

[White "Position1"]
[Black "Open/Semi/Closed/Etc"]
[FEN "8/5Qpk/p6p/P1b5/4pPn1/2Pp3P/1P1BbqP1/R3R2K w - - 0 1 "]

[White "Position2"]
[Black "Open/Semi/Closed/Etc"]
[FEN "3r1rk1/pp2pp1p/2p3pb/2P5/4P3/4nNPb/PP2P2P/R1RNK2B w - - 0 1 "]

What would you assign to the examples above and why? For example: one position is more open than the other due to characteristic XYZ, or the second position should not be considered closed since there's an open file, and so on.

Should I just ditch the whole binary-ish labeling (classification) and instead assign a variable number (regression) describing how open or closed a position is (e.g. 0% to 100% open?) Or is there still a way for positions to go into a few categories, which means that we can have "rigorous" definitions of the categories of openness? And "rigorous" as in having few contradictions and preferably can be applied by a human without too much difficulty.

  • I didn't edit much of the body, but it's my fault for not having a good "title" in the original question. An example of a bad solution: just the number of unoccupied squares. There’s a lot of contradictory positions. Furthermore, it barely follows the dogmatic/natural concepts that we already know. Strategically, lots of squares are good for outposted knights, but not [quite] for bishops, which need entire/long diagonals in open positions. Jun 9, 2017 at 23:42
  • If there were a rigorous definition, then you could just implement that so it would work perfectly and not have to deal with all the supervised machine learning stuff. Jun 11, 2017 at 20:31
  • I'm not aiming for perfection, but something close, which machine-learning could do. Currently, I am not focusing on whether there is a better non-machine-learning algorithm. Jun 12, 2017 at 9:10

6 Answers 6


As a chess player who currently studies computer science, I found this question very interesting so here's my thoughts on the topic. You already know how chess books categorize open and closed positions and you may also know that a semi-closed position is one with some of the characteristics of an open but not all. As you understand this makes the line between closed and semi closed positions not easy to be seen. So my recommendation is to use a number to describe the "openness" of a position(although 50% may be a problem). Now some things I thinks you might find useful for implementing you machine learning algorithm. Firstly, I will suggest you to take a look at this article https://chess24.com/en/read/news/how-do-chess-engines-think in the section about position evaluation. Now, some parameters you might use:

  1. Number of pawns(a position with no pawns is apparently wide open).

  2. Number of pawn moves(assuming a position with three pawns each,there's a big difference if they are on f2,g2,f7 and f7,g7,h7 respectively and if they are on c4,d5,e4 and c5,d6,e5.

  3. As you see in 2 you may give an extra weight for pawn moves in the center. Generally it will be a good idea to give extra weight for anything open in the center. This will be more clear in 4.

  4. Number of open and semi-open files. The ones in the center again should have an extra weight.

  5. Open diagonals. Note that diagonals with one or more isolani should be counted almost as opens(As an example think about the Indian's bishop targeting d4 and b2 when the c pawn is not on c3). And you should of course take into consideration the length of the diagonal.

Note that essentially you don't judge the whole position, just the pawn structure. That's why count the available moves of every piece is a mistake. This just measures the mobility of the given piece and doesn't necessarily has something to do with the pawn structure. For example, in a position with no pawns a Knight on a1 has only two moves while in a closed King's Indian the f3 Knight has seven( only one is occupied by the King). Some of them drop the piece but they are legal moves nonetheless.

Hope that helps a bit!


In the end the distinction between open/closed position is subjective and as you noticed there will always be some overlap or positions that don't fit perfectly into either category.

What exactly do you need this for?

For me the typical closed position has blocked pawn chains, generally many pawns, few or no open files. Because of this, the play tends to be slow, positional. Typical plans include undermining the pawn chains from the side or pawn storms/attacks against the enemy king.

Conversely open position have fewer and mobile pawns, open files, more space for pieces and are generally more tactical.

  • “In the end the distinction between open/closed position is subjective...” Before I made asked my question on StackExchange, I asked one of my chess-playing family members. He said to define “semi-open,” after I disagreed with him on a selection of the positions including “position-2.” If I nail down a good definition of “open,” “closed,” etc., then I can literally solve my problem. For example, whether or not a position is won/lost based on material can be derived (generalized) from the principle of two weaknesses. Thus, two pawns is a good tipping point rather than being a piece up. Jun 9, 2017 at 21:06
  • {I've reached my character limit on my previous comment.} Many [computer] chess engines do something almost like this when evaluating in centipawns. “For me the typical closed position... Conversely open...” Overall, I’ve already used that. Jun 9, 2017 at 21:08

I echo user 1583209; why are you doing this?

But just as an abstract exercise, how about this measure of open-ness?

Look at every piece on the board, and count the number of moves that it would have if there was nothing else on the board. Add this up for all pieces on both sides and call it $N_{empty}$.

Now count the number of moves/captures that each piece actually has and add these. Call this total $N_{actual}$. The ratio $N_{actual}/N_{empty}$ is a measure of the open-ness of the position.

I think this is cute, and maybe as good as anything else, but why are we doing this?

  • “Look at every piece on the board… is a measure of the open-ness of the position.” I wouldn’t be able to do that with a good estimate, although I could integrate your idea when I get to the computing step of my project. Jun 9, 2017 at 20:19

As in openings, positions would be regarded as closed or open depending on whether they were blocked by pawns or not. And as in the openings, these could be semi-open as well, which as you indicate would be an in-between type of situation. These distinctions are not necessarily fixed but can change depending on whether or not pawn exchanges are made to open up the position. In an open position, the pieces would have more freedom to roam and search for tactical combinations as opposed to a closed one where the opposing pieces couldn't come in contact right away and more maneuvering would take place behind the lines. I would think that it would be more reasonable in your classifications to stick to these more general categories than to try to use percentages to describe what will be more or less fluid situations. I would categorize both of the positions shown as semi-open since Black has more open lines of attack and freedom of movement for his pieces in both as opposed to White. In fact, if it's Black's move, he has a pretty forced mate in position number 1 with 1..., Qxg2+!; 2. Kxg2, Bf3+; 3. Kf1 (if 3. Kg3, Bf2#) Nh2#. And if Black moves first in position number 2, he forces mate with 1..., Rxd1+!; 2. Rxd1 (if 2. Kf2, Be3#), Nc2+; 3. Kf2 Be3#.

  • In position 2, if it's black's move, then there is a checkmate with 1...Rxd1+!, but this doesn't matter because I'm only focusing on the current (static) position. Jun 9, 2017 at 19:17
  • After I found the first mate, I looked for the other one since I then suspected these were mating problems and found it just before your post. :) I realize that's incidental to your question, but it does demonstrate that the party with more freedom has more resources.
    – CConero
    Jun 9, 2017 at 19:30
  • “I would categorize both of the positions shown as semi-open since Black has more open lines of attack and freedom of movement for his pieces in both as opposed to White.” That’s nice. I will now be making an edit to my question(s) so I can get more responses like this. {I have now discovered that StackExchange has a 5 minute limit for editing comments.} For example, I wouldn't care [for my problem/issue] if could still castle on the queenside. Jun 9, 2017 at 19:30
  • I try to give thoughtful answers to these questions based on 70+ years of chess experience. Glad you found it helpful. I didn't realize that about the 5 min. limit. Good to know.
    – CConero
    Jun 9, 2017 at 19:34

You cannot. They all have characteristics of open/closed between the two extremes so constitute a fuzzy type of set or a statistical sort of categorization. There is no way to declare absolute that a position is either open or closed when many (most?) are in the vague area of semiclosed/semiopen as nobody tries to define quarter or 3/4 closed/open or finer fractional/decimal categories.


If i had to create a generalization it'd be something like, when you have atleast two central pawns for each side and they are in contact with each other and can't be taken (say pawns on d4 e5 and e6 d5) that is a closed position. Positions ranging from there being 4 central pawns that are not in contact (e2 d3 and e6 d5 for example), to there being 2 central pawns (1 pawn for each side, like pawns on d4 and d6, or pawns on e4 and e5) are differing degrees of being semi closed. Positions with only 1 central pawn, or no central pawns on the board, I would consider open.

  • I've thought about 0, 1, or 2+ pawns on a rank, file, or diagonal is somewhat stereotypical of a position being open, semi', or closed, respectively. This downside is that in practically all cases there is a huge mix of those. “Positions with only 1 central pawn, or... I would consider open.” Black pawns on a5, b6, c7, c5, f6, g5, h6 with white pawns on a4, b5, c4, d5, f5, g4, h5 make something that’s far from open. There’s just one open file, and it’s hard for a white bishop to do much by itself since even the a1-h8 “big” diagonal is blocked by a black pawn. Jun 9, 2017 at 20:01
  • Indeed that position would be pretty locked up. Generally players won't throw pawns up the board like that on both sides and close off avenues of play by getting rid of potential pawn breaks. My generalization is maybe only effective when side pawns are kept near their starting squares, although if edge pawns got pushed I guess that wouldn't matter too much. Jun 9, 2017 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.