Thanks this was a positive Elo on my tests. I still need to run LTC tests, but it's promising.PK wrote:have You tried dividing history by eight at the beginning of a new search and zeroing it only when the game starts?
LMR - [for starters] - [Advance] and [Expert]
Moderators: hgm, Rebel, chrisw
-
- Posts: 433
- Joined: Fri Jan 16, 2015 4:02 pm
Re: LMR - [for starters] - [Advance] and [Expert]
zurichess - http://www.zurichess.xyz
-
- Posts: 490
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: LMR - [for starters] - [Advance] and [Expert]
Hi Ed. I changed my LMR to your initial method in the doc and had a good result. Got slightly better result when also adding || numSlides > 10 and || numSlides > 20 to the expressions that further reduce. Will keep playing but thanks. Have make ack. in code.
http://op12no2.me/toys/lozzadev
http://op12no2.me/toys/lozzadev/lozza.js
http://op12no2.me/toys/lozzadev
http://op12no2.me/toys/lozzadev/lozza.js
-
- Posts: 2056
- Joined: Mon Mar 13, 2006 2:31 am
- Location: North Carolina, USA
Re: LMR - [for starters] - [Advance] and [Expert]
Hi Ed,
Looked it over. Very interesting, as usual. I'll try the ideas that I haven't tried before. The thing that stands out to me has to do with
passers. I don't reduce any passed pawn move. It seems you do if the passer is not well advanced.
Charles
Looked it over. Very interesting, as usual. I'll try the ideas that I haven't tried before. The thing that stands out to me has to do with
passers. I don't reduce any passed pawn move. It seems you do if the passer is not well advanced.
Charles
-
- Posts: 214
- Joined: Thu Sep 01, 2011 5:38 pm
- Location: Seville, Spain
Re: LMR - [for starters] - [Advance] and [Expert]
how did you get the values of the reductions table?
table[depth][movecount]
last year I was fooling around with a formula to fill a similar table, but nothing succeeded.
I have a very simple approach (maximum reduction of 3 plys) and I couldn't get nothing better with a table with heavy reductions like this one.
table[depth][movecount]
last year I was fooling around with a formula to fill a similar table, but nothing succeeded.
I have a very simple approach (maximum reduction of 3 plys) and I couldn't get nothing better with a table with heavy reductions like this one.
Still learning how to play chess...
knigths move in "L" shape ¿right?
knigths move in "L" shape ¿right?
-
- Posts: 6993
- Joined: Thu Aug 18, 2011 12:04 pm
Re: LMR - [for starters] - [Advance] and [Expert]
By typingasanjuan wrote:how did you get the values of the reductions table?
Using logic.
I found a formula (probably derived from SF) that does a bit better than the table.asanjuan wrote:table[depth][movecount]
last year I was fooling around with a formula to fill a similar table, but nothing succeeded.
R = (int) (0.5 + log(depth) * log(movecount) / 2.1);
asanjuan wrote:I have a very simple approach (maximum reduction of 3 plys) and I couldn't get nothing better with a table with heavy reductions like this one.
Note that in the end I use a percentage on R (currently set to 50%) making the system fractional.
-
- Posts: 12541
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: LMR - [for starters] - [Advance] and [Expert]
Your logarithmic formula is similar to my original "smooth scaling" formula:Rebel wrote:By typingasanjuan wrote:how did you get the values of the reductions table?
Using logic.
I found a formula (probably derived from SF) that does a bit better than the table.asanjuan wrote:table[depth][movecount]
last year I was fooling around with a formula to fill a similar table, but nothing succeeded.
R = (int) (0.5 + log(depth) * log(movecount) / 2.1);
asanjuan wrote:I have a very simple approach (maximum reduction of 3 plys) and I couldn't get nothing better with a table with heavy reductions like this one.
Note that in the end I use a percentage on R (currently set to 50%) making the system fractional.
double delta = approximateEval - beta;
delta = max(delta, 1.0);
double ddepth = double(depth);
double r = 0.18 * ddepth + 3.1 + log(delta)/5.0;
r = r > ddepth ? ddepth : r;
int R = int(r);
Most people don't bother with log and use linear approximations or use the logistic curve.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 12541
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: LMR - [for starters] - [Advance] and [Expert]
SF uses a table. It does seem to follow your formula pretty closely:Rebel wrote:By typingasanjuan wrote:how did you get the values of the reductions table?
Using logic.
I found a formula (probably derived from SF) that does a bit better than the table.asanjuan wrote:table[depth][movecount]
last year I was fooling around with a formula to fill a similar table, but nothing succeeded.
R = (int) (0.5 + log(depth) * log(movecount) / 2.1);
asanjuan wrote:I have a very simple approach (maximum reduction of 3 plys) and I couldn't get nothing better with a table with heavy reductions like this one.
Note that in the end I use a percentage on R (currently set to 50%) making the system fractional.
Code: Select all
void Search::init() {
for (int imp = 0; imp <= 1; ++imp)
for (int d = 1; d < 64; ++d)
for (int mc = 1; mc < 64; ++mc)
{
double r = log(d) * log(mc) / 1.95;
Reductions[NonPV][imp][d][mc] = int(std::round(r));
Reductions[PV][imp][d][mc] = std::max(Reductions[NonPV][imp][d][mc] - 1, 0);
// Increase reduction for non-PV nodes when eval is not improving
if (!imp && Reductions[NonPV][imp][d][mc] >= 2)
Reductions[NonPV][imp][d][mc]++;
}
for (int d = 0; d < 16; ++d)
{
FutilityMoveCounts[0][d] = int(2.4 + 0.74 * pow(d, 1.78));
FutilityMoveCounts[1][d] = int(5.0 + 1.00 * pow(d, 2.00));
}
}
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 6993
- Joined: Thu Aug 18, 2011 12:04 pm
Re: LMR - [for starters] - [Advance] and [Expert]
Yep, that's the one, I recognized it from a discussion with Bob in EO.
-
- Posts: 3196
- Joined: Fri May 26, 2006 3:00 am
- Location: WY, USA
- Full name: Michael Sherwin
Re: LMR - [for starters] - [Advance] and [Expert]
Hi Ed, Dan, others I've not been very successful scaling my LMR so I gave the above formula a try and it does look promising. However my LMR has a bit different characteristics.Rebel wrote:By typingasanjuan wrote:how did you get the values of the reductions table?
Using logic.
I found a formula (probably derived from SF) that does a bit better than the table.asanjuan wrote:table[depth][movecount]
last year I was fooling around with a formula to fill a similar table, but nothing succeeded.
R = (int) (0.5 + log(depth) * log(movecount) / 2.1);
asanjuan wrote:I have a very simple approach (maximum reduction of 3 plys) and I couldn't get nothing better with a table with heavy reductions like this one.
Note that in the end I use a percentage on R (currently set to 50%) making the system fractional.
Code: Select all
reduce = 1;
if(depth > 3 && g->phase == NEXTMOVE) {
count++;
if(g->node->score + 10 < alpha) {
if(count > ((inNull > 0) << 3) && cid == EMPTY) {
s32 m = histTblg[fig][fs][ts];
s32 n = histTbln[fig][fs][ts];
if(n > 49 && m/n < 16) {
reduce += ((int) (0.5 + log(depth) * log(count) / (log(m/n+1) + 1)));
}
}
}
}
if(reduce == 1) {
g->node->score = -Search(-beta, -alpha, depth-1, extendBy);
} else {
g->node->score = -Search(-alpha-1, -alpha, depth - reduce, extendBy);
if(g->node->score > alpha)
g->node->score = -Search(-beta, -alpha, depth - 1, extendBy);
}
Code: Select all
case ADDMOVES:
h->phase = NEXTMOVE;
AddMoves(h->node, depth);
if(h->node == (h+1)->t) return FALSE;
if(depth > 3) {
for(node = h->node; node < (h+1)->t; node++) {
Sort(node, (h+1)->t);
MakeMove((moves *)&node->m);
if(GetReps())
node->score = 0;
else {
inShort++;
node->score = -Search(-beta - 180, -alpha + 20, depth > 7 ? 3 : 1, extendBy);
inShort--;
}
ClrReps();
TakeBack();
}
}
So I tried to include that functionality in the function. Does that look like a good approach or is there a better way. Any other observations, suggestions welcomed. Thanks.
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
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
-
- Posts: 3196
- Joined: Fri May 26, 2006 3:00 am
- Location: WY, USA
- Full name: Michael Sherwin
Re: LMR - [for starters] - [Advance] and [Expert]
Sorry Dann, I'm sure I hit two n but ever since I installed windows ten ...
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
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