Oh I see. I do only have a 32bit though.Dann Corbit wrote:It's a 64 bit binary. Do you have a 64 bit operating system?swami wrote:When I load the exe in Arena 2.01, I get "Error: Create process"Dann Corbit wrote:Here is a sungorus with pst:Dann Corbit wrote:Just for fun, I am adding piece square tablesPablo Vazquez wrote:Thanks Jorge , but I don't know if there will be much of an elo increase, because I couldn't find the time to work on the evaluation and only made some search tweaks. Dann's test with the pvs version was very positive, though.
http://cap.connx.com/chess-engines/new- ... -1.4pst.7z
It beat the other in a short contest, but I do not know if it is better or even if my implementation is correct.
Sungorus 1.4
Moderators: hgm, Rebel, chrisw
-
- Posts: 6640
- Joined: Thu Mar 09, 2006 4:21 am
Re: Sungorus 1.4
-
- Posts: 12541
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Sungorus 1.4
Here is a 32 bit version:swami wrote:Oh I see. I do only have a 32bit though.Dann Corbit wrote:It's a 64 bit binary. Do you have a 64 bit operating system?swami wrote:When I load the exe in Arena 2.01, I get "Error: Create process"Dann Corbit wrote:Here is a sungorus with pst:Dann Corbit wrote:Just for fun, I am adding piece square tablesPablo Vazquez wrote:Thanks Jorge , but I don't know if there will be much of an elo increase, because I couldn't find the time to work on the evaluation and only made some search tweaks. Dann's test with the pvs version was very positive, though.
http://cap.connx.com/chess-engines/new- ... -1.4pst.7z
It beat the other in a short contest, but I do not know if it is better or even if my implementation is correct.
http://cap.connx.com/chess-engines/new- ... us.exe.bz2
-
- Posts: 6640
- Joined: Thu Mar 09, 2006 4:21 am
Re: Sungorus 1.4
Thanks for making a compile, Dann. Will test it soon.Dann Corbit wrote:Here is a 32 bit version:
http://cap.connx.com/chess-engines/new- ... us.exe.bz2
-
- Posts: 893
- Joined: Mon Jan 15, 2007 11:23 am
- Location: Warsza
Re: Sungorus 1.4
IIRC, this slight modification of eval() brought an Elo increase in a short test. I also have a bit of king safety code, but I have yet to come up with the right numbers to fill the relevant table.
Code: Select all
int sungorus::Evaluate(POS *p, int alpha, int beta)
{
int score;
score = p->mat[WC] - p->mat[BC]; // material
score += p->pst[WC] - p->pst[BC]; // pcsq
score += EvaluatePawns(p, WC) - EvaluatePawns(p, BC); // pawns
score += EvaluateKing(p, WC) - EvaluateKing(p, BC); // endgame king pcsq
if (score > alpha - 200 && score < beta + 200) // lazy eval
score += Mobility(p, WC) - Mobility(p, BC); // mobility
if (score < -MAX_EVAL) // normalize score
score = -MAX_EVAL;
else if (score > MAX_EVAL)
score = MAX_EVAL;
return p->side == WC ? score : -score; // return
}
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
http://www.pkoziol.cal24.pl/rodent/rodent.htm
-
- Posts: 6640
- Joined: Thu Mar 09, 2006 4:21 am
Re: Sungorus 1.4
With PST:
Code: Select all
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
| STS1 | STS2 | STS3 | STS4 | STS5 | STS6 | STS7 | STS8 | STS9 | STS10 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sungorus 1.4 PST | 47 | 39 | 53 | 53 | 60 | 58 | 49 | 41 | 43 | 58 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Grade | D | ? | C | C | B | C+ | D | E | E | C+ |
Score / 1000 | 601 | 539 | 692 | 633 | 657 | 787 | 603 | 527 | 559 | 707 |
Grade | B | C | B+ | B | B+ | A | B | C | C+ | A- |
Best Move : 501 / 1000 50.1 % Grade : C
Total : 6305 / 10000 63.05 % Grade : B
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
-
- Posts: 154
- Joined: Thu May 31, 2007 9:05 pm
- Location: Madrid, Spain
Re: Sungorus 1.4
Thanks Dann, I will look at it.Dann Corbit wrote:Here is a sungorus with pst:Dann Corbit wrote:Just for fun, I am adding piece square tablesPablo Vazquez wrote:Thanks Jorge , but I don't know if there will be much of an elo increase, because I couldn't find the time to work on the evaluation and only made some search tweaks. Dann's test with the pvs version was very positive, though.
http://cap.connx.com/chess-engines/new- ... -1.4pst.7z
It beat the other in a short contest, but I do not know if it is better or even if my implementation is correct.
-
- Posts: 154
- Joined: Thu May 31, 2007 9:05 pm
- Location: Madrid, Spain
Re: Sungorus 1.4
Hi Pawel,PK wrote:IIRC, this slight modification of eval() brought an Elo increase in a short test. I also have a bit of king safety code, but I have yet to come up with the right numbers to fill the relevant table.
Code: Select all
int sungorus::Evaluate(POS *p, int alpha, int beta) { int score; score = p->mat[WC] - p->mat[BC]; // material score += p->pst[WC] - p->pst[BC]; // pcsq score += EvaluatePawns(p, WC) - EvaluatePawns(p, BC); // pawns score += EvaluateKing(p, WC) - EvaluateKing(p, BC); // endgame king pcsq if (score > alpha - 200 && score < beta + 200) // lazy eval score += Mobility(p, WC) - Mobility(p, BC); // mobility if (score < -MAX_EVAL) // normalize score score = -MAX_EVAL; else if (score > MAX_EVAL) score = MAX_EVAL; return p->side == WC ? score : -score; // return }
I will also try that. Including pst, pawn structure and king centralization in the lazy eval makes sense, since they are going to be computed anyway and it will be more accurate.
IIRC from my tests, using alpha and beta to check for cutoff was as good as just using material, but I will test again.
Regards
-
- Posts: 893
- Joined: Mon Jan 15, 2007 11:23 am
- Location: Warsza
Re: Sungorus 1.4
I gave king safety one more try, this time with some funny formulas and not tables. Preliminary test shows that it just might be of some help, but please consider it a sketch rather than the real thing. Please nopte that it didn't work without those funny major_wood / minor_wood formulae, and that they are untuned. Fromwatching games I see that pawn shield code would be extremely helpful, too.
Possible improvements:
- king zone extending one layer forwards towards the enemy position, so that for Kg1 we consider squares f3-g3-h3 important (simplified idea from Rebel)
- sliders attacking through another sliders (i.e. RR on the same file) - Glass regenerates attack bb (not mobility bb) whenever a piece attacks a piece moving along the same ray
- major/minor formulae might be far more precise, even to the point of using two 2-dimensional tables of multipliers and dividers for each configuration of attackers
Possible improvements:
- king zone extending one layer forwards towards the enemy position, so that for Kg1 we consider squares f3-g3-h3 important (simplified idea from Rebel)
- sliders attacking through another sliders (i.e. RR on the same file) - Glass regenerates attack bb (not mobility bb) whenever a piece attacks a piece moving along the same ray
- major/minor formulae might be far more precise, even to the point of using two 2-dimensional tables of multipliers and dividers for each configuration of attackers
Code: Select all
int sungorus::Mobility(POS *p, int side)
{
U64 pieces;
U64 control;
U64 king_zone;
U64 att_zone;
int from, mob, att, wood_minors, wood_majors;
mob = 0;
att = 0;
wood_minors = 0;
wood_majors = 0;
king_zone = k_attacks[KingSq(p, side ^ 1) ];
pieces = PcBb(p, side, N);
while (pieces) {
from = FirstOne(pieces);
control = n_attacks[from] & ~OccBb(p);
att_zone = control & king_zone;
// mob += PopCnt(control) * 4;
att += PopCnt(att_zone);
wood_minors += 1;
pieces &= pieces - 1;
}
pieces = PcBb(p, side, B);
while (pieces) {
from = FirstOne(pieces);
control = BAttacks(OccBb(p), from);
att_zone = control & king_zone;
mob += PopCnt(control) * 4;
att += PopCnt(att_zone);
wood_minors += 1;
pieces &= pieces - 1;
}
pieces = PcBb(p, side, R);
while (pieces) {
from = FirstOne(pieces);
control = RAttacks(OccBb(p), from);
att_zone = control & king_zone;
mob += PopCnt(control) * 2;
att += PopCnt(att_zone) * 3;
wood_majors += 1;
pieces &= pieces - 1;
}
pieces = PcBb(p, side, Q);
while (pieces) {
from = FirstOne(pieces);
control = QAttacks(OccBb(p), from);
att_zone = control & king_zone;
mob += PopCnt(control);
att += PopCnt(att_zone) * 4;
wood_majors += 3;
pieces &= pieces - 1;
}
// normalize for table size
if ( wood_minors > 4 ) wood_minors = 4;
if ( wood_majors > 5 ) wood_majors = 5;
if ( att > 23 ) att = 23;
if ( wood_majors == 0 && wood_minors < 3 ) att = 0;
if ( wood_majors > 2 ) att = ( (att * 3 ) / 2 );
if ( wood_minors > 2 || wood_majors > 3 ) att = ( (att * 5 ) / 4 );
return mob + att;
}
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
http://www.pkoziol.cal24.pl/rodent/rodent.htm
-
- Posts: 482
- Joined: Thu Oct 16, 2008 4:23 am
- Location: Milky Way
Re: Sungorus 1.4
Hi Pablo,Pablo Vazquez wrote:Hi Pawel,PK wrote:IIRC, this slight modification of eval() brought an Elo increase in a short test. I also have a bit of king safety code, but I have yet to come up with the right numbers to fill the relevant table.
Code: Select all
int sungorus::Evaluate(POS *p, int alpha, int beta) { int score; score = p->mat[WC] - p->mat[BC]; // material score += p->pst[WC] - p->pst[BC]; // pcsq score += EvaluatePawns(p, WC) - EvaluatePawns(p, BC); // pawns score += EvaluateKing(p, WC) - EvaluateKing(p, BC); // endgame king pcsq if (score > alpha - 200 && score < beta + 200) // lazy eval score += Mobility(p, WC) - Mobility(p, BC); // mobility if (score < -MAX_EVAL) // normalize score score = -MAX_EVAL; else if (score > MAX_EVAL) score = MAX_EVAL; return p->side == WC ? score : -score; // return }
I will also try that. Including pst, pawn structure and king centralization in the lazy eval makes sense, since they are going to be computed anyway and it will be more accurate.
IIRC from my tests, using alpha and beta to check for cutoff was as good as just using material, but I will test again.
Regards
Have you tried using LMR in the newer version?
I think it is worth trying as it won't demand much of your time and it might give Sungorus some speed up.
Always looking forward to new releases of your very nice engine.
Regards,
-
- Posts: 482
- Joined: Thu Oct 16, 2008 4:23 am
- Location: Milky Way
Re: Sungorus 1.4
I am doing almost the same idea in my king safety code, with the only difference that instead multiplying the attacked zone count by only a fixed constant, I also use the square distance from the attacker piece to the opposite king. What do you think about that?PK wrote:I gave king safety one more try, this time with some funny formulas and not tables. Preliminary test shows that it just might be of some help, but please consider it a sketch rather than the real thing. Please nopte that it didn't work without those funny major_wood / minor_wood formulae, and that they are untuned. Fromwatching games I see that pawn shield code would be extremely helpful, too.
Possible improvements:
- king zone extending one layer forwards towards the enemy position, so that for Kg1 we consider squares f3-g3-h3 important (simplified idea from Rebel)
- sliders attacking through another sliders (i.e. RR on the same file) - Glass regenerates attack bb (not mobility bb) whenever a piece attacks a piece moving along the same ray
- major/minor formulae might be far more precise, even to the point of using two 2-dimensional tables of multipliers and dividers for each configuration of attackers
Code: Select all
int sungorus::Mobility(POS *p, int side) { U64 pieces; U64 control; U64 king_zone; U64 att_zone; int from, mob, att, wood_minors, wood_majors; mob = 0; att = 0; wood_minors = 0; wood_majors = 0; king_zone = k_attacks[KingSq(p, side ^ 1) ]; pieces = PcBb(p, side, N); while (pieces) { from = FirstOne(pieces); control = n_attacks[from] & ~OccBb(p); att_zone = control & king_zone; // mob += PopCnt(control) * 4; att += PopCnt(att_zone); wood_minors += 1; pieces &= pieces - 1; } pieces = PcBb(p, side, B); while (pieces) { from = FirstOne(pieces); control = BAttacks(OccBb(p), from); att_zone = control & king_zone; mob += PopCnt(control) * 4; att += PopCnt(att_zone); wood_minors += 1; pieces &= pieces - 1; } pieces = PcBb(p, side, R); while (pieces) { from = FirstOne(pieces); control = RAttacks(OccBb(p), from); att_zone = control & king_zone; mob += PopCnt(control) * 2; att += PopCnt(att_zone) * 3; wood_majors += 1; pieces &= pieces - 1; } pieces = PcBb(p, side, Q); while (pieces) { from = FirstOne(pieces); control = QAttacks(OccBb(p), from); att_zone = control & king_zone; mob += PopCnt(control); att += PopCnt(att_zone) * 4; wood_majors += 3; pieces &= pieces - 1; } // normalize for table size if ( wood_minors > 4 ) wood_minors = 4; if ( wood_majors > 5 ) wood_majors = 5; if ( att > 23 ) att = 23; if ( wood_majors == 0 && wood_minors < 3 ) att = 0; if ( wood_majors > 2 ) att = ( (att * 3 ) / 2 ); if ( wood_minors > 2 || wood_majors > 3 ) att = ( (att * 5 ) / 4 ); return mob + att; }