A Chess forum. ChessBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ChessBanter forum » Chess Newsgroups » rec.games.chess.computer (Computer Chess)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , , , ,

Generate a list of legal moves (command-line)



 
 
Thread Tools Display Modes
  #21  
Old March 12th 08, 01:18 PM posted to rec.games.chess.computer
Wijnand Engelkes
external usenet poster
 
Posts: 5
Default Generate a list of legal moves (command-line)

Rybka can look up this position in a table base, but that's not solving.
And I can just add white pawns on a2, a3,a4,a5,a6 and a black pawn to a7 to
make it a 12 piece position that is not in the table bases.
What worries me is that a programmer would decide to ignore some rules of
chess because it makes the program overall stronger.
I suspect other hidden flaws then.
Would you buy a program that never castles Q-side ?.
Just an opening book avoiding all variants where Q-side castling is involved
and it will never need castling to the Q-side.
Saves valuable computing time and the consumer will be beaten by the program
anyway.
Sloppy programming? I think so. I would never professionally accept programs
designed like that in my company.
Rybka is programmed by a very skillful and professional team. Therefore I
expect this flaw to be corrected in the next version.

"johnny_t" schreef in bericht
...
Wijnand Engelkes wrote:
Rybka allows Bishop promotions, but will never promote to Bishop herself.
White: King h8, pawns g7 and h7
Black King e6, Queen g3, Rook b8
White is in check and can promote to 4 different pieces.
Rook and Knight allow Qe5 checkmate
and promoting to Queen is answered by Kf6 and checkmate next move.
The only saving move is g8=B, with stalemate or exchanging everything.
Rybka will never "find" this move by White, but if you play g8=B
yourself, she will allow it and see the draw.

You extremely seldomly need the move (White's) B f2 takes g1.
Maybe some program will never consider this move, just to gain speed.
A consumer product should play by the rules. So I expect Rybka to play
g8=B in the next version.


Several things.. A properly installed Rybka WILL solve the above puzzle.
(Using 6 piece table bases).

Secondly this is clearly a puzzle, and Rybka is by no means the best
puzzle solver.

And as I read, it is not likely to make the next version. Maybe consumers
shouldn't play games that result in puzzle endings. But more importantly
you are making without realizing it, that selective search is somehow
"anti-consumer" and therefor bad. I think that is rather bold. Just
because you can find a case you construct where selective search fails,
doesn't make it, nor correct. There are many many cases that you can
probably construct if you knew the selective search pruning rules where
you can reliably beat the program, especially if you construct single
solution puzzles. None of this makes selective search bad, or the program
isn't the strongest. Clearly selective search makes the best move most of
the time, especially in non single move (real world) cases.



Ads
  #22  
Old March 12th 08, 02:04 PM posted to rec.games.chess.computer
Martin Brown
external usenet poster
 
Posts: 686
Default Generate a list of legal moves (command-line)

In message , Wijnand Engelkes
writes
Rybka can look up this position in a table base, but that's not solving.
And I can just add white pawns on a2, a3,a4,a5,a6 and a black pawn to a7 to
make it a 12 piece position that is not in the table bases.


Freezer would still be able to solve it though.

What worries me is that a programmer would decide to ignore some rules of
chess because it makes the program overall stronger.
I suspect other hidden flaws then.


It is certainly possible (likely?) that Rybka uses some heuristics that
are more speculative than in other programs - and if that leads to
stronger play then good luck to them. In my other post I tested if Rybka
would allow Pxd1=B (it did), but then I found that it was far too
materialistic and failed to find a pretty obvious mating continuation
line under normal time controls. It was still a handsomely won position,
but it was far from optimal. It took 30 mins where other programs saw it
in 10s of seconds.

Shredder, Fritz, Crafty and even Comet had no trouble finding the mate.

Would you buy a program that never castles Q-side ?.
Just an opening book avoiding all variants where Q-side castling is involved
and it will never need castling to the Q-side.
Saves valuable computing time and the consumer will be beaten by the program
anyway.


I suspect that Rybka is optimised for beating other chess engines at
tournament rates of play. And armed with its custom opening book it is
pretty much invincible. Without any opening book it makes some pretty
dire looking moves according to current opening theory (some of them may
even be good moves but not yet appreciated as such).

Sloppy programming? I think so. I would never professionally accept programs
designed like that in my company.
Rybka is programmed by a very skillful and professional team. Therefore I
expect this flaw to be corrected in the next version.


I think you are being too harsh here. So far we have only identified a
couple of games out of a search of a 2M+ database where promotion to B
was needed (and in ones of those a faster mating solution existed)

I reckon there are plenty of other quirks in chess software that occur
far more often than 1 in 10^6.

"johnny_t" schreef in bericht
.. .
Wijnand Engelkes wrote:
Rybka allows Bishop promotions, but will never promote to Bishop herself.
White: King h8, pawns g7 and h7
Black King e6, Queen g3, Rook b8
White is in check and can promote to 4 different pieces.
Rook and Knight allow Qe5 checkmate
and promoting to Queen is answered by Kf6 and checkmate next move.
The only saving move is g8=B, with stalemate or exchanging everything.
Rybka will never "find" this move by White, but if you play g8=B
yourself, she will allow it and see the draw.

You extremely seldomly need the move (White's) B f2 takes g1.
Maybe some program will never consider this move, just to gain speed.
A consumer product should play by the rules. So I expect Rybka to play
g8=B in the next version.


Several things.. A properly installed Rybka WILL solve the above puzzle.
(Using 6 piece table bases).

Secondly this is clearly a puzzle, and Rybka is by no means the best
puzzle solver.

And as I read, it is not likely to make the next version. Maybe consumers
shouldn't play games that result in puzzle endings. But more importantly
you are making without realizing it, that selective search is somehow
"anti-consumer" and therefor bad. I think that is rather bold. Just
because you can find a case you construct where selective search fails,
doesn't make it, nor correct. There are many many cases that you can
probably construct if you knew the selective search pruning rules where
you can reliably beat the program, especially if you construct single
solution puzzles. None of this makes selective search bad, or the program
isn't the strongest. Clearly selective search makes the best move most of
the time, especially in non single move (real world) cases.


In a general sense the =B promotion should only be considered
iff =Q, =R and =N have already failed with a stalemate.

Under these constraints the performance hit really would be negligible.
Arguably Rybka could hide its notional deficiency if when the next move
of the PV was seen to be immediate capture of the newly promoted piece
it did promote to a bishop (many GMs do this).

Regards,
--
Martin Brown

--
Posted via a free Usenet account from http://www.teranews.com

  #23  
Old March 12th 08, 04:30 PM posted to rec.games.chess.computer
Martin Brown
external usenet poster
 
Posts: 686
Default Generate a list of legal moves (command-line)

In message , Wijnand
Engelkes
writes
Rybka can look up this position in a table base, but that's not solving.
And I can just add white pawns on a2, a3,a4,a5,a6 and a black pawn to a7 to
make it a 12 piece position that is not in the table bases.


Freezer would still be able to solve it though.

What worries me is that a programmer would decide to ignore some rules of
chess because it makes the program overall stronger.
I suspect other hidden flaws then.


It is certainly possible (likely?) that Rybka uses some heuristics
that are more speculative than in
other programs - and if that leads to stronger play then good luck to
them. In my other post I tested
if Rybka would allow Pxd1=B (it did), but then I found that it was far
too materialistic and failed to
find a pretty obvious mating continuation line under normal time
controls. It was still a handsomely
won position, but it was far from optimal. It took 30 mins where other
programs saw it in 10s of
seconds.

Shredder, Fritz, Crafty and even Comet had no trouble finding the
mate.

Would you buy a program that never castles Q-side ?.
Just an opening book avoiding all variants where Q-side castling is involved
and it will never need castling to the Q-side.
Saves valuable computing time and the consumer will be beaten by the program
anyway.


I suspect that Rybka is optimised for beating other chess engines at
tournament rates of play. And
armed with its custom opening book it is pretty much invincible.
Without any opening book it makes
some pretty dire looking moves according to current opening theory
(some of them may even be
good moves but not yet appreciated as such).

Sloppy programming? I think so. I would never professionally accept programs
designed like that in my company.
Rybka is programmed by a very skillful and professional team. Therefore I
expect this flaw to be corrected in the next version.


I think you are being too harsh here. So far we have only identified a
couple of games out of a
search of a 2M+ database where promotion to B was needed (and in one
of those a faster mating
solution existed)

I reckon there are plenty of other quirks in chess software that occur
far more often than 1 in 10^6.

"johnny_t" schreef in bericht
.. .
Wijnand Engelkes wrote:
Rybka allows Bishop promotions, but will never promote to Bishop herself.
White: King h8, pawns g7 and h7
Black King e6, Queen g3, Rook b8
White is in check and can promote to 4 different pieces.
Rook and Knight allow Qe5 checkmate
and promoting to Queen is answered by Kf6 and checkmate next move.
The only saving move is g8=B, with stalemate or exchanging everything.
Rybka will never "find" this move by White, but if you play g8=B
yourself, she will allow it and see the draw.

You extremely seldomly need the move (White's) B f2 takes g1.
Maybe some program will never consider this move, just to gain speed.
A consumer product should play by the rules. So I expect Rybka to play
g8=B in the next version.


Several things.. A properly installed Rybka WILL solve the above puzzle.
(Using 6 piece table bases).

Secondly this is clearly a puzzle, and Rybka is by no means the best
puzzle solver.

And as I read, it is not likely to make the next version. Maybe consumers
shouldn't play games that result in puzzle endings. But more importantly
you are making without realizing it, that selective search is somehow
"anti-consumer" and therefor bad. I think that is rather bold. Just
because you can find a case you construct where selective search fails,
doesn't make it, nor correct. There are many many cases that you can
probably construct if you knew the selective search pruning rules where
you can reliably beat the program, especially if you construct single
solution puzzles. None of this makes selective search bad, or the program
isn't the strongest. Clearly selective search makes the best move most of
the time, especially in non single move (real world) cases.


In a general sense the =B promotion should only be considered
iff =Q, =R and =N have already failed with a stalemate.

Under these constraints the performance hit really would be
negligible.
Arguably Rybka could hide its notional deficiency if when the next
move of the PV was seen to be
immediate capture of the newly promoted piece it did promote to a
bishop (many GMs do this).

Regards,
--
Martin Brown

Teranews is proving every bit as unreliable for posting to Uesnet as
Google. The one advantage is that with NNTP I get to keep a local
copy. Apologies if this gets posted twice as a result.
  #24  
Old March 13th 08, 12:28 AM posted to rec.games.chess.computer
johnny_t
external usenet poster
 
Posts: 138
Default Generate a list of legal moves (command-line)


Sloppy programming? No, selective search. Please read the below
statement. I understand you may not be able to accept selective search
as a path to strength. But the professional team at Convekta, and
specifically the Rybka programmer does. It is not sloppy, it is an
intentional decision.

They do make a freebee called winfinder I believe to help you solve your
puzzles.


Wijnand Engelkes wrote:

Sloppy programming? I think so. I would never professionally accept programs
designed like that in my company.
Rybka is programmed by a very skillful and professional team. Therefore I
expect this flaw to be corrected in the next version.

"johnny_t" schreef in bericht


And as I read, it is not likely to make the next version. Maybe consumers
shouldn't play games that result in puzzle endings. But more importantly
you are making without realizing it, that selective search is somehow
"anti-consumer" and therefor bad. I think that is rather bold. Just
because you can find a case you construct where selective search fails,
doesn't make it, nor correct. There are many many cases that you can
probably construct if you knew the selective search pruning rules where
you can reliably beat the program, especially if you construct single
solution puzzles. None of this makes selective search bad, or the program
isn't the strongest. Clearly selective search makes the best move most of
the time, especially in non single move (real world) cases.



  #25  
Old March 14th 08, 02:31 AM posted to rec.games.chess.computer
johnny_t
external usenet poster
 
Posts: 138
Default Generate a list of legal moves (command-line)

Martin Brown wrote:
In message , Andy Walker
writes
In article ,
Martin Brown wrote:
It depends on how you do it. Certainly considering bishop promotions in
the early stage of the game down completely insane pawn capture
sidelines that I would hope most modern engines would prune out on
windowing grounds would cripple performance.


"Cripple performance"? If the promotion is of the type
where a queen would be immediately captured, then any sub-promotion
leads after one further ply to a position that should already be
in the transposition table with a value that causes an instant
beta-cutoff. If, OTOH, the queen would survive with best play,
then a bishop sub-promotion leads instantly to a position which
is approximately a rook+ worse, and will get pruned very quickly


I agree. That is why I find it hard to believe the alleged 5-10 ELO
point improvement claimed by Rybka fans for not generating the =B
promotion. In most circumstances =B will not waste any significant time
at all.

Some of the daft permutations in a full width search do allow PxR where
the enemy Q cannot be captured immediately. But any sensible search
strategy will never really consider them unless there is a forcing line.

[unless, indeed, the sub-promotion is "interesting"]. Presumably
no-one would today claim that every random move whereby [eg] an
attacked rook is left to be captured cripples performance? It
may get very short shrift, but, at least in the full-width part
of any search, *all* moves should be generated [on demand], even
those that apparently drop a rook.

[johnny_t:]
Next "rare." The Bishop case is very rare. Namely because the queen
also moves diagonally. It would be very rare that a queen would not
solve the case, and the bishop would. It has been seen in puzzles, but
not in the wild (though I am nowhere near an exhaustive expert on
this).
I expect it has been seen in the wild, although off hand I can't find
any.


Tim Krabbe' listed a few in "Chess Curiosities", of which
the first is Kuppfer -- von Wulf:

8/7P/8/3P4/1p6/1k1K4/p7/8 w - - 0 1

1 h8=B! wins; 1 h8=Q? a1=Q draws.

I assume that Rybka at least *understands* B promotions?
If not, then it is going to lose a *lot* of games to engines that
know about this deficiency and promote to a B regardless of the
chessic needs, just to watch Rybka crash and burn on the "illegal"
move.


Here is the other one that I found in CB6 big database.
Strethoff vs Huschenbeth, U14 GER-CH 2005

8/2p5/1p3k2/1P1pR2p/3P3P/5p2/3pr1r1/2R3BK b - - 0 38

He played dxc1=B and won. dxc1=N also wins but more slowly.
=R, =Q both draw since the pending stalemate allows W to do perpetual
check... And for the record Rh2+ is the fastest win so even in this
example the =B promotion is not absolutely essential.

There is another interesting quirk though. I put this position to Rybka
2.32 and found that after manually playing dxc1=B it cannot properly
see the correct continuation line to the fastest mate whereas Fritz and
Shredder have no trouble at all. Even Crafty 19.19 groks it in under 10s.

At ply 15 it still has the brutally materialistic PV
39. Rxe2 fxe2 40. Kxg2 e1=Q Bf2 Qe4+ -16.8
It took 30 mins and a ply 17 search to resolve this position. But after
playing 39. Rxe2 it then sees the correct strongest continuation line
for black in mere seconds which goes something like
39. .... Rxe2! 40. Be3 Re1+ 41. Kh2 Bxe3 42. Kg3 f2 43. Kh3 Bf4 44.
Kg2 f1=Q#

So it seems Rybka does have an Achilles heal where promotions are
concerned. It looks like a blindness to mating opportunities (or over
zealous windowing). fxe2 is certainly good enough to win!

I miss stated the frequency of these promotions occurring before. I was
only considering Px*=B etc. The full numbers for any move P***=* are
=B 98, =R 528, =N 882, =Q 46k

So 97% of all promotions are to Q, 2% N, 1% R & 0.2% B
(and most of those =B are followed by immediate trivial capture)

Regards,


This is actually very interesting work, and I hope it is not lost to the
sands of time.

The engines have much to say to us if we know what to ask, and
especially how to listen. But as I understand the process, is that
well thinking people try and balance the heuristics, and the timing,
trying things they think will and won't work, and then automate playing
against the strongest other engines and see what happens. If the
success rate is good enough, ship it.

And this is all fine and well, but chess is not all about the ones,
zeros and draws. It is about the dance. And there is simply not enough
research into the dance.

I love when the strong engines play very public matches against either
grandmasters or other engines, because we, the humans, the fans get to
actually see how they think. What they do that is different, and how
they succeed. There is so much data now, and the view on it is so
narrow, I feel like we hardly get to know what is going on.

Thanks for your time and effort.

Cheers
John
  #26  
Old March 16th 08, 01:23 PM posted to rec.games.chess.computer
David Richerby
external usenet poster
 
Posts: 2,591
Default Generate a list of legal moves (command-line)

Wijnand Engelkes wrote:
Would you buy a program that never castles Q-side ?.


No but the situation is in no way analogous to a program that never
promotes to a bishop. Castling queenside comes up *very* often in
practical chess; promotions to bishops are extremely rare.

Sloppy programming? I think so.


Not at all. It's optimization for the overwhelmingly more common case
in the belief (which, one hopes, has been quantitatively tested) that
spending the time searching more promising lines will, overall,
increase the strength of the engine, even though it will, once in a
blue moon, fail to find a critical bishop promotion.

Dave.

--
David Richerby Homicidal Slimy Chainsaw (TM): it's
www.chiark.greenend.org.uk/~davidr/ like a lethal weapon but it's covered
in goo and it wants to kill you!
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting knight moves foot rec.games.chess.misc (Chess General) 42 October 13th 07 02:12 PM
Goichberg's List samsloan rec.games.chess.play-by-email (Chess - Play by Email) 1 March 19th 07 10:09 PM
Goichberg's List samsloan alt.chess (Alternative Chess Group) 0 March 19th 07 08:25 PM
Positions with the most legal moves Martin Brown rec.games.chess.analysis (Chess Analysis) 30 November 20th 06 10:17 AM
Positions with the most legal moves Martin Brown rec.games.chess.computer (Computer Chess) 30 November 20th 06 10:17 AM


All times are GMT +1. The time now is 03:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Content Relevant URLs by vBSEO 2.4.0
Copyright ©2004-2008 ChessBanter, part of the NewsgroupBanter project.
The comments are property of their posters.
Credit Card - Loans - Bad Credit Mortgages - Loans - Car Finance