80+ S
75+ A+
70+ A
65+ B+
60+ B
55+ C+
50+ C
45+ D
40+ E
<40 F
Realizing that there are many engines that are rated 1600-1950 such as engine called Gerbil scoring well below 40 in one of the test, I think I'd extend the scoring to the minimum of 35 as the passing grade. So it'd be
35 + P
<35 F
No need to bend the scale. Some engines will flunk a subject, and that just means that they need a remedial class.
It's a hint to the programmer that he can pick up a big pile of Elo cash by simply putting a strategic band-aid on his evaluation.
P.S.
I guess Ferret would get an S, if we could get our hands on a copy.
80+ S
75+ A+
70+ A
65+ B+
60+ B
55+ C+
50+ C
45+ D
40+ E
<40 F
Realizing that there are many engines that are rated 1600-1950 such as engine called Gerbil scoring well below 40 in one of the test, I think I'd extend the scoring to the minimum of 35 as the passing grade. So it'd be
35 + P
<35 F
No need to bend the scale. Some engines will flunk a subject, and that just means that they need a remedial class.
It's a hint to the programmer that he can pick up a big pile of Elo cash by simply putting a strategic band-aid on his evaluation.
P.S.
I guess Ferret would get an S, if we could get our hands on a copy.
P.P.S.
This is Gerbil's complete evaluation function (less the piece square and King safety lookup tables):
// This simple eval function just sums piece-square and material values.
int ValEval(PCON pcon, PSTE pste)
{
int argval[coMAX];
int co;
int val;
val = ValPawns(pcon, pste);
for (co = coWHITE; co <= coBLACK; co++) {
int i;
argval[co] = 0;
for (i = 0; i < pcon->argcpi[co]; i++) {
PPI ppi = &pcon->argpi[co][i];
if (!ppi->fDead) {
argval[co] += ppi->val;
if ((ppi->pc == pcKING) &&
(pste->valPcThem <= 2 * valROOK + valMINOR))
argval[co] += c_argvalEKing[ppi->co][ppi->isq];
else
argval[co] += c_argvalPos[ppi->pc][ppi->co][ppi->isq];
}
}
}
val += argval[pste->coUs];
val -= argval[pste->coUs ^ 1];
return val;
}
Should we be surprised at positional inadequacies?
The whole concept of Gerbil was to show how to write a super-simple chess engine. It doesn't have a fancy search. It doesn't have a fancy eval. It doesn't have a fancy anything.
It is remarkably well written, and the function callback idea is one that could be gainfully employed by other chess engines, though not many do.
80+ S
75+ A+
70+ A
65+ B+
60+ B
55+ C+
50+ C
45+ D
40+ E
<40 F
Realizing that there are many engines that are rated 1600-1950 such as engine called Gerbil scoring well below 40 in one of the test, I think I'd extend the scoring to the minimum of 35 as the passing grade. So it'd be
35 + P
<35 F
No need to bend the scale. Some engines will flunk a subject, and that just means that they need a remedial class.
It's a hint to the programmer that he can pick up a big pile of Elo cash by simply putting a strategic band-aid on his evaluation.
P.S.
I guess Ferret would get an S, if we could get our hands on a copy.
P.P.S.
This is Gerbil's complete evaluation function (less the piece square and King safety lookup tables):
// This simple eval function just sums piece-square and material values.
int ValEval(PCON pcon, PSTE pste)
{
int argval[coMAX];
int co;
int val;
val = ValPawns(pcon, pste);
for (co = coWHITE; co <= coBLACK; co++) {
int i;
argval[co] = 0;
for (i = 0; i < pcon->argcpi[co]; i++) {
PPI ppi = &pcon->argpi[co][i];
if (!ppi->fDead) {
argval[co] += ppi->val;
if ((ppi->pc == pcKING) &&
(pste->valPcThem <= 2 * valROOK + valMINOR))
argval[co] += c_argvalEKing[ppi->co][ppi->isq];
else
argval[co] += c_argvalPos[ppi->pc][ppi->co][ppi->isq];
}
}
}
val += argval[pste->coUs];
val -= argval[pste->coUs ^ 1];
return val;
}
Should we be surprised at positional inadequacies?
The whole concept of Gerbil was to show how to write a super-simple chess engine. It doesn't have a fancy search. It doesn't have a fancy eval. It doesn't have a fancy anything.
It is remarkably well written, and the function callback idea is one that could be gainfully employed by other chess engines, though not many do.
He does spend some effort examining pawns, so I guess that Gerbil will do well at pawn formation tests.
int ValPawns(PCON pcon, PSTE pste)
{
PHASHP phashp = &s_rghashp[pste->hashkPn & s_chashpMac];
if (phashp->hashk != pste->hashkPn) {
int argval[coMAX]; // Total value of pawn features.
BM argbmLoc[coMAX]; // Bits set for pawns that exist.
BM bmDoubled; // Bit set indicates doubled pawn.
BM bmIsolated; // Bit set indicates isolated pawn.
int coUs; // Loop counter.
bmDoubled.qw = 0;
bmIsolated.qw = 0;
for (coUs = coWHITE; coUs <= coBLACK; coUs++) {
BM bmI;
int i;
argval[coUs] = 0;
//
// Collect locations.
//
argbmLoc[coUs].qw = 0;
for (i = 0; i < pcon->argcpi[coUs]; i++) {
PPI ppi = &pcon->argpi[coUs][i];
if ((ppi->pc != pcPAWN) || (ppi->fDead))
continue;
argbmLoc[coUs].qw |= (U64)1 << c_argisq64[ppi->isq];
}
// Collect doubled pawn info. I'm see if there is more than one
// pawn of a certain color on the a-file, if there is I will OR
// all of those pawns into the "bmDoubled" bitmap, then I'll try
// the b-file, and so on.
//
bmI.qw = (U64)0x0101010101010101; // Start with a1...a8.
for (;;) {
BM bmS;
BM bmT;
// Get all pawns of this color on this file.
//
bmS.qw = argbmLoc[coUs].qw & bmI.qw;
//
// If more than one bit set in this map, all the pawns of
// this color on this file are doubled.
//
if (bmS.qw & (bmS.qw - 1))
bmDoubled.qw |= bmS.qw;
//
// I'm going to make a map of all the pawns on files adjacent
// to this file. If there are no pawns in that map, all the
// pawns on this file are isolated.
//
bmT.qw = 0;
if (!(bmI.qw & 0x01))
bmT.qw |= bmI.qw >> 1;
if (!(bmI.qw & 0x80))
bmT.qw |= bmI.qw << 1;
if (!(bmT.qw & argbmLoc[coUs].qw))
bmIsolated.qw |= bmS.qw;
//
// Set up to examine the next file. 0x80 is the h-file, so
// if we just examined it, bomb out of the loop, otherwise
// shift to the next file.
//
if (bmI.qw & 0x80)
break;
bmI.qw += bmI.qw; // Examine file one to the right.
}
}
//#ifdef DEBUG
// VDumpPawnMaps("!11",
// argbmLoc, "Loc",
// &bmDoubled, "Doubled",
// &bmIsolated, "Isolated");
//#endif
for (coUs = coWHITE; coUs <= coBLACK; coUs++) {
int i;
for (i = 0; i < pcon->argcpi[coUs]; i++) {
PPI ppi = &pcon->argpi[coUs][i];
BM bmLoc;
if ((ppi->pc != pcPAWN) || (ppi->fDead))
continue;
bmLoc.qw = (U64)1 << c_argisq64[ppi->isq];
if (bmLoc.qw & bmIsolated.qw) {
if (bmLoc.qw & bmDoubled.qw)
argval[coUs] -= valDOUBLED_ISO;
else
argval[coUs] -= valISOLATED;
} else {
if (bmLoc.qw & bmDoubled.qw)
argval[coUs] -= valDOUBLED;
}
}
}
phashp->hashk = pste->hashkPn;
phashp->val = argval[coWHITE] - argval[coBLACK];
}
return (pste->coUs == coWHITE) ? phashp->val : -phashp->val;
}
Dann Corbit wrote:No need to bend the scale. Some engines will flunk a subject, and that just means that they need a remedial class.
It's a hint to the programmer that he can pick up a big pile of Elo cash by simply putting a strategic band-aid on his evaluation.
I've to run a lot of tests with engines 1700-1900 to determine whether enough of them score below 35. If yes, then I think 35 as a passing grade makes sense. If not many engines get below 35 then 40 as the passing grade would make sense.
Dann Corbit wrote:He does spend some effort examining pawns, so I guess that Gerbil will do well at pawn formation tests.
How was the code for Bishop vs Knight constructed in Gerbil, are there enough stuff in it? since Gerbil scored really high ~ 65/100, which was on par with many stronger engines of reasonable strength ~2500. I'd assume that there's a code well constructed concerning evaluation of Bishop and Knight Trade-offs.
I'd bet code having something to do with the ideas behind the "Open files and diagonals" is not done enough. That maybe an area of improvement, it would play even better if this was improved.