user1273: 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.

user1161: 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. 

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

user606: 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.


1273: <p>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.</p>
 1161: <p>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?" <a href="https://chess.stackexchange.com/questions/2204/how-do-chess-engines-think?rq=1e">How do chess engines &quot;think&quot;?</a> for additional information on the specifics behind the chess engines methods. </p>
 1275: <p>If you want all the dirty details of Chess programming, this is a good site:
<a href="http://chessprogramming.wikispaces.com" rel="nofollow">http://chessprogramming.wikispaces.com</a></p>
 606: <p>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:</p>

<ul>
<li><a href="http://chessprogramming.wikispaces.com/Minimax">Minimax Search</a>: The basis for adversarial search formalized... I'd hope the principle here was intuitive.</li>
<li><a href="http://chessprogramming.wikispaces.com/Evaluation">Evaluation</a>: 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.</li>
<li><a href="http://chessprogramming.wikispaces.com/Iterative+Deepening">Iterative Deepening</a>: The applicable idea here might be to consider your list of candidates first, prior to expending to a deeper level of analysis.</li>
<li><a href="http://chessprogramming.wikispaces.com/Killer+Move">Killer Moves</a>: An amazing move discovered in one line of your analysis might be applicable in other lines of analysis... consider it early in the process.</li>
<li><a href="http://chessprogramming.wikispaces.com/Null+Move+Pruning">Null Move Pruning</a>: You can better understand your opponents intentions by considering what moves they would make if you were to skip your own turn.</li>
<li><a href="http://chessprogramming.wikispaces.com/Quiescence+Search">Quiescence Search</a>: When you reach the end of some analysis, make sure everything is still ok if you were to resolve the tension in the position.</li>
<li><a href="http://chessprogramming.wikispaces.com/MVV-LVA">MVV-LVA</a>: 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.</li>
<li><a href="http://chessprogramming.wikispaces.com/Alpha-Beta">Alpha Beta Search</a>: You can stop considering a line when you find the first refutation to it, rather than continuing to search for a better refutation.</li>
</ul>
