LMR - [for starters] - [Advance] and [Expert]

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: LMR - [for starters] - [Advance] and [Expert]

Post by Michael Sherwin »

For those engines that use history tables for LMR you might want to try something like this.

Code: Select all

              s32 m = histTblg[fig][fs][ts];
              s32 n = histTbln[fig][fs][ts];
	      if&#40;n > 49 && m/n < 16&#41; &#123;
                reduce += &#40;int&#41;&#40;1.0 + sqrt&#40;sqrt&#40;depth&#41; * sqrt&#40;count&#41;) / &#40;log&#40;m/n+1&#41;+1&#41;);
              &#125;
So if depth = 4 and count = 16 and hist% is the max 15 then it would look like

R = 1 + sqrt(2 x 4) / 2.2 = 1

however if hist% = 0 it would look like this

r = 1 + sqrt(2 x 4) / 1 = 3

An extreme case might look like

r = 1 + sqrt(6 x 10) / 1 = 8;
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
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: LMR - [for starters] - [Advance] and [Expert]

Post by Michael Sherwin »

Even though everyone seems to be out to lunch on this topic I will report that it is giving me new best results. However I had to add the line.

reduce = min(reduce, 5);
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
zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: LMR - [for starters] - [Advance] and [Expert]

Post by zenpawn »

What are the two history tables in your code snippet? (I only have one.)

Thanks,
-Erin
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: LMR - [for starters] - [Advance] and [Expert]

Post by Henk »

Yes please don't use unidentified symbols in your code snippets. Stupid nerds.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: LMR - [for starters] - [Advance] and [Expert]

Post by Michael Sherwin »

zenpawn wrote:What are the two history tables in your code snippet? (I only have one.)

Thanks,
-Erin
s32 m = histTblg[fig][fs][ts]; +100 when move qualifies
s32 n = histTbln[fig][fs][ts]; +1 every time

so m/n is a %
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
zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: LMR - [for starters] - [Advance] and [Expert]

Post by zenpawn »

Ah, the so-called butterfly table. I have one of those. :) Thanks.