Page 1 of 1

New Brasilian engine: Xadreco 3.1

PostPosted: 12 Oct 2004, 14:17
by Igor Gorelikov
New Brasilian engine Xadreco 3.1 (Author Ruben Carlo Benante)
Web page:
http://www.geocities.com/pag_sax/xadreco/

Re: New Brasilian engine: Xadreco 3.1

PostPosted: 12 Oct 2004, 15:06
by Josu? Forte
Igor Gorelikov wrote:New Brasilian engine Xadreco 3.1 (Author Ruben Carlo Benante)
Web page:
http://www.geocities.com/pag_sax/xadreco/


Hi Igor,

That a good news!!!

Regards,
Josu? Forte
(From Brazil)

New Brasilian engine: Xadreco 3.1

PostPosted: 12 Oct 2004, 18:09
by Guenther Simon
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

This code is not right

PostPosted: 15 Oct 2004, 04:56
by Dann Corbit
Code: Select all
//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;
   }



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;
}

Re: New Brasilian engine: Xadreco 3.1

PostPosted: 19 Oct 2004, 18:21
by beco
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.

Re: New Brasilian engine: Xadreco 3.1

PostPosted: 19 Oct 2004, 18:47
by Josu? Forte
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.


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

Re: New Brasilian engine: Xadreco 3.1

PostPosted: 19 Oct 2004, 18:59
by 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?


Hi dear Josu?! Nice to meet you here! And thank you for offering help. You too feel free to ask me anything about the code you want to know!

Um abra?o,
Beco.

Re: This code is not right

PostPosted: 19 Oct 2004, 19:17
by beco
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;
}


Hi dear Dann,

Your translation is very good, thank you! But this part of code has nothing to do with the time control (?) if it is what you intended here... This is the evaluation function, and the variables

totb means (total brancas == white total)
totp means (total pretas == black total)

The end of the function is in line 3882:


Code: Select all
   //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.)



This means that
Code: Select all
   if(board.turn==white)
           return whitetotal - blacktotal;
   else
           return blacktotal - whitetotal;


So, the value depends on the turn and is positive if you are better than your opponent.

Best wishes,
Beco,
http://www.geocities.com/pag_sax/xadreco/
--

Re: New Brasilian engine: Xadreco 3.1

PostPosted: 19 Oct 2004, 20:11
by Dann Corbit
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).

Re: New Brasilian engine: Xadreco 3.1

PostPosted: 19 Oct 2004, 21:09
by beco
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).


Dear Dann,

In this case I should really thank you if you can send me this corrections you found! Try this email address, please:
benante@ig.com.br

And yes! You are very right! The code do not work! My goodness! So it is explained why Xadreco insist in put forward his castle's pawns !!!
Well, thank you again!

Please, let me know if the email address fail again, and we can try other options.

My best wishes,
Beco.