New UnseenSource for Reborn Engine.

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

markchessman

Re: New UnseenSource for Reborn Engine.

Post by markchessman »

Hi, I learned c++ as I went along programing the mainsworthy engine, so I built my knowledge of c++ trial & error by compileing, so true c++ would probably need some work. but I kept the code to be very straight forward so for a c++ programer it may be doable.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: New UnseenSource for Reborn Engine.

Post by Sven »

ZirconiumX wrote:Ummm... Have you ever thought about something called 'compatibility'???

I tried to compile it with

Code: Select all

g++ -o rbm *.cpp | tee errors
I now have a file called errors which is 412KB, and contains 4907 errors.

Matthew:out
It seems the code was compiled with Borland C++. I guess that most of the gcc errors are based on that.

Furthermore, the number of compiler errors thrown out is often irrelevant. If you have one or very few errors then the compiler might complain about almost everything but you can fix it with few changes. I always say: if you see a ton of compiler errors then fix the first one and try again.

Sven
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: New UnseenSource for Reborn Engine.

Post by zullil »

ZirconiumX wrote:Ummm... Have you ever thought about something called 'compatibility'???

I tried to compile it with

Code: Select all

g++ -o rbm *.cpp | tee errors
I now have a file called errors which is 412KB, and contains 4907 errors.

Matthew:out
Here's what I get, just so folks can take a look:

Code: Select all

g++ ReBornMainsworthy124.cpp -o rbm
ReBornMainsworthy124.cpp:3:21: error: condefs.h: No such file or directory
ReBornMainsworthy124.cpp:14:19: error: conio.h: No such file or directory
ReBornMainsworthy124.cpp:17:15: error: io.h: No such file or directory
In file included from /usr/include/c++/4.2.1/backward/iostream.h:31,
                 from ReBornMainsworthy124.cpp:19:
/usr/include/c++/4.2.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
ReBornMainsworthy124.cpp:21:22: error: sys\stat.h: No such file or directory
In file included from ReBornMainsworthy124.cpp:377:
Re124.cpp: In function ‘int tooldisptxtboard(int, bord*)’:
Re124.cpp:341: error: initializer-string for array of chars is too long
Re124.cpp: In function ‘int tool2board(int*, int)’:
Re124.cpp:452: error: initializer-string for array of chars is too long
Re124.cpp: In function ‘int evaluate2(bord*, int*, int, int)’:
Re124.cpp:7123: error: initializer-string for array of chars is too long
Re124.cpp: At global scope:
Re124.cpp:8133: error: ISO C++ forbids declaration of ‘bcheckbook’ with no type
Re124.cpp: In function ‘int bcheckbook(int*, int*, bord*, int*, int)’:
Re124.cpp:8139: error: initializer-string for array of chars is too long
Re124.cpp:8139: error: initializer-string for array of chars is too long
Re124.cpp:8139: error: initializer-string for array of chars is too long
Re124.cpp:8139: error: initializer-string for array of chars is too long
Re124.cpp:8140: error: initializer-string for array of chars is too long
Re124.cpp:8140: error: initializer-string for array of chars is too long
Re124.cpp:8140: error: initializer-string for array of chars is too long
Re124.cpp:8140: error: initializer-string for array of chars is too long
Re124.cpp:8141: error: initializer-string for array of chars is too long
Re124.cpp:8141: error: initializer-string for array of chars is too long
Re124.cpp:8141: error: initializer-string for array of chars is too long
Re124.cpp:8141: error: initializer-string for array of chars is too long
Re124.cpp:8142: error: initializer-string for array of chars is too long
Re124.cpp:8142: error: initializer-string for array of chars is too long
Re124.cpp:8142: error: initializer-string for array of chars is too long
Re124.cpp:8142: error: initializer-string for array of chars is too long
Re124.cpp:8144: error: initializer-string for array of chars is too long
Re124.cpp:8148: error: initializer-string for array of chars is too long
Re124.cpp:8171: error: ‘eof’ was not declared in this scope
Re124.cpp:8233: warning: name lookup of ‘f’ changed
Re124.cpp:8140: warning:   matches this ‘f’ under ISO standard rules
Re124.cpp:8178: warning:   matches this ‘f’ under old rules
Re124.cpp: At global scope:
Re124.cpp:8289: error: ISO C++ forbids declaration of ‘wcheckbook’ with no type
Re124.cpp: In function ‘int wcheckbook(int*, int*, bord*, int*, int)’:
Re124.cpp:8298: error: initializer-string for array of chars is too long
Re124.cpp:8299: error: initializer-string for array of chars is too long
Re124.cpp:8304: error: initializer-string for array of chars is too long
Re124.cpp:8304: error: initializer-string for array of chars is too long
Re124.cpp:8304: error: initializer-string for array of chars is too long
Re124.cpp:8304: error: initializer-string for array of chars is too long
Re124.cpp:8305: error: initializer-string for array of chars is too long
Re124.cpp:8305: error: initializer-string for array of chars is too long
Re124.cpp:8305: error: initializer-string for array of chars is too long
Re124.cpp:8305: error: initializer-string for array of chars is too long
Re124.cpp:8306: error: initializer-string for array of chars is too long
Re124.cpp:8306: error: initializer-string for array of chars is too long
Re124.cpp:8306: error: initializer-string for array of chars is too long
Re124.cpp:8306: error: initializer-string for array of chars is too long
Re124.cpp:8307: error: initializer-string for array of chars is too long
Re124.cpp:8307: error: initializer-string for array of chars is too long
Re124.cpp:8307: error: initializer-string for array of chars is too long
Re124.cpp:8307: error: initializer-string for array of chars is too long
Re124.cpp:8325: error: ‘eof’ was not declared in this scope
Re124.cpp:8384: warning: name lookup of ‘f’ changed
Re124.cpp:8305: warning:   matches this ‘f’ under ISO standard rules
Re124.cpp:8333: warning:   matches this ‘f’ under old rules
ReBornMainsworthy124.cpp: In function ‘int main(int, char**)’:
ReBornMainsworthy124.cpp:403: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:420: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:420: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:420: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:421: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:421: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:421: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:422: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:422: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:423: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:423: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:423: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:423: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:424: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:424: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:424: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:424: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:425: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:425: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:425: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:425: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:426: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:426: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:426: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:426: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:427: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:427: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:427: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:427: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:428: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:428: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:429: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:429: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:430: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:430: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:431: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:431: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:432: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:432: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:433: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:433: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:434: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:434: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:435: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:435: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:1392: error: initializer-string for array of chars is too long
ReBornMainsworthy124.cpp:1404: error: invalid conversion from ‘unsigned char*’ to ‘char*’
ReBornMainsworthy124.cpp:1404: error:   initializing argument 1 of ‘char* strcpy(char*, const char*)’
ReBornMainsworthy124.cpp:1462: error: invalid conversion from ‘unsigned char*’ to ‘char*’
ReBornMainsworthy124.cpp:1462: error:   initializing argument 1 of ‘char* strcpy(char*, const char*)’
ReBornMainsworthy124.cpp:1536: error: invalid conversion from ‘unsigned char*’ to ‘char*’
ReBornMainsworthy124.cpp:1536: error:   initializing argument 1 of ‘char* strcpy(char*, const char*)’
User avatar
hgm
Posts: 28514
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: New UnseenSource for Reborn Engine.

Post by hgm »

Well, if header files are missing, that usually causes tons of dependent errors. Isn't conio.h a Windows thing? Shouldn't you need some kind of -mno-cygwin flag to use the Windows stuff?
Adam Hair
Posts: 3226
Joined: Wed May 06, 2009 10:31 pm
Location: Fuquay-Varina, North Carolina

Re: New UnseenSource for Reborn Engine.

Post by Adam Hair »

markchessman wrote:would somebody like to give the engine an ELO estimate? I havnt got a setup to run a tourny yet.

I would of thought there would be interest on a new engine on here :( No Replys so far.The engine is slightly based on an older engine, but it now has fixed errors and books, aswell as the source being released for the first time .
Hi Mark,

As someone who likes to test engines of all strengths, I would test Reborn Mainsworthy. But I do shy away from engines that have trouble with time forfeits. It can be painful to adjudicate dozens of games or more to determine if an engine forfeited in an indeterminate position or if it was losing. But, I will make the effort to estimate the Elo for you. However, if you could correct the problem with time forfeits, I could test it more extensively.

Adam
User avatar
hgm
Posts: 28514
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: New UnseenSource for Reborn Engine.

Post by hgm »

This is not so much a problem as an intentional non-compliance. WB protocol is implemented incompletely, (to put it mildly). The 'level' and 'time' commands are ignored, so the engine has no idea how fast it is supposed to play. (It is rigged for a fixed depth of 4 ply, without QS). It also does not support force mode or setting up positions.

This is all fine for someone building a first engine, to quickly reach a stage where you can do automatic testing, being well aware of the limitations. But you cannot dump a highly deficient product like that on other people. They won't get anywhere with it, waste a lot of time on it, and are not likely to appreciate that.

If you want others to use your engine, rather than curse it, make sure it responds to the standard commands.
Adam Hair
Posts: 3226
Joined: Wed May 06, 2009 10:31 pm
Location: Fuquay-Varina, North Carolina

Re: New UnseenSource for Reborn Engine.

Post by Adam Hair »

I have to agree with HGM..
markchessman

Re: New UnseenSource for Reborn Engine.

Post by markchessman »

thanks Adam, if you give time controls of 10min it should never loose on time, but its something I will be doing at some time soon.

When you try to compile it, the include files in the cpp are mostly not used, I put them in just incase .
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: New UnseenSource for Reborn Engine.

Post by JuLieN »

Apart from (all) that, welcome aboard, Mark! ;)
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
Guerrero
Posts: 40
Joined: Sun Jul 08, 2007 2:05 am

Re: New UnseenSource for Reborn Engine.

Post by Guerrero »

Here some change for compile it with gcc:
ReBornMainsworthy124.cpp

// #include <condefs.h> // CHANGE
.
.
#include <iostream> // #include <iostream.h> // CHANGE
#include <fstream> // #include <fstream.h> // CHANGE
.
.
fflush(stdout); // fflush(stdin); // CHANGE
fgets( strg, 800, stdin );
sscanf( strg, "%s", cmd );
if( strg[0]==newline[0] ) {
.
.
if( !strcmp("quit", cmd) ){
close(handle2);
close(handle3);
endit[0]=1;
break;
}
// CHANGE add
if( !strcmp("protover", cmd) ){
printf("feature done=0\n");
printf("feature myname=\"MainsworthyReborn 124\"\n");
printf("feature done=1\n");
fflush(stdout);
continue;
}
// end CHANGE add
compile with:

g++ -fpermissive -w -O3 ReBornMainsworthy124.cpp -o Mainsworthy_124.exe -static-libgcc -static-libstdc++