6

How is a computer programmed to play chess? What are the ways by which they sort out the moves? My question is not about programming but the idea behind programming to play chess. That can really help me in chess.

0

3 Answers 3

8

Chess programming is full of "rules of thumb" that can be applied to your own chess. There are many aspects to chess programming... but the most prominent are tree search and a heuristic evaluation. Here are some ideas that you might be able to apply to your games:

  • Minimax Search: The basis for adversarial search formalized... I'd hope the principle here was intuitive.
  • Evaluation: A computer scores a position by combining metrics about material balance, king safety, activity, and pawn structure. This goes into a strategic understanding of any given position.
  • Iterative Deepening: The applicable idea here might be to consider your list of candidates first, prior to expending to a deeper level of analysis.
  • Killer Moves: An amazing move discovered in one line of your analysis might be applicable in other lines of analysis... consider it early in the process.
  • Null Move Pruning: You can better understand your opponents intentions by considering what moves they would make if you were to skip your own turn.
  • Quiescence Search: When you reach the end of some analysis, make sure everything is still ok if you were to resolve the tension in the position.
  • MVV-LVA: This one is obvious, but in considering capture patterns, usually a good idea to identify the most valuable victim, and take with the least valuable attacker.
  • Alpha Beta Search: You can stop considering a line when you find the first refutation to it, rather than continuing to search for a better refutation.
3
  • +1 for good information, but I don't think any of this can be applied to human chess.
    – Tony Ennis
    Commented Apr 28, 2013 at 12:40
  • 1
    It seems that more can be applied to human chess that I would have expected, for instance Alpha Beta Search, MVV-LVA, and maybe Null Move Pruning. We just call them different things in over the board play. Commented Apr 28, 2013 at 17:54
  • @TonyEnnis perhaps not directly, but e.g. evaluation of a position is pretty much a codification of various human "rules of thumb", perhaps refined with actual statistical analysis to determine the rule's weight and applicability. By studying a specific implementation, a human might discover what positional elements a computer gives value to. That said, it'd probably be much easier to just read an actual book on the same subject (which would come with extensive explanations).
    – Daniel B
    Commented May 10, 2013 at 8:18
4

If you want all the dirty details of Chess programming, this is a good site: http://chessprogramming.wikispaces.com

3

A computers method of playing chess is really of very little use to a human player. Computers have no true intelligence. What they do have is the ability to carry out a very large number of instructions in a very short time. The computer uses a brute force method where they look at every possible move and then reduce the number of possibilities by comparing values given to various things like active or inactive pieces, actual piece values, and specific move variations that can be forced (as long as the entire move chain is within their event horizon). A human can never do this. Humans recognize positions and know that in this position this type of move are likely to matter. The human player thus check many fewer moves, by several orders of magnitude, but chooses better candidate moves to check out. See my answer to "How do chess engines think?" How do chess engines "think"? for additional information on the specifics behind the chess engines methods.

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