New Brasilian engine Xadreco 3.1 (Author Ruben Carlo Benante)
Web page:
http://www.geocities.com/pag_sax/xadreco/
Moderator: Andres Valverde
Igor Gorelikov wrote:New Brasilian engine Xadreco 3.1 (Author Ruben Carlo Benante)
Web page:
http://www.geocities.com/pag_sax/xadreco/
//bonificacao para rei protegido na abertura com os peoes do Escudo Real
if(tabu.numero<16)
{
if(tabu.tab[6][0]==-REI &&
tabu.tab[5][1]==tabu.tab[6][1]==tabu.tab[7][1]==-PEAO &&
tabu.tab[7][0]!=-TORRE) //brancas com roque pequeno
totb+=5;
if(tabu.tab[2][0]==-REI &&
tabu.tab[1][1]==tabu.tab[2][1]==-PEAO) //brancas com roque grande
totb+=3;
if(tabu.tab[6][7]==REI &&
tabu.tab[5][6]==tabu.tab[6][6]==tabu.tab[7][6]==PEAO &&
tabu.tab[7][7]!=TORRE) //pretas com roque pequeno
totp+=5;
if(tabu.tab[2][7]==REI &&
tabu.tab[1][6]==tabu.tab[2][6]==PEAO) //pretas com roque grande
totp+=3;
}
// Pawn shield for the king during the opening:
if (tabu.numero < 16) {
// white with kingside castle
if (tabu.tab[6][0] == -REI && tabu.tab[5][1] == -PEAO && tabu.tab[6][1] == -PEAO && tabu.tab[7][1] == -PEAO && tabu.tab[7][0] != -TORRE)
totb += 5;
// white with queenside castle
if (tabu.tab[2][0] == -REI && tabu.tab[1][1] == -PEAO && tabu.tab[2][1] == -PEAO)
totb += 3;
// black with kingside castle
if (tabu.tab[6][7] == REI && tabu.tab[5][6] == PEAO && tabu.tab[6][6] == PEAO && tabu.tab[7][6] == PEAO && tabu.tab[7][7] != TORRE)
totp += 5;
// black with queenside castle
if (tabu.tab[2][7] == REI && tabu.tab[1][6] == PEAO && tabu.tab[2][6] == PEAO)
totp += 3;
}
Guenther Simon wrote:It seems it does not support time controls moves/time,
if a time control at all?
At least here it loses on time in move 13-16 at various
time controls with 40moves/time X.
Regards,
Guenther
if(!strcmp(movinito,"level") && xboard)
{
scanf("%s",movinito);
if(debug)
fprintf(fsaida,"winboard: %s\n",movinito);
moves=atoi(movinito);
scanf("%s",movinito);
if(debug)
fprintf(fsaida,"winboard: %s\n",movinito);
minutes=atoi(movinito);
scanf("%s",movinito);
if(debug)
fprintf(fsaida,"winboard: %s\n",movinito);
incre=atoi(movinito);
if(moves<=0)
moves=100;
if(minutes<=0)
minutes=2;
incre-=2;
if(incre<0)
incre=0;
tempomov=minutes*60000/moves + incre*1000;
beco wrote:Guenther Simon wrote:It seems it does not support time controls moves/time,
if a time control at all?
At least here it loses on time in move 13-16 at various
time controls with 40moves/time X.
Regards,
Guenther
Hi dear Guenther,
I just signed this forum. Very great place.
Well, you are right: version 3.1 does not support time.
But now, the new version 5.0 do. And the home page now has an english version.
Look for (search) variable tempomov in the source code and you will see the threshold when flag fell!
I can cite the command "level" for winboard here. It is in the line 2202.
- Code: Select all
if(!strcmp(movinito,"level") && xboard)
{
scanf("%s",movinito);
if(debug)
fprintf(fsaida,"winboard: %s\n",movinito);
moves=atoi(movinito);
scanf("%s",movinito);
if(debug)
fprintf(fsaida,"winboard: %s\n",movinito);
minutes=atoi(movinito);
scanf("%s",movinito);
if(debug)
fprintf(fsaida,"winboard: %s\n",movinito);
incre=atoi(movinito);
if(moves<=0)
moves=100;
if(minutes<=0)
minutes=2;
incre-=2;
if(incre<0)
incre=0;
tempomov=minutes*60000/moves + incre*1000;
See you!
Beco.
Josu? Forte wrote:Hi Ruben,
I am glad to see a new Brazilian chess engine.
Due to my professional activities I took a temporary break in chess programming but I will be back with a new version of my engine Matheus.
Well, if you need any help feel free to get in contact.
Good luck with Xadreco.
Um abra?o,
Josu?
Dann Corbit wrote:Probably, something like this is what was wanted:
- Code: Select all
// Pawn shield for the king during the opening:
if (tabu.numero < 16) {
// white with kingside castle
if (tabu.tab[6][0] == -REI && tabu.tab[5][1] == -PEAO && tabu.tab[6][1] == -PEAO && tabu.tab[7][1] == -PEAO && tabu.tab[7][0] != -TORRE)
totb += 5;
// white with queenside castle
if (tabu.tab[2][0] == -REI && tabu.tab[1][1] == -PEAO && tabu.tab[2][1] == -PEAO)
totb += 3;
// black with kingside castle
if (tabu.tab[6][7] == REI && tabu.tab[5][6] == PEAO && tabu.tab[6][6] == PEAO && tabu.tab[7][6] == PEAO && tabu.tab[7][7] != TORRE)
totp += 5;
// black with queenside castle
if (tabu.tab[2][7] == REI && tabu.tab[1][6] == PEAO && tabu.tab[2][6] == PEAO)
totp += 3;
}
//prepara o retorno:----------------
if(tabu.vez==brancas) // se vez das brancas
return totb-totp; // retorna positivo se as brancas estao ganhando (ou negativo c.c.)
else // se vez das pretas
return totp-totb; // retorna positivo se as pretas estao ganhando (ou negativo c.c.)
if(board.turn==white)
return whitetotal - blacktotal;
else
return blacktotal - whitetotal;
Dann Corbit wrote:Actually, the point I was trying to make is that the tests in the original code are clearly wrong.
The original code does not do what you think it does.
Look again at the difference between my code and what is in the original, especially at the comparisons.
I was not examining the time control.
I had found several other bugs and corrected them but I could not find an email address to send the changes to, and the email form on the web page does not work for me (perhaps due to security settings on my machine).
Return to Winboard and related Topics
Users browsing this forum: No registered users and 33 guests