Thoughts on Chess

Chess has that quality that many of the greatest games share: easy to learn, difficult to master. Each piece has simple, clearly defined moves, but there are dynamics at play in a game of chess that transforms a move from a mere relocation of a piece to a dramatic restructuring of the entire board.

Though each pawn can move forward one space, to take the simplest example, the choice of which pawn to move forward is vital. If I move this pawn, it will be protected by two of my pawns and my knight, but it won't impede the motion of my opponent's bishop and it will impede the typical alley that my own bishop may need in the future. This other pawn will block my opponent's bishop and open large alleys for my own bishop while still being protected by my other pawns. What should I do?

It's breathtaking to think about how different the affect of each move is on the structure of the board's implicit dynamics. From this point of view there are not sixteen pieces with many duplicate moves, but at least 16 distinct moves, most likely many more since moving one piece into each possible position results in a different restructuring of the board.

Thus far I haven't mentioned anything new here. Much chess analysis is done in terms of decision trees and all I'm doing is yakking on about the bushiness of chess's decision tree, a well known property.

My idea is this, let's forget the decision tree and represent the board state as a set of attributes. Then, let's place weights at random on the attributes such that board states are ranked. That is, some board states are preferred over other board states. (Anyone familiar with AI or Samuel's Checkers Player probably has a pretty good idea where I'm going by this point.) Our last step is to let a program play different sets of weights against other sets of weights and, through feedback based on the results of games, modify the weights so that an AI choosing moves based on the weights becomes better and better at playing chess.

Though I'm not familiar with this having been done before in chess, I would be shocked if I was the first to think of it, so what follows is my effort to further contribute to chess AI.

Determining what attributes to include for consideration and what attributes to leave out is not necessarily obvious. The way I see it, attributes can be weeded out by the program. For example, attributes given a weight of zero will have no influence. So, the more attributes that can be included, the better. (I know this is a little naive, but I don't think I will be including that many attributes.)

I would include a few basic categories of attributes and then potentially tease them apart contextually. I will use player 1 as the perspective player and player 2 as the opponent. For starters we have:

  1. Available moves - Count the number of spaces that each of player 1's pieces can potentially move in to (whether or not an opponent occupies the space). Sum this number across all pieces. Intuitively we know Player 1 wants to maximize this number, though we are making no assumption as to the importance of this attribute. Importance will be determined by learned weights.

  2. Opponent's available moves - The same sum as the previous item, but for player 2's pieces. Player 1 wants to minimize this number. Most attributes that are positive for player one, suggest mirror attributes for player 2 that player 1 will wish to minimize, so I'm not going to list any more of them. They are assumed.

  3. Potential captures - The sum of potential captures player1 can make. This attribute will obviously need to be expanded upon later based on context since not all captures are equal.

  4. Defenses - The sum of "defenses" or "protections" that player 1's pieces exhibit. "Protections" are instances where one of player 1's pieces is in a position to capture one of player 1's own pieces. For example, in a simple three-pawn V formation, the two rear pawns both give the front pawn one "point" of protection.

  5. Threats - The sum of threats made by player 1's pieces. This is actually a sum of potential moves (item 1, which includes captures), but with exceptions made for pawns who have a forward move that makes no threat and a diagonal threat that is otherwise not a legal move.

  6. Maximum threat to defense ratio that exists on a single occupied square. I threw this one in because often in the mid-game of chess, both players will focus on a single square and attempt to overpower their opponent through this square. Or maybe, that's not how pros play and this will be a totally useless attribute.

  7. Pieces past center - A count of the pieces opponent's side of center.

  8. Middle threats - The number of player 1's threats on the middle four squares. These middle squares are known to be positions of power in chess.

My list is drifting into increasingly specific examples so I'm going to cut it off there. Everything else I can think of is an extension or modification of the above metrics. Some additional weighting of some kind will need to account for the variable importance of different pieces. Heck, these weights may even need to be determined as functions of other weights because, for example, knights are more useful on a cluttered board, but queens, bishops, and rooks, are better on clearer boards. Other weightings may also be improved by linking the metrics together. There is so much more that could be done.

When the automated self-play is deemed complete, what we will have is a system of weights corresponding to attributes of a chess board. By summing the weights multiplied by the attributes for different board states we come up with a single number that can be thought of as a preference for the board states. From there, the states can be ranked. Beyond providing insight into the salient attributes of a chess board, these weights would also, hopefully, make for a kick ass AI. The AI would simply choose the move that put the board in the most desirable state based on the ranking. The same system could even be modified to predict an opponent's moves.

The opponent's selection of moves is an implicit show of preference for some board states over others. These selections can be used to determine how the opponent is weighing the different board attributes. Thus, a model of the opponent's decision-making process is created. Then player 1 can use this model to predict the opponent's behavior and better choose its own moves in response.

Beyond AI

Another use, besides AI, for this system would be as an educational tool to move players from the beginner to more intermediate or advanced stages of chess play. I'm imagining a color-coded board that highlights the dynamics I have discussed. Threatened squares might be colored red and the hue determined by the number of threats. Avenues of movement could be shown in other colors and there might be an option to preview the consequences of a move based on these colors.

Or perhaps this would be a collossal mistake, training wheels that stunt development more than they advance it. After all, the realization that so much more is at play than the advancement of a single piece when a pawn moves forward is a powerful Eureka! moment that drives the lesson home.

THE WALL: Read and post comments here.

Comments may be deleted at any time for any reason. Please be polite.


Post a response.
No html or javascript of any kind is allowed in a post. It is automatically stripped out.

Name:
Email: (optional)

Prove you are human! Type the fuzzy characters: