my presentation and help needed about winboard

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

my presentation and help needed about winboard

Postby daniel anulliero » 23 Feb 2007, 19:05

Hi at all

Here is my first post in the very good chess programming forum

I am french (excuse my english OK!) . I (try) to develop a chess program ; his name is JARS , version 1.88 in C langage . I'm so beginner in programmation .
I think JARS play chess about 1100 - 1200 elo .... whith alpha beta and a lot of quiescence (bof!)
I read the great program TSCP (thank you Tom!) and I try to play whith JARS under winboard (I wrote as the model of TSCP)
Jars don't boot under winboard ... ffff!
I'm happy If someone can help me , I can send my source
Thanks and congratulations for yours engines !
User avatar
daniel anulliero
 
Posts: 20
Joined: 12 Jan 2007, 00:07

Re: my presentation and help needed about winboard

Postby Dann Corbit » 23 Feb 2007, 20:36

daniel anulliero wrote:Hi at all

Here is my first post in the very good chess programming forum

I am french (excuse my english OK!) . I (try) to develop a chess program ; his name is JARS , version 1.88 in C langage . I'm so beginner in programmation .
I think JARS play chess about 1100 - 1200 elo .... whith alpha beta and a lot of quiescence (bof!)
I read the great program TSCP (thank you Tom!) and I try to play whith JARS under winboard (I wrote as the model of TSCP)
Jars don't boot under winboard ... ffff!
I'm happy If someone can help me , I can send my source
Thanks and congratulations for yours engines !


I will give you a hand if you like.
My email address is dcorbit@connx.com

Jim Ablett is another guy who helps people in porting:
http://homepages.tesco.net/henry.ablett/jims.html

There are lots of French speaking programmers. Here is a partial list:
Code: Select all
Dominique Longbien                     Adam
Christian Barreteau                    Anmon
Gabriel Guillory                       Arion
Lucas Braesch & Romain Burgot          BiBiChess
Nicolas Robert                         BSC
François and Gaston Karr               BugChess2
J.F. Romang, R. Grundrich & Th. Adolph Cassandre
Philippe Fabiani                       Delphil
Bruno Lucas                            Dragon
Eric Triki                             E.T.Chess
Fabien Letouzey                        Fruit
Jean-Franceancois Romang & David Rabel Gaia
Eric Marathee                          Gibbon
Christophe Jolly                       KnightX
Mark-Philippe Huget                    LaDameBlanche
Jean-Marc Alliot                       Lovelace
Yves Lejeail                           Milady
Jean-Christophe Gabillard              Nejmet
Nicolas Velin                          NSVChess
Franck Zibi                            Pharaon
Jean-Yves Lallemand                    Ranita
Rémi Coulom                            Simple
Eric Marathee                          SmallC
Rémi Coulom                            TheCrazyBishop
Christophe Drieu                       T-Rex
Jean-Francois Gazet                    WJChess
Loïc Cuenot                            Youk
Dann Corbit
 

Re: my presentation and help needed about winboard

Postby daniel anulliero » 23 Feb 2007, 21:29

thanks for your kindness Dan
I give the winboard.debug file
gnuchess vs jars
I don't understand the lines "coup illegal!"
The message is in my engine (of course!) but not appear when jars run on console (so well whith somes bugs in 3reps rule ... :| )

PS: y a t-il des français dans la salle? :wink:


Code: Select all
recognized 'normal' (-1) as variant normal
WinBoard 4.2.7 + GNUChess
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
StartChildProcess (dir="") GNUChess
609 >first : xboard
protover 2
625 <first : Chess
625 <first : Illegal move (no matching move)board
625 <first : Illegal move (no matching move)protover
641 >first : new
random
641 >first : level 12 1 0
641 >first : hard
7359 >first : force
StartChildProcess (dir="") jars_188
7859 >second: xboard
protover 2
7875 <second:       Jars , version 1.8
7875 <second:          06/01/2OO7
7875 <second: --------------------------------
7875 <second: Entree... 
7875 <second:
7875 <second: coup illegal
17875 >second: new
random
17875 >second: level 12 1 0
17875 >second: hard
17875 >second: force
17875 >first : computer
17875 >second: computer
17875 >first : black
17875 >first : time 6000
otim 6000
17875 >first : white
17875 >first : go
17875 <first : Illegal move (no matching move)computer
17875 <first : 1. go
17875 <second: coup illegal
17875 <second: coup illegal
17875 <second: coup illegal
17875 <second: coup illegal
17875 <first : 1. ... e2e4
17875 >second: time 6000
otim 6000
17875 >second: e2e4
17875 >second: black
17875 >second: go
17969 <first : My move is: e2e4
17969 <second:
17969 <second: ETAT DE LA PARTIE
17969 <second:
17969 <second: Ouverture
17969 <second: Materiel Blanc et Noir : 39   39  (total : 78 )
17969 <second: coups legaux : 20
17969 <second: e7e5  --->  19296  ----> Bibliotheque
17969 <second: b8c6  --->  30609  ----> Bibliotheque
17984 <second: c7c6  --->  24719  ----> Bibliotheque
17984 <second: d7d5  --->  12756  ----> Bibliotheque
17984 <second: c7c5  --->  23162  ----> Bibliotheque
18000 <second: e7e6  --->  1945  ----> Bibliotheque
18172 <second: 92262 positions dans la bibliotheque
18172 <second: coup b8-c6
GameEnds(0, (null), 2)
Interrupting first
28031 >first : force
Interrupting second
28031 >second: force
28031 >first : quit
28031 >second: quit
User avatar
daniel anulliero
 
Posts: 20
Joined: 12 Jan 2007, 00:07

Re: my presentation and help needed about winboard

Postby Dann Corbit » 24 Feb 2007, 00:37

Do you use the word 'coup' for 'move'?
Winboard commands must be made in exactly the way described in this document:
http://www.tim-mann.org/xboard/engine-intf.html

Without seeing the source of your program, I think it will be hard for anyone to help.

Why not post the source to your Winboard command parser?
Dann Corbit
 

Re: my presentation and help needed about winboard

Postby daniel anulliero » 24 Feb 2007, 01:06

hello dan
so ... coup is used for printf (see winboard() )
I tried to write this fonction on the model of TSCP , but it's dificult to understand for me (I'm a beginner in C langage) . I saw the winboard protocol but ... in english only it's hard for me ...
At last , here is the winboard function:
Code: Select all
void xboard()
{
    char line[256], command[256];
   int i;
    int m;
   int post = 0;
    COUP   meilleur_coup;

   signal(SIGINT, SIG_IGN);
   printf("\n");
      
    init_debut();
   couleur_JARS = VIDE;
   
   for (;;)
        {
            fflush(stdout);
          if (side == couleur_JARS)
                {
                    meilleur_coup = JARS_joue(prof_max,0,post);
                    printf("coup %s\n",move_str(meilleur_coup));
                    jouer_coup(meilleur_coup);
                    affiche_resultat();
                continue;
              }

            if (!fgets(line, 256, stdin))
                return;
            if (line[0] == '\n')
             continue;
          sscanf(line, "%s", command);
          if (!strcmp(command, "xboard"))
                continue;
          if (!strcmp(command, "new"))
                {
                  init_debut();
                  couleur_JARS = NOIR;
                  continue;
                }
          if (!strcmp(command, "quit"))
                return;
            if (!strcmp(command, "force"))
                {
                    couleur_JARS = VIDE;
                    continue;
                }
            if (!strcmp(command, "white"))
                {
                    side = BLANC;
                    couleur_JARS = NOIR;
                    continue;
                }
            if (!strcmp(command, "black"))
                {
                    side = NOIR;
                    couleur_JARS = BLANC;
                    continue;
                }
            if (!strcmp(command, "st"))
                {
                    sscanf(line, "st %d", &temps_max);
                    temps_max *= 1000;
                    prof_max = 30;
                    continue;
                }
            if (!strcmp(command, "sd"))
                {
                    sscanf(line, "sd %d", &prof_max);
                    temps_max = 1 << 25;
                    continue;
                }
            if (!strcmp(command, "time"))
                {
                  sscanf(line, "time %d", &temps_max);
               temps_max *= 10;
               temps_max /= 30;
               prof_max = 30;
                    continue;
                }
            if (!strcmp(command, "otim"))
                {
                    continue;
                }
            if (!strcmp(command, "go"))
                {
                    couleur_JARS = side;
                    continue;
                }
            if (!strcmp(command, "undo"))
                {
                    if(!nb_coups)
                        continue;
                    couleur_JARS  = VIDE;
                    dejouer_coup();
                    affiche_echiquier();
                    continue;
                }
            if (!strcmp(command, "remove"))
                {
                    continue;
                }
            if (!strcmp(command, "post"))
                {
                    post = 2;
                    continue;
                }
            if (!strcmp(command, "nopost"))
                {
                    post = 0;
                    continue;
                }
        /*l'adversaire a entre un coup?*/
        m = verif_coup(line);
        prof = 0;
        if(m == -1)
          printf("coup illegal\n");
        else if(jouer_coup(liste_coups_peres[m])) 
          {
            printf("coup illegal\n");
            dejouer_coup();
          }
        affiche_resultat();
    }
}


User avatar
daniel anulliero
 
Posts: 20
Joined: 12 Jan 2007, 00:07

Re: my presentation and help needed about winboard

Postby Olivier Deville » 24 Feb 2007, 09:43

daniel anulliero wrote:thanks for your kindness Dan
I give the winboard.debug file
gnuchess vs jars
I don't understand the lines "coup illegal!"
The message is in my engine (of course!) but not appear when jars run on console (so well whith somes bugs in 3reps rule ... :| )

PS: y a t-il des français dans la salle? :wink:




Bonjour Daniel

Bien sûr qu'il y a des Français dans la salle :)

Bienvenue au club, et bonne chance à ton module ! Dès qu'il sera prêt je peux l'intégrer à mes tournois si tu veux.

Olivier
User avatar
Olivier Deville
 
Posts: 1176
Joined: 26 Sep 2004, 19:54
Location: Aurec, France

Re: my presentation and help needed about winboard

Postby daniel anulliero » 24 Feb 2007, 10:49

salut olivier

merci pour ta réponse (et c'est quand même plus facile à écrire en français! :wink: )
Je suis souvent allé voir les tournois sur ton site , ainsi que celui de leo (avec le désir d'en faire partie bien sur!!)
Et c'est volontiers que je t'enverrais mon prog , lorsque mon soucis avec winboard sera réglé!
Je ne vois vraiment pas ce qui cloche dans winboard() ... pfff! migraine!
enfin merci encore Olivier
and thanks again Dan
User avatar
daniel anulliero
 
Posts: 20
Joined: 12 Jan 2007, 00:07

Re: my presentation and help needed about winboard

Postby Sven Schüle » 24 Feb 2007, 20:31

Hi Daniel,

I think your winboard code misses handling of at least the following commands which are actually sent by WinBoard to your engine:

- protover
- random
- level
- hard
- computer

For a first, very simple approach you might ignore all of them, perhaps except "level" (but follow the link provided by Dann for more details). Just "continue" when detecting any of these commands. Also there may be a few more commands to handle.

By not handling them you fall into the piece of code where you expect a move sent by the opponent:
Code: Select all
m = verif_coup(line);
if(m == -1)
    printf("coup illegal\n");

which would explain your problems.

Btw in console mode your engine does not receive these commands (no WinBoard GUI at the other end) but you may reproduce the behaviour by simply typing the commands "protover 2" or "random" at your move prompt. You should see "coup illegal" in both cases.

Finally you have to change "coup" into "move" when sending the engine's best move (meilleur_coup) with 'printf("coup %s\n", ...)'. The WinBoard protocol expects the word "move" here.

The same applies to 'printf("coup illegal\n")', better use 'printf("Illegal move: %s\n", line);' to match the protocol requirements. This would also help you to identify the command or move your engine claims to be illegal.

Sven
User avatar
Sven Schüle
 
Posts: 240
Joined: 26 Sep 2004, 20:19
Location: Berlin, Germany

Re: my presentation and help needed about winboard

Postby daniel anulliero » 24 Feb 2007, 21:55

great thanks for your reponse , sven


I will change all that

good page for your "surprise" . I will test my "jars" against your program but ... not immediately !... :wink:

bye !
User avatar
daniel anulliero
 
Posts: 20
Joined: 12 Jan 2007, 00:07

Re: my presentation and help needed about winboard

Postby daniel anulliero » 24 Feb 2007, 22:41

Thanks again sven!

I changed all of them and now , JARS works in winboard mode :)

But little buggy ... I work for new problems now ... :wink:

bests

daniel
User avatar
daniel anulliero
 
Posts: 20
Joined: 12 Jan 2007, 00:07


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 32 guests