On-line blitz tourney March

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: On-line blitz tourney March

Post by hgm »

I don't have your e-mail. Just login as Climber, and I will convert it to a registered account on the fly.
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: On-line blitz tourney March

Post by hgm »

Code: Select all

:Tourney Players: Round 9 of 9 
:
:     Name              Rating Score Perfrm Upset  Results 
:     ----------------- ------ ----- ------ ------ ------- 
:  1 +Sjeng             [2190]  8.5  [2210] [   0] +07w =05w +10b +04w +08b +03w +12b +02w +09b 
:  2 +WaDuuttie         [1946]  7.0  [2047] [  37] +08w +07b =03w =05w +10b +12w +14b -01b +06w 
:  3 +Nightmare         [1990]  6.5  [2073] [   0] +15w +09w =02b +12w +04b -01b +05w =06b =10w 
:  4 +CraftyRB          [1963]  6.5  [2032] [   0] +13w +06w =05b -01b -03w +09w +10b +15b +12w 
:  5 +Goldbar           [1888]  5.5  [1903] [ 217] +14w =01b =04w =02b +06w +08b -03b -09w +15w 
:  6 -Baron             [1870]  5.0  [1826] [  66] +17w -04b +11w +09w -05b =10w +07b =03w -02b 
:  7 +Arminius          [1768]  5.0  [1731] [   0] -01b -02w +18b -10w +11b +15b -06w +17w +16b 
:  8 +Jazz              [1481]  5.0  [1731] [ 264] -02b +14w +17b +13b -01w -05w -09b +16w +18w
:  9 +Texel             [1876]  4.5  [1804] [  54] +16w -03b =12w -06b +13w -04b +08w +05b -01w 
: 10 +Rookie            [1817]  4.5  [1877] [ 184] +18w =12b -01w +07b -02w =06b -04w +11b =03b 
: 11 +Myrddin           [1537]  4.5  [1643] [ 159] -12b +18w -06b =15b -07w +13b +16w -10w +17b 
: 12 +ArasanX           [1961]  4.0  [1770] [   0] +11w =10w =09b -03b +14w -02b -01w +13b -04b 
: 13 +Joker             [1551]  4.0  [1572] [ 124] -04b +17w +16b -08w -09b -11w +18b -12w +14b 
: 14 +Spartacus         [1465]  4.0  [1583] [ 297] -05b -08b +15w +16w -12b +17w -02w +18b -13w 
: 15 +Capivara          [1552]  3.5  [1564] [ 123] -03b +16w -14b =11w +18b -07w +17b -04w -05b 
: 16 +NebiyuHG          [1347]  2.0  [1350] [ 328] -09b -15b -13w -14b +17w +18w -11b -08b -07w
: 17 +microMax          [1249]  1.0  [1271] [ 426] -06b -13b -08w +18w -16b -14b -15w -07b -11w 
: 18 +Abulafia          [   0]  0.0  [1129] [   0] -10b -11b -07w -17b -15w -16b -13w -14w -08b 
:
:     Average Rating    1732.4 
:
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: On-line blitz tourney March

Post by Evert »

Not unhappy with how Jazz did in this (especially since I found a bug in my handling of increment time controls this afternoon), but very annoyed that it crashed on my twice. I'll need to look into that, since it shouldn't happen, ever.

It's either the larger transposition table I used for this, or it's something about the time controls it doesn't like. Hurray for debugging!
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: On-line blitz tourney March

Post by Evert »

Ok, so it looks like it's neither the transposition table nor the time controls. It's the pondering. When entering the ponder search, the ponder-move is played unconditionally. That's fine if there actually is one, but it can happen that there is no ponder move if the last search just got stuck on a deep hash entry. In that case Jazz would play a null move (incorrectly, it would actually try to move pawn from a1 to a1, which probably does nothing in the end but I'm not entirely sure off the top of my head). This is harmless in many cases, but not if the side-to-move is in check. All sort of things go horribly pear-shaped if a king comes off the board (not necessarily leading to a crash because I use copy-make rather than make-unmake).

Needs testing to confirm that I've really dealt with the problem though...

(EDIT: probably not, null-move was checked for, but the code may actually set the ponder move to something completely random if there is none, which is probably even worse).
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: On-line blitz tourney March

Post by hgm »

Indeed, I was also surprised when I implemented pondering in my engines to find how often it occurs that a search does not come up with any result at all, so that when time runs out you just play the root's hash move. Shokidoki still gives a -320.00 score when this happens (although I did fix it to return a move in such cases), and on average I see this happening about twice per game!
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: On-line blitz tourney March

Post by Evert »

It's not quite that common for me, but it probably helps that I've added more strict assertions so the problem is caught much earlier.

A cheap-and-dirty way to get rid of it is to disallow exact hash cut-offs in PV nodes near the root. It's not very elegant, but it should solve the problem with little extra effort. Question is what is worse: not having a ponder-move every so often, or not accepting exact cutoffs at low depth...
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: On-line blitz tourney March

Post by hgm »

A better solution might be to ponder for the opponent if you have no move. Or ponder for the opponent until you reach a certain depth, and then ponder the best move from that depth.

The ponder search could be a normal root search with the tiny extra that after a certain iteration you would no longer search any other move than the first. Normally you would reach that depth instantly from hash hits on the root daughters, which are already deep enough.

You could refine it by not completely disable the other moves, but just apply LMR to them with such a large reduction they take negligible time. Then when the ponder move at some depth will dramatically fail low, it would be able to alter it to a more sensible move.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: On-line blitz tourney March

Post by Evert »

hgm wrote:A better solution might be to ponder for the opponent if you have no move. Or ponder for the opponent until you reach a certain depth, and then ponder the best move from that depth.

The ponder search could be a normal root search with the tiny extra that after a certain iteration you would no longer search any other move than the first. Normally you would reach that depth instantly from hash hits on the root daughters, which are already deep enough.

You could refine it by not completely disable the other moves, but just apply LMR to them with such a large reduction they take negligible time. Then when the ponder move at some depth will dramatically fail low, it would be able to alter it to a more sensible move.
Sounds very sensible. Unfortunately Jazz supports UCI as well as XBoard, and I don't feel like implementing different ponder functions for the two of them - and UCI has a very narrow idea of what you're supposed to do during a ponder search...
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: On-line blitz tourney March

Post by hgm »

It seems a mistake to use allow a protocol to limit the quality of your engine... :lol:
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: On-line blitz tourney March

Post by AlvaroBegue »

Evert wrote:
hgm wrote:A better solution might be to ponder for the opponent if you have no move. Or ponder for the opponent until you reach a certain depth, and then ponder the best move from that depth.

The ponder search could be a normal root search with the tiny extra that after a certain iteration you would no longer search any other move than the first. Normally you would reach that depth instantly from hash hits on the root daughters, which are already deep enough.

You could refine it by not completely disable the other moves, but just apply LMR to them with such a large reduction they take negligible time. Then when the ponder move at some depth will dramatically fail low, it would be able to alter it to a more sensible move.
Sounds very sensible. Unfortunately Jazz supports UCI as well as XBoard, and I don't feel like implementing different ponder functions for the two of them - and UCI has a very narrow idea of what you're supposed to do during a ponder search...
You could make a depth-2 search for a ponder move when you don't have one at all. Having to do that a couple of times per game doesn't cost you anything, and most of the time you'll be pondering on a reasonable move. Actually, I think transposition-table hits will make the depth-2 search return the correct move most of the time.