10 years of Computer Chess

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Uri Blass
Posts: 10267
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: 10 years of Computer Chess

Post by Uri Blass »

I can add that not to capture is not always a good idea if you want to force the opponent to mate you.

[D]k7/P7/KP6/8/8/2q5/8/8 b - - 0 1

black can force white to make a mate only because black has material advantage.

[D]k1n5/P7/K5b1/2r4q/8/1P6/8/4b3 b - - 0 1

again black can force white to mate because black has material advantage

for example
Rg5 b4 Bb1 b5 Rg6+ b6 Rg5 b7 mate.

It may be interesting to have a chess competition between computers when the target is to force the opponent to mate you.

Most games are going to be draws but not all of them and you need a good evaluation function that means that it is good to capture the opponent pieces so you can force him to mate you but it is not good to capture too many pieces because in this case the opponent is not going to have enough material to mate.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: 10 years of Computer Chess

Post by Sven »

Don wrote:
Uri Blass wrote:I assume chess is a draw by perfect play.

If it is not(and we suppose white wins) then B1,...B8 may have a different bug that is resigning with white when the opponent blunder and reduce the distance to mate.

The perfect player is going to lose as slow as possible so it is going to lose against B1...B8 with black but the random player will probably blunder that is going to cause B1...B8 to resign with white.
If you require that games are played out, no resignation, it would be difficult to create a player that always loses against a random player. You could probably make a player a loser by:

refusing to make captures.
refusing to play checkmate ever ...
trying to put the king in the most vulnerable position possible.

But you cannot force the opponent to beat you.

Don
What about simply negating all evaluations from the viewpoint of the "worst player", and doing a normal search? Shouldn't that already result in playing almost always the "worst moves" (depending on search depth)? That means: if I can make a move such that the opponent can mate me in 1 then I make that move, etc. Of course it does not force the opponent to beat you but it should drastically increase the probability of getting mated.

Sven
Uri Blass
Posts: 10267
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: 10 years of Computer Chess

Post by Uri Blass »

I think that it is better to have some strategy to force the random player to win and not to allow it to win.

first step capture all pieces of the random player except the h pawn and the g pawns and block the h pawn and the g pawn so they cannot move.

put your king at h8 if you are black.

second step force the h pawn and the g pawn to go to h7 and g5 simply by unblocking them and stalemating the king.


third step: block the pawns and force the opponent king to go to h6
4th step:move the piece at g6 and force the opponent to play g6 and g7 mate.

I did not try it but
My guess is that it is possible to lose practically 100:0 against the random player simply by this strategy and not only against the random player but also against a program that tries to play the worst move based on search.

A program that tries to play the worst moves is going to be happy to lose material so it is going to allow me to capture everything except 2 pawns.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: 10 years of Computer Chess

Post by Laskos »

Uri Blass wrote: My guess is that it is possible to lose practically 100:0 against the random player simply by this strategy and not only against the random player but also against a program that tries to play the worst move based on search.

A program that tries to play the worst moves is going to be happy to lose material so it is going to allow me to capture everything except 2 pawns.
It's funny that it's harder to lose this way to a normal engine which tries not to give away pieces. Again, maybe random mover will score better than the normal engine against your proposed loser engine.

A perfect loser would be a perfect capturer of the pieces and 6 pawns of the opponent (close to a perfect winning engine in this stage), and a perfect herder of the 2 remaining pawns.

Kai
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: 10 years of Computer Chess

Post by Don »

Uri Blass wrote:
Don wrote:
Uri Blass wrote:I assume chess is a draw by perfect play.

If it is not(and we suppose white wins) then B1,...B8 may have a different bug that is resigning with white when the opponent blunder and reduce the distance to mate.

The perfect player is going to lose as slow as possible so it is going to lose against B1...B8 with black but the random player will probably blunder that is going to cause B1...B8 to resign with white.
If you require that games are played out, no resignation, it would be difficult to create a player that always loses against a random player. You could probably make a player a loser by:

refusing to make captures.
refusing to play checkmate ever ...
trying to put the king in the most vulnerable position possible.

But you cannot force the opponent to beat you.

Don
I believe that I can lose simply by developing my king in the opening and allow mate in 1.

The random player may avoid a mating move but if I allow it many times to make a mating move then the probability of it not to make the mating move is very small and there is not going to be a stalemate when I have many pieces on the board(if I see that the random player captured most of my pieces I am going to try to avoid losing the last pieces in order not to get stalemate).

I did not try to play games against the random player in order to lose
but my guess is that I can lose at least 99 games out of 100.
Yes, if you maneuver yourself into a position where mate is possible and maintain that for as long as possible a random player will eventually mate you.

But I'm thinking it's going to be difficult to create a player so bad it losses to a random player as often as the random player loses to a perfect player because in this case we have to depending on the other player to stumble into the win rather than to go after the win.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: 10 years of Computer Chess

Post by Vinvin »

Don wrote:...

Yes, if you maneuver yourself into a position where mate is possible and maintain that for as long as possible a random player will eventually mate you.

But I'm thinking it's going to be difficult to create a player so bad it losses to a random player as often as the random player loses to a perfect player because in this case we have to depending on the other player to stumble into the win rather than to go after the win.
No, the strategy it's not to wait the random opponent mate you, you can simply force him. It's not that hard : take all his pieces, force his king to go where you want and force him to push his pawn to mate you.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: 10 years of Computer Chess

Post by Don »

Vinvin wrote:
Don wrote:...

Yes, if you maneuver yourself into a position where mate is possible and maintain that for as long as possible a random player will eventually mate you.

But I'm thinking it's going to be difficult to create a player so bad it losses to a random player as often as the random player loses to a perfect player because in this case we have to depending on the other player to stumble into the win rather than to go after the win.
No, the strategy it's not to wait the random opponent mate you, you can simply force him. It's not that hard : take all his pieces, force his king to go where you want and force him to push his pawn to mate you.
I think that is trickier than you imagine it to be. What I said is that it would be hard to make a program play WORSE against random that Perfect is good against random - so your strategy has to be so good that it won't fail in trillions upon trillions of games. With a random player your strategy would backfire once in a while. The random play is not going to cooperate with you as he is unpredictable. Remember, he has to play worse than the perfect player is good. The perfect player is indeed very good and can just focus on playing the best move while the weak player (to be equivalently weaker) has to actually produce a losing strategy based on opponent modeling and statistics.

Remember, this isn't about a strategy that works most of the time, it has to fail as often as the perfect player succeeds against random and I don't believe you have nailed down a strategy that loses that well.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: 10 years of Computer Chess

Post by Don »

Vinvin wrote:
Don wrote:...

Yes, if you maneuver yourself into a position where mate is possible and maintain that for as long as possible a random player will eventually mate you.

But I'm thinking it's going to be difficult to create a player so bad it losses to a random player as often as the random player loses to a perfect player because in this case we have to depending on the other player to stumble into the win rather than to go after the win.
No, the strategy it's not to wait the random opponent mate you, you can simply force him. It's not that hard : take all his pieces, force his king to go where you want and force him to push his pawn to mate you.
Actually, there are all sort of things wrong with your losing strategy. First of all if want to lose it's a bad idea to take all your opponent pieces. A big issue is going to be congested positions where your king is actually well defended (at least against a random player) so you probably want to have a strategy that opens up the position as much as possible by exchanging pawns (on both sides.)

Probably a good strategy is to build a powerful search that has a good evaluation function - the evaluation function would have evaluation terms that were good for losing to a random player, perhaps heavy on anti-king-safety and such and the search would be eager to let the opponent take it's pieces and not take the opponents pieces.

What would be even more difficult is to have 2 of these programs compete because then you would have 2 programs trying to lose and get mated and it would be truly difficult to force an unwilling opponent to beat you. How would you prevent such a player from simply shuffling his pieces around? In fact I think this is the same problem with a random player except that you are just "hoping" that a random player will sooner or later mate you so the strategy is to simply provide him with as many opportunities as possible to checkmate you.

Another thing you may not have considered is that a random player is likely to deliver stalemate so your strategy has to included anti-stalemate heuristics.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: 10 years of Computer Chess

Post by Vinvin »

Don wrote:
Vinvin wrote:
Don wrote:...

Yes, if you maneuver yourself into a position where mate is possible and maintain that for as long as possible a random player will eventually mate you.

But I'm thinking it's going to be difficult to create a player so bad it losses to a random player as often as the random player loses to a perfect player because in this case we have to depending on the other player to stumble into the win rather than to go after the win.
No, the strategy it's not to wait the random opponent mate you, you can simply force him. It's not that hard : take all his pieces, force his king to go where you want and force him to push his pawn to mate you.
I think that is trickier than you imagine it to be. What I said is that it would be hard to make a program play WORSE against random that Perfect is good against random - so your strategy has to be so good that it won't fail in trillions upon trillions of games. With a random player your strategy would backfire once in a while. The random play is not going to cooperate with you as he is unpredictable. Remember, he has to play worse than the perfect player is good. The perfect player is indeed very good and can just focus on playing the best move while the weak player (to be equivalently weaker) has to actually produce a losing strategy based on opponent modeling and statistics.

Remember, this isn't about a strategy that works most of the time, it has to fail as often as the perfect player succeeds against random and I don't believe you have nailed down a strategy that loses that well.
I swear you it's very easy to force a random player to mate you (100% is not that hard after practicing only 5-6 times). I already did against club players.
In fact, it's from an interesting challenge you can propose to a player : "I bet I can force you to mate me". The player won't believe it's possible. So here's the strategy : usually, he become to play random moves before understanding your strategy but too late ... when you have 2-3 pieces up, it's not that hard to enter an endgame where the opponent still have 3-4 pawns blocked. Then it's easy to drive the king wherever you want with your queen then unblock his pawn (you can put some pieces en prise to do so). And he will have 1 or 2 forced moves each move until he will be forced to mate you.

But now, the random player have an infinitesimal probability to play perfect game to refute your moves too ... :-)

The question is ; "which game (winning chess or losing chess) have the biggest probability to player perfect move from the random player ? " ;-)
Last edited by Vinvin on Mon Nov 12, 2012 4:00 pm, edited 1 time in total.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: 10 years of Computer Chess

Post by Don »

Vinvin wrote:
Don wrote:
Vinvin wrote:
Don wrote:...

Yes, if you maneuver yourself into a position where mate is possible and maintain that for as long as possible a random player will eventually mate you.

But I'm thinking it's going to be difficult to create a player so bad it losses to a random player as often as the random player loses to a perfect player because in this case we have to depending on the other player to stumble into the win rather than to go after the win.
No, the strategy it's not to wait the random opponent mate you, you can simply force him. It's not that hard : take all his pieces, force his king to go where you want and force him to push his pawn to mate you.
I think that is trickier than you imagine it to be. What I said is that it would be hard to make a program play WORSE against random that Perfect is good against random - so your strategy has to be so good that it won't fail in trillions upon trillions of games. With a random player your strategy would backfire once in a while. The random play is not going to cooperate with you as he is unpredictable. Remember, he has to play worse than the perfect player is good. The perfect player is indeed very good and can just focus on playing the best move while the weak player (to be equivalently weaker) has to actually produce a losing strategy based on opponent modeling and statistics.

Remember, this isn't about a strategy that works most of the time, it has to fail as often as the perfect player succeeds against random and I don't believe you have nailed down a strategy that loses that well.
I swear you it's very easy to force a random player to mate you (100% is not that hard after practicing only 5-6 times). I already did against club players.
In fact, it's from an interesting challenge you can propose to a player : "I bet I can force you to mate me". The player won't believe it's possible. So here's the strategy : usually, he become to play random moves before understanding your strategy but too late ... when you have 2-3 pieces up, it's not that hard to enter an endgame where the opponent still have 3-4 pawns blocked. Then it's easy to drive the king wherever you want with your queen then unblock his pawn (you can put some pieces en prise to do so). And he will have 1 or 2 forced moves each move until he will be forced to mate you.

But now, the random player can play perfect game to refute your moves too ... :-)
Ok, when I get back from my business trip we will play a game on-line (let's use the openchess forum because they have a chessboard widget) and see if you can force me to mate you.

Don
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.