Futility pruning, Ext futility pruning and Limited Razoring.

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by Michael Sherwin »

But, all games are not against Crafty! And good lines recorded by Romi against engine A may prove successful against engine B. However, I reiterate that the combined learning system is meant for human sparring where someone wanting to practice a particular line can play both sides to gain a better understanding. It does not take that many games to achieve a useful result.

And it is a valid subset of learning when it comes to learning openings, because, it is very similar to how humans store their learning over many centuries in opening books. It is just a different way of accumulating those lines than Crafty does!

I also understand that there is no way that you would ever concede that there is the slightest value to my learning system.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by bob »

Michael Sherwin wrote:But, all games are not against Crafty! And good lines recorded by Romi against engine A may prove successful against engine B. However, I reiterate that the combined learning system is meant for human sparring where someone wanting to practice a particular line can play both sides to gain a better understanding. It does not take that many games to achieve a useful result.

And it is a valid subset of learning when it comes to learning openings, because, it is very similar to how humans store their learning over many centuries in opening books. It is just a different way of accumulating those lines than Crafty does!

I also understand that there is no way that you would ever concede that there is the slightest value to my learning system.
There is a "slight value". Just as there is a "slight value" to my book learning system. But (a) "learning" is the wrong word; (b) if you just learn by losing or by winning, you are most certainly not learning from playing A so that you can use that to beat B. I'd bet you will find that kind of learning to be full of contradictions where a move or line is good against A and horrible when playing B. Humans don't quite learn like that.
rjgibert
Posts: 317
Joined: Mon Jun 26, 2006 9:44 am

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by rjgibert »

Don't let RH bother you. What you are doing is perfectly fine and interesting and has plenty of practical value. His characterization that it is "flawed" is just his personal opinion, which is very far from being universal.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by Michael Sherwin »

rjgibert wrote:Don't let RH bother you. What you are doing is perfectly fine and interesting and has plenty of practical value. His characterization that it is "flawed" is just his personal opinion, which is very far from being universal.
Thanks Ricardo!

Romi has promoted to division 3 at WBEC so we shall see if she can use what was learned from division 4 engines to her advantage. I suspect that Romi will do quite well. If not then maybe Bob is correct. Lets wait till then for more answers. :D
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by bob »

rjgibert wrote:Don't let RH bother you. What you are doing is perfectly fine and interesting and has plenty of practical value. His characterization that it is "flawed" is just his personal opinion, which is very far from being universal.
It is a long way from being "not universal". That type of learning has not worked very well, and many programs have various flavors of it, from adding lines to the book, to flagging lines as good or bad (as is done in Crafty) to position learning. All are way too "specific" to be of significant worth, except for playing in machine vs machine matches where many games are played. And there it simply distorts the true differences between the programs more than provides any sort of "truth" about their relative strengths.

Just the facts... unfortunately, for all of us. I've yet to see a "learning" program that would really learn anything significant with respect to chess. They all will look decent in some special cases. But the general case is far more interesting and useful.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by Michael Sherwin »

bob wrote:
rjgibert wrote:Don't let RH bother you. What you are doing is perfectly fine and interesting and has plenty of practical value. His characterization that it is "flawed" is just his personal opinion, which is very far from being universal.
It is a long way from being "not universal". That type of learning has not worked very well, and many programs have various flavors of it, from adding lines to the book, to flagging lines as good or bad (as is done in Crafty) to position learning. All are way too "specific" to be of significant worth, except for playing in machine vs machine matches where many games are played. And there it simply distorts the true differences between the programs more than provides any sort of "truth" about their relative strengths.

Just the facts... unfortunately, for all of us. I've yet to see a "learning" program that would really learn anything significant with respect to chess. They all will look decent in some special cases. But the general case is far more interesting and useful.
Bob, I mean no disrespect but, can you give an accurate description of exactly what Romi is doing when it learns? Or are you just discounting it on general terms?
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by bob »

Michael Sherwin wrote:
bob wrote:
rjgibert wrote:Don't let RH bother you. What you are doing is perfectly fine and interesting and has plenty of practical value. His characterization that it is "flawed" is just his personal opinion, which is very far from being universal.
It is a long way from being "not universal". That type of learning has not worked very well, and many programs have various flavors of it, from adding lines to the book, to flagging lines as good or bad (as is done in Crafty) to position learning. All are way too "specific" to be of significant worth, except for playing in machine vs machine matches where many games are played. And there it simply distorts the true differences between the programs more than provides any sort of "truth" about their relative strengths.

Just the facts... unfortunately, for all of us. I've yet to see a "learning" program that would really learn anything significant with respect to chess. They all will look decent in some special cases. But the general case is far more interesting and useful.
Bob, I mean no disrespect but, can you give an accurate description of exactly what Romi is doing when it learns? Or are you just discounting it on general terms?
I am discounting it on general terms. You can find a ton of "learning programs" dating all the way back to Samuel's checker program and going forward. The last I remember was Knightcap on ICC, using TD learning. The general problem is that this is learning based on shock therapy as in trying to shock a rat to make him run a maze in the shortest time by learning that wrong turns are painful. I don't learn like that. Here's an old position Dave Slate published years ago:

[D]4r2k/q1p2ppp//4b2R/3Pn1n/2P4N/PP4PP/QR5K w - - 0 1

White wants to take that bishop on e5. But it can't be taken. Some tries:

1. dxe5. Fails to a smothered mate. Ngf2 (or Nef2), Nxf2, Nxf2+, Kg1, Nh3+, Kh1 (kf1? Qf2#) Qg1+ Rxg1 Nf2#

2. Rxe5 Rxe5 and if dxe5 we get the smothered mate theme again.

Programs today can see this easily enough. But the old position learning idea took several passes to figure this out if you restrict the depth to 3-4 plies. The computer takes with the pawn, and then realizes it gets mated. It takes with the rook, and discovers it wins a bishop and loses the rook because if the d-pawn leaves d4 the smothered mate comes back again.

Now you can argue that after 3-4 tries, it will figure this out. But move the a-pawn to a3 and it is again clueless, and has to again experiment 3-4 times before it works that one out. Then move the pawn to a4, or a5 or a6, then move the b pawn up, then the c pawn (except to c5 of course where it blocks the smothered mate.

As a human I don't learn that way. I detect the theme of the smothered mate, which I learned 50 years ago, and whenever I see this type of setup, with a knight attacking f2 and the queen on the a7-g1 diagonal, the smothered mate theme immediately pops into my head.

So no, I don't call anything done to date as viable learning. In any program I have seen. Morph from UCI learned. But badly. Knightcap learned. But slowly and not very well, although thankfully it used TD learning and not just remembering patterns. Crafty learns with respect to learning to avoid ugly book lines and playing lines that seem to be reasonable. But it learns that blindly, not really having a clue as to which move was actually bad in the line.

That's my criticism of all learning approaches used in chess to date. There are others dealing with local maxima, learning against different styles of play (what happens if you play a strong endgame-type program, and learn for weeks, then play an aggressive kingside attacker? Some of that learning will be undone. Because it is all randomly guided based on game results rather than actually learning _why_ something didn't turn out well.
jarkkop
Posts: 198
Joined: Thu Mar 09, 2006 2:44 am
Location: Helsinki, Finland

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by jarkkop »

Have you tried an idea to calculate hash signature for common patterns (mating patters comes to my mind) and probing these and then active some search technique to setup a trap? You would be only interested in certain pieces and their place when calculating the hash. Don't ask me how to do that but is that feasible/doable in your opinion?

- Jarkko
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by bob »

jarkkop wrote:Have you tried an idea to calculate hash signature for common patterns (mating patters comes to my mind) and probing these and then active some search technique to setup a trap? You would be only interested in certain pieces and their place when calculating the hash. Don't ask me how to do that but is that feasible/doable in your opinion?

- Jarkko
Difficult to discuss without a lot of prior thought. Pattern-matching has been a great bugaboo for many years. There are lots of good projects, but none deal with chess (some deal with tracking people or targets as they move from camera/radar to camera/radar, etc. But for chess, no one has found anything that is tractable, because you have to recognize the pattern, and then still do some sort of directed search.
jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

Re: RomiChessX64P3k vs Crafty-23.1-win64 learning test under

Post by jhaglund »

Several have asked me to add position learning back into crafty, which would likely just about eliminate this kind of learning result because Crafty would also be learning what to not repeat the next time around... But that's a different issue.
:D I am one of those people. I just wanted to suggest an enable|disable type command for the crafty.rc so it doesn't play with your testing control.

This feature was the reason I got into computer chess back in 1997.