Simplifying code II
Moderator: Ras
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code II
"Does not matter if code contains bugs. Only matters if code is maintainable/readable. For if it is readable you can debug it"
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code II
LMR giving no improvement in my implementation. Even for extending captures.
Singular extensions neither. But should be tested better.
Aspiration searches no improvement.
Looks like only improving evaluation might give bit more Elo.
O wait it does a research when if (!(lb + 1== ub && reduction ==1 || val >= ub))
Doubt it that is correct because if val >= ub and reduction == 1 then it should do research too.
Being idiot again may be can start all over with testing.
Singular extensions neither. But should be tested better.
Aspiration searches no improvement.
Looks like only improving evaluation might give bit more Elo.
O wait it does a research when if (!(lb + 1== ub && reduction ==1 || val >= ub))
Doubt it that is correct because if val >= ub and reduction == 1 then it should do research too.
Being idiot again may be can start all over with testing.
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code II
Doubt it that is correct because if val >= ub and reduction > 1 then it should do research too.
Being idiot again may be can start all over again with testing.
Code should be
Grrr.
Being idiot again may be can start all over again with testing.
Code should be
Code: Select all
if ((lb + 1== ub || val >= ub) && reduction == 1)
{
} else
{
//research
}
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code II
Using this now. Doubt if it is giving any gain
Code: Select all
int reduction = (depth <= 2 || mvIsCapture ) ? 1 : 2;
var nullWindowValue = AlphaBetaSearch(out counterMoveLine, -(lb + 1), -lb, depth - reduction, check);
val = nullWindowValue.HasValue ? -nullWindowValue.Value : null;
if (val.HasValue)
{
if (val > lb && (reduction > 1 || lb + 1 < ub))
{
// research
var researchVal = AlphaBetaSearch(out counterMoveLine, -ub, -lb, depth - 1, check);
val = researchVal.HasValue ? -researchVal.Value : null;
}
}
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code II
Looks like bit better than plain alphabeta. No large gain.
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code II
Unclear. May even be worse than plain alpha beta. Probably because of extending bad captures as well.