backward pawns in Stockfish

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: backward pawns in Stockfish

Post by mcostalba »

lech wrote:after 300 games sfx vs sf: +113 -86 =101
next session tomorow :)
+31 ELO !!!! :shock:

Well, it seems a bit too much ;-) probably tomorrow we won't be so lucky.
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: backward pawns in Stockfish

Post by lech »

mcostalba wrote:
lech wrote:after 300 games sfx vs sf: +113 -86 =101
next session tomorow :)
+31 ELO !!!! :shock:

Well, it seems a bit too much ;-) probably tomorrow we won't be so lucky.
Of course the result of 3rd 100 games seems to be strange. Unfortunately, there are the strings of wins. :cry: Sf is able to win 6 (5,4) games one by one. Sfx rather not. I start each 100 games after reset. I don't use this comp. :?
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: backward pawns in Stockfish

Post by lech »

mcostalba wrote: +31 ELO !!!! :shock:
Well, it seems a bit too much ;-) probably tomorrow we won't be so lucky.
after 400 games: sfx vs sf: +149 -114 =137
I am not a lucky man :cry: , thus +5 ELO wouldl be a good result. :lol:
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: backward pawns in Stockfish

Post by lech »

mcostalba wrote: +31 ELO !!!! :shock:
Well, it seems a bit too much ;-) probably tomorrow we won't be so lucky.
Marco, you wrote that now (version 1.8) it is possible. :D
The match will not be continued. I was honest (the setting were equal for both side), but I think that the result is over any trust. I understand it. :(
after 500 games (5 x 100 - maybe it is an answer)
sfx vs sf: +193 -141 =166 it is too much, why ??????
I like this play: "how to catch RYBKA". I hope that SF's team can do it. :D
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: backward pawns in Stockfish

Post by lech »

lech wrote:
sfx vs sf: +193 -141 =166 it is too much, why ??????
I tested another my idea (seemed to be logical). Unfortunatelly, it is very hard to get any good result.
But now, I know that all the previous test is OK. :shock:
Justin Sherron
Posts: 29
Joined: Thu Mar 04, 2010 11:35 pm

Re: backward pawns in Stockfish

Post by Justin Sherron »

[/quote]
sfx vs sf: +193 -141 =166 it is too much, why ??????
[/quote]

Hi Marek, could you please clarify the cumulative patching you used when testing? With the discussion between you and Marco, it wasn't clear to me what patchwork you finally decided to use when you got these results. I would like to give it a try myself and see what happens :D
Thanks,
-Justin
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: backward pawns in Stockfish

Post by lech »

Justin Sherron wrote: Hi Marek, could you please clarify the cumulative patching you used when testing? With the discussion between you and Marco, it wasn't clear to me what patchwork you finally decided to use when you got these results. I would like to give it a try myself and see what happens :D
Thanks,
-Justin
Hi Justin, I am using only this patch:

Code: Select all

// Test for backward pawn 
      // 
      // If the pawn is passed, isolated, or member of a pawn chain 
      // it cannot be backward. If can capture an enemy pawn or if 
      // there are friendly pawns behind on neighboring files it cannot 
      // be backward either. 
      if (   (passed | isolated | chain) 
          || (ourPawns & attack_span_mask(opposite_color(Us), s)) 
          || &#40;pos.attacks_from<PAWN>&#40;s, Us&#41; & theirPawns&#41;) 
          backward = false; 
      else 
      &#123; 
          // We now know that there are no friendly pawns beside or behind this 
          // pawn on neighboring files. We now check whether the pawn is 
          // backward by looking in the forward direction on the neighboring 
          // files, and seeing whether we meet a friendly or an enemy pawn first. 
            b = this_and_neighboring_files_bb&#40;f&#41; & rank_bb&#40;Us == WHITE ? r+1 &#58; r-1&#41;; 

          // Note that we are sure to find something because pawn is not passed 
          // nor isolated, so loop is potentially infinite, but it isn't. 
          while (!&#40;b & &#40;ourPawns | theirPawns&#41;)) 
              Us == WHITE ? b <<= 8 &#58; b >>= 8; 

          if &#40;b & file_bb&#40;f&#41; & theirPawns&#41; 
         backward = !&#40;neighboring_files_bb&#40;f&#41; & theirPawns&#41;; 
        // The friendly pawn needs to be at least two ranks closer than the enemy 
          // pawn in order to help the potentially backward pawn advance. 
          else backward = &#40;b | &#40;Us == WHITE ? b << 8 &#58; b >> 8&#41;) & theirPawns; 
        &#125; 
I complied and compared sfx.exe and sf.exe again (the same sizes in pairs). I can't get any advantage testing other ideas. All seems to be OK.
I continue my test with this patch:
After 615 games:
+241 - 170 = 204
It is a huge advantage.
I need a help to check it.
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: backward pawns in Stockfish

Post by lech »

lech wrote: +241 - 170 = 204
It is a huge advantage.
I need a help to check it.
I found the reason. :lol:
MS VC++ can compile the same code in other way (after null_move :lol: ). The SF.exe was wrong (2k too big).
Sorry, but probably, all the patch can't increase ELO.
Still it is not good play for me. I can't catch RYBKA. :oops:
Ralph Stoesser
Posts: 408
Joined: Sat Mar 06, 2010 9:28 am

Re: backward pawns in Stockfish

Post by Ralph Stoesser »

lech wrote:
lech wrote: +241 - 170 = 204
It is a huge advantage.
I need a help to check it.
I found the reason. :lol:
MS VC++ can compile the same code in other way (after null_move :lol: ). The SF.exe was wrong (2k too big).
Sorry, but probably, all the patch can't increase ELO.
Still it is not good play for me. I can't catch RYBKA. :oops:
These things happen. I've tried your code change with 1 sec games, but SF default was clearly better, therefore I have abandoned to look deeper into it.

Don't give up. Pawn eval is very interesting and important for playing strength.
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: backward pawns in Stockfish

Post by lech »

Ralph Stoesser wrote: Don't give up. Pawn eval is very interesting and important for playing strength.
Thanks Ralph, I have a new idea ...... :lol: :lol: :lol: