Open Side Menu Go to the Top
Register
Two Questions about Chess Computer Algorithms Two Questions about Chess Computer Algorithms

05-06-2013 , 11:56 PM
1. If the computer sees that a move that it is considering will result in a position that it can see will always result in it being checkmated if the opponent plays perfectly, will it automatically reject that move in favor of one where this is not the case?

2. If the computer finds itself in a position where any move it makes does not avoid it being checkmated by a perfect player, what criteria does it use when choosing its move.
Two Questions about Chess Computer Algorithms Quote
05-07-2013 , 12:15 AM
1. yes, the computer plays what it considers to be the least negative line against a perfect player. often this is an easy to play against continuation, but it results in the least loss of material vs a perfect player. so for example if one line is very tough to see but leads to mate or another line is very easy to take advantage of but drops the queen for a minor piece, the computer will drop the queen.

although i have heard about a certain computer mode called "contempt" where a computer will try as best he can to avoid draws and to beat humans, including making imprecise moves to prolong the game. for instance there is a 50 move rule in chess, where if neither player captures a piece in 50 moves then the game is drawn. if a computer has contempt on in a game like this it will sacrifice material in order to keep a game going to try and find a win. i assume if contempt was on it could possibly also try and play more forcing continuations, but i dont know about that for sure.


2. whatever leads to mate in more moves would be played. if they are equal move mates then probably whatever is the first thing it is told to look at. whether that be from highest to lowest rank/file or something else
Two Questions about Chess Computer Algorithms Quote
05-07-2013 , 02:19 AM
Quote:
Originally Posted by Daut44
although i have heard about a certain computer mode called "contempt" where a computer will try as best he can to avoid draws and to beat humans, including making imprecise moves to prolong the game. for instance there is a 50 move rule in chess, where if neither player captures a piece in 50 moves then the game is drawn. if a computer has contempt on in a game like this it will sacrifice material in order to keep a game going to try and find a win. i assume if contempt was on it could possibly also try and play more forcing continuations, but i dont know about that for sure.
Usually contempt is zero in analysis and one when playing games. Positive thinking helps computers too!
Two Questions about Chess Computer Algorithms Quote
05-07-2013 , 07:48 AM
David, nothing you ask is ever as straight-forward as this sounds. I suspect there is something more you are really asking, so in the interest of time could you just tell us what it is that you really want to know?
Two Questions about Chess Computer Algorithms Quote
05-07-2013 , 08:09 AM
Could be related to how walking into a mate might be better idea (vs. a human obviously) in some cases when the non-mate line is a trivial win, but the mate is difficult to find
Two Questions about Chess Computer Algorithms Quote
05-07-2013 , 02:27 PM
Quote:
Originally Posted by David Sklansky
1. If the computer sees that a move that it is considering will result in a position that it can see will always result in it being checkmated if the opponent plays perfectly, will it automatically reject that move in favor of one where this is not the case?
There may be exceptions with certain chess engines, but the standard approach is based on the minimax algorithm (with lots of refinements obviously), and if the search finds that a certain move leads to mate in X for the opponent, that move would automatically be rejected if there are any other moves that it can't calculate out to mate in X. How likely a human opponent would be to actually find that mate in X makes no difference here. Minimax and the standard refinements aren't doing player modeling or using exploitive strategies, and the search assumes both players find the best move.

Quote:
2. If the computer finds itself in a position where any move it makes does not avoid it being checkmated by a perfect player, what criteria does it use when choosing its move.
Non-exploitive game theory would have no preference here. A likely heuristic would be to pick the move that maximizes the value of X in the "mate in X", but the chess engine could do whatever, depending on its design. Aimless or ridiculous moves in this situation shouldn't be surprising.
Two Questions about Chess Computer Algorithms Quote
05-07-2013 , 02:27 PM
It could depend on the chess engine
Two Questions about Chess Computer Algorithms Quote
05-07-2013 , 05:50 PM
1, It does anything it can do to avoid being checkmated.

2, It usually plays the move that takes the longest to checkmate which is usually the toughest defense as well.

Any background to these questions?

Last edited by Paymenoworlater; 05-07-2013 at 06:02 PM.
Two Questions about Chess Computer Algorithms Quote
05-14-2013 , 07:52 AM
Quote:
Originally Posted by wlrs
Could be related to how walking into a mate might be better idea (vs. a human obviously) in some cases when the non-mate line is a trivial win, but the mate is difficult to find
My recollection is that there are go engines written to explicitly take care of such things (playing inferior moves that are believed to be more challenging for a human to defend).

Really the answer to the questions are "depends on the engine". Right now, most top engines are optimized to beat engines, not people.

I've often thought the idea of an assessment that was multidimensional, e.g., predicted score and variance, rather than just predicted score, would be interesting to see in practice. To some extent, I think this already exists, at least as a heuristic, with engines having parameters known to make them play "more sharply", but I've not paid attention to chess engines/programming in recent years.
Two Questions about Chess Computer Algorithms Quote
05-14-2013 , 08:08 AM
come on DS don't leave us hanging
Two Questions about Chess Computer Algorithms Quote
05-15-2013 , 03:17 PM
Quote:
Originally Posted by ganstaman
David, nothing you ask is ever as straight-forward as this sounds. I suspect there is something more you are really asking, so in the interest of time could you just tell us what it is that you really want to know?
I suspect he's writing about something else and wants to draw a comparison with how chess engines work, and honestly doesn't know the answer.
Two Questions about Chess Computer Algorithms Quote
05-15-2013 , 06:37 PM
it might be a bit off topic, but I'd like to see a chess engine that doesn't evaluate a position as +- a percentage of a pawn, but instead evaluates a position through probability of winning, losing and drawing based on the different criteria that create the imbalances in the game
Two Questions about Chess Computer Algorithms Quote
05-15-2013 , 10:21 PM
Quote:
Originally Posted by chessterfish
it might be a bit off topic, but I'd like to see a chess engine that doesn't evaluate a position as +- a percentage of a pawn, but instead evaluates a position through probability of winning, losing and drawing based on the different criteria that create the imbalances in the game
Well, it would be rather trivial to convert a % of a pawn to a % chance of winning if one could just go over enough games and make a conversion table. However, I'm not sure I get the rest of what you're saying -- what do you mean by the "different criteria that create the imbalances in the game?"
Two Questions about Chess Computer Algorithms Quote
05-16-2013 , 12:06 AM
Right now a computer evaluation of 0.0 would be correctly given to a position with a "signature" of 0% win, 100% draw as well as 50% win, 0% draw. But these positions are very different qualitatively.

Having an analytical engine which gave those components, instead, (i.e., winning and drawing percentage) would be interesting to me, as well.
Two Questions about Chess Computer Algorithms Quote
05-16-2013 , 05:35 AM
I guess that would involve something similar to rollouts like in backgammon. The engine would play out the position, maybe with different search depth settings to "produce" errors.

Related story to the draw contempt: I managed to draw someone with black on chess.com who had, as i learned afterwards, just used houdini's first choice move all the time. Fortunately houdini played a lame line against the Tartakower and went for an endgame which he evaluated as += but was drawn without any trouble.
Had he used the second or third best, but more aggressive, move at some critical point he would have beat me easily with the help of the engine.
Two Questions about Chess Computer Algorithms Quote

      
m