Purple Haze v2.0.2

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

Moderators: hgm, Rebel, chrisw

vincent
Posts: 33
Joined: Tue Jan 19, 2010 8:38 am
Location: Brittany, France

Purple Haze v2.0.2

Post by vincent »

Hi everyone,

It's been a long time since the last release of my engine Purple Haze. More than a year actually. This new release contains lots of stylistic changes and some bug fixes but no new major feature. The next release should be better in term of ELO gains.

Code: Select all

$ git diff v2.0.1 v2.0.2 --shortstat
 54 files changed, 4416 insertions(+), 2896 deletions(-)
The focus was more on building a good testing environment with test cases for any changes in the code. That way the overall quality should improve slightly. I also wrote a small collection of tools (client, server and worker) to facilitate cluster testing. This last project is in early alpha stage and may not currently be useful to anyone else but it is already Open Source and published at https://github.com/vinc/occet.

To download and compile Purple Haze:

Code: Select all

$ git clone git://github.com/vinc/purplehaze
$ cd purplehaze
$ make
My code uses some features of C++11, so you will need GCC >= 4.6 or Clang >= 3.0. It used to compile with Intel C++ Compiler but not currently on my machine (running Arch Linux).
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: Purple Haze v2.0.2

Post by gladius »

vincent wrote:The focus was more on building a good testing environment with test cases for any changes in the code. That way the overall quality should improve slightly. I also wrote a small collection of tools (client, server and worker) to facilitate cluster testing. This last project is in early alpha stage and may not currently be useful to anyone else but it is already Open Source and published at https://github.com/vinc/occet.
Hi Vincent,

Occet looks really cool! I was thinking about something very similar actually, I'm glad to see you release it. May have to play around with getting it set up to test changes :).

Gary
vincent
Posts: 33
Joined: Tue Jan 19, 2010 8:38 am
Location: Brittany, France

Re: Purple Haze v2.0.2

Post by vincent »

gladius wrote:
vincent wrote:The focus was more on building a good testing environment with test cases for any changes in the code. That way the overall quality should improve slightly. I also wrote a small collection of tools (client, server and worker) to facilitate cluster testing. This last project is in early alpha stage and may not currently be useful to anyone else but it is already Open Source and published at https://github.com/vinc/occet.
Hi Vincent,

Occet looks really cool! I was thinking about something very similar actually, I'm glad to see you release it. May have to play around with getting it set up to test changes :).

Gary
Hi Gary,

If you know how to call xboard or cutechess-cli from the command line, then you almost already know how to operate occet-client to send jobs to occet-server. And on each node of a pseudo cluster distributed over the Internet there is an instance of occet-worker running, which is basically a wrapper around cutechess-cli executing the jobs.

I wrote some other tools to automagically download and compile engines on the nodes and to retrieve and analyse (using bayeselo) PGN files from the server but these are not part of occet core yet because I wanted to keep it simple. They will be open sourced too after more testing.

Occet is written in CoffeeScript and uses node.js. There is really a *lot* to do before calling it something else than a prototype and it needs some security features before running in production... Nonetheless it is nice to have a script building the last commit on the develop branch of my engine on GitHub with a patch introducing a new feature and testing the executable hundred thousand of times on various nodes against other engines to finally telling me if my new feature is good or bad.

To be honest, I can count the number of nodes constituting my pseudo cluster on the fingers of one hand and occet is probably not more than 500 lines of code. This is really small scale, but it is fun.
tmokonen
Posts: 1296
Joined: Sun Mar 12, 2006 6:46 pm
Location: Kelowna
Full name: Tony Mokonen

Re: Purple Haze v2.0.2

Post by tmokonen »

Hi Vincent. I was able to successfully compile Purple Haze 2.0.2 in Windows, using MinGW and GCC 4.6.2 32 bit. However, when I ran it, it seemed to exit all the time, due to assertion failures, like the following:

Code: Select all

Assertion failed: feature == XBOARD_FEATURES[i][0], file C:\Clients\PurpleHaze202\xboard.cpp, line 109
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I was able to work around it by commenting out the protover handling code in xboard.cpp, lines 78-115, but of course I lost Winboard 2 support by doing that.

One other minor detail - the version number in the source still says 2.0.1.

I've placed my compile here, if anyone is interested:

http://www3.telus.net/tmokonen/PurpleHaze202MinGW32.rar
vincent
Posts: 33
Joined: Tue Jan 19, 2010 8:38 am
Location: Brittany, France

Re: Purple Haze v2.0.2

Post by vincent »

tmokonen wrote:Hi Vincent. I was able to successfully compile Purple Haze 2.0.2 in Windows, using MinGW and GCC 4.6.2 32 bit. However, when I ran it, it seemed to exit all the time, due to assertion failures, like the following:

Code: Select all

Assertion failed: feature == XBOARD_FEATURES[i][0], file C:\Clients\PurpleHaze202\xboard.cpp, line 109
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I was able to work around it by commenting out the protover handling code in xboard.cpp, lines 78-115, but of course I lost Winboard 2 support by doing that.
Hi Tony,

I am probably doing incorrect assumptions about the replies to "feature" commands. What program are you using to run it?
tmokonen wrote:One other minor detail - the version number in the source still says 2.0.1.
Indeed and this is now fixed.

When you have git on your system I use the "git describe HEAD" command which give me the current tag, the number of commits from it and the abbreviated commit SHA. This is nice to know exactly the version you compiled. For instance it is now "v2.0.2-1-g336e2e0". But when you do not have git, the fallback is defined in "src/common.h" and I forgot about it.
tmokonen
Posts: 1296
Joined: Sun Mar 12, 2006 6:46 pm
Location: Kelowna
Full name: Tony Mokonen

Re: Purple Haze v2.0.2

Post by tmokonen »

Hi Vincent. I was using Arena 3.0 as a GUI, but I even got it to raise the exception by running the program and typing the following commands in the console window:

xboard
protover 2
new
level 40 5 0

It was the level command that caused problems. I didn't take a particularly close look at the code.
vincent
Posts: 33
Joined: Tue Jan 19, 2010 8:38 am
Location: Brittany, France

Re: Purple Haze v2.0.2

Post by vincent »

tmokonen wrote:Hi Vincent. I was using Arena 3.0 as a GUI, but I even got it to raise the exception by running the program and typing the following commands in the console window:

xboard
protover 2
new
level 40 5 0

It was the level command that caused problems. I didn't take a particularly close look at the code.
Thanks, that is enough to locate the problem! After 'protover 2' my engine replied by sending 'feature myname="Purple Haze v2.0.2-1-g336e2e0"' and expected 'accepted myname' but received 'new'. I will separate the treatment of 'feature' and 'accepted' commands in my code so that my engine will not be confused if 'accepted' commands are not sent immediately or in the same order.

I'm currently methodically reviewing my code and testing each feature. Version 2.0.2 fixed several bugs but I found another yesterday causing me a strength loss of maybe as much as 150-200 ELO (in very short time control). A new version will be released in a week or two.
tmokonen
Posts: 1296
Joined: Sun Mar 12, 2006 6:46 pm
Location: Kelowna
Full name: Tony Mokonen

Re: Purple Haze v2.0.2

Post by tmokonen »

Ah excellent, looking forward to the new version.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Purple Haze v2.0.2

Post by lucasart »

vincent wrote:Hi everyone,

It's been a long time since the last release of my engine Purple Haze. More than a year actually. This new release contains lots of stylistic changes and some bug fixes but no new major feature. The next release should be better in term of ELO gains.

Code: Select all

$ git diff v2.0.1 v2.0.2 --shortstat
 54 files changed, 4416 insertions(+), 2896 deletions(-)
The focus was more on building a good testing environment with test cases for any changes in the code. That way the overall quality should improve slightly. I also wrote a small collection of tools (client, server and worker) to facilitate cluster testing. This last project is in early alpha stage and may not currently be useful to anyone else but it is already Open Source and published at https://github.com/vinc/occet.

To download and compile Purple Haze:

Code: Select all

$ git clone git://github.com/vinc/purplehaze
$ cd purplehaze
$ make
My code uses some features of C++11, so you will need GCC >= 4.6 or Clang >= 3.0. It used to compile with Intel C++ Compiler but not currently on my machine (running Arch Linux).
Nice stuff. I like the fact that it's on a git repo and compiles smoothly with a nice makefile. But it seems still very weak (I'd say about 1600-1700 elo or so). There must be quite a few bugs in the search.
Anyway, good luck improving purplehaze