Superlinear interpolator: a nice novelity ?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Superlinear interpolator: a nice novelity ?

Post by mcostalba »

bob wrote:
Does this mean you are only comparing stock G2.1 to your modified version? That won't tell you anything useful at all...
That's interesting. You seem very sure about this. Could you please explain me why ?

Answering to other comments in this thread, I would think the truncation is an integral part of the algorithm, that's what makes it non linear.

But it is true I have not tested by simply increasing the maximum value from 128 to say 160 and see what happens...I'll do.

Marco
User avatar
Eelco de Groot
Posts: 4565
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Superlinear interpolator: a nice novelity ?

Post by Eelco de Groot »

Thanks very much for your Glaurung version Marco! I only had a short look yet at the sources but it looks very interesting and there also seems to be a substantial amount of changes that are more programming-technical in nature, changes I think Tord, or other programmers, here will be interested in, even if it is just to compare different possibilities for doing things?

I have asked if Jim Ablett maybe could make a compile for us, I hope that is possible! That way there would also be a standardized version to compare any testresults. But I don't know if Jim has the time.

Regards, Eelco
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Superlinear interpolator: a nice novelity ?

Post by mcostalba »

Eelco de Groot wrote:Thanks very much for your Glaurung version Marco! I only had a short look yet at the sources but it looks very interesting and there also seems to be a substantial amount of changes that are more programming-technical in nature, changes I think Tord, or other programmers, here will be interested in, even if it is just to compare different possibilities for doing things?

I have asked if Jim Ablett maybe could make a compile for us, I hope that is possible! That way there would also be a standardized version to compare any testresults. But I don't know if Jim has the time.

Regards, Eelco
Tord has access to my git repository so he knows every bit of change and also the rationale behind it.

By now most changes are code style and cleanup related because I know more C++ then chess programming :)

I hope that improving my chess programming knowledge will bring also more substantial changes...

Anyhow the (few) real changes are:

- Superlinear interpolation

- Hashing in qsearch

- Opponent time info

The last one was originated from my way to play chess: when I am in a trouble position I take a bit more time to analize. And if I am in great time advantage against my opponent I take also more time.

I have coded this empirical rule and the results were positive. Indeed I was surprised to NOT find any consideration regarding opponent remaining time in any of the chess engine I have checked, not only in Glaurung...perhaps I'm missing something...


To have properly compiled versions for 32 and 6f bits would be great !

Thanks
Marco
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: Superlinear interpolator: a nice novelity ?

Post by BubbaTough »

- Opponent time info

The last one was originated from my way to play chess: when I am in a trouble position I take a bit more time to analize. And if I am in great time advantage against my opponent I take also more time.

I have coded this empirical rule and the results were positive. Indeed I was surprised to NOT find any consideration regarding opponent remaining time in any of the chess engine I have checked, not only in Glaurung...perhaps I'm missing something...
I have had this in my program for a while, and took it out recently. My version also included spending less time if your opponent had more time than you. I have mixed feelings on it. My last thought was that if your opponent is better at allocating time than you are the heuristic is useful (since it acts to make your time usage per move similar to your opponents over the course of the game) and if your opponent is worse at time allocation than is harmful. It is not really something I do as a human (I strive to make my time usage independent of opponent) and I don't really have a good feel for whether the idea has merit or not. One idea I considered but have not tried is when opponent is super low on time, use extensions to calculate a series of moves and than blitz them out (something humans sometimes do). This seems like it might be fairly effective, particularly against humans...but also against computers as it robs their usage of ponder. Anyway, I think time usage is an interesting area to explore, and am interested in hearing your findings in that area as you encounter them.

-Sam
User avatar
Eelco de Groot
Posts: 4565
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Glaurung compiles from Jim!

Post by Eelco de Groot »

mcostalba wrote:
Eelco de Groot wrote:Thanks very much for your Glaurung version Marco! I only had a short look yet at the sources but it looks very interesting and there also seems to be a substantial amount of changes that are more programming-technical in nature, changes I think Tord, or other programmers, here will be interested in, even if it is just to compare different possibilities for doing things?

I have asked if Jim Ablett maybe could make a compile for us, I hope that is possible! That way there would also be a standardized version to compare any testresults. But I don't know if Jim has the time.

Regards, Eelco
Tord has access to my git repository so he knows every bit of change and also the rationale behind it.

By now most changes are code style and cleanup related because I know more C++ then chess programming :)

I hope that improving my chess programming knowledge will bring also more substantial changes...

Anyhow the (few) real changes are:

- Superlinear interpolation

- Hashing in qsearch

- Opponent time info

The last one was originated from my way to play chess: when I am in a trouble position I take a bit more time to analize. And if I am in great time advantage against my opponent I take also more time.

I have coded this empirical rule and the results were positive. Indeed I was surprised to NOT find any consideration regarding opponent remaining time in any of the chess engine I have checked, not only in Glaurung...perhaps I'm missing something...


To have properly compiled versions for 32 and 6f bits would be great !

Thanks
Marco
Marco, here are the compiles from Jim Ablett. Jim writes that the version you made seems to have a slightly lower nodes per second than the original Glaurung 2.1 and that he is interested in the testresults. A lower nodes per second does not always mean a lower speed of finding things I think, sometimes a huge nps is not a good sign at all -I don't really know if this is correct but I believe to have seen cases when I thought those nodes were maybe all from a qsearch "explosion" for instance and the speed then means there are no hashhits-. But here is the link that Jim gave:

http://www.mediafire.com/?ynytmejxnmd

My browser sometimes has trouble with pages with ads like this, or maybe it is the scanner, and it takes a while before everything is loaded but on the second try I managed to download the files with Jim's compiles. Thanks again Jim!

Regards, Eelco
Last edited by Eelco de Groot on Mon Sep 22, 2008 4:57 pm, edited 1 time in total.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Superlinear interpolator: a nice novelity ?

Post by bob »

mcostalba wrote:
bob wrote:
Does this mean you are only comparing stock G2.1 to your modified version? That won't tell you anything useful at all...
That's interesting. You seem very sure about this. Could you please explain me why ?

Take any program. make a change to it. Play the old vs the new. If the change is good, the results will be far better than expected. If the change is bad, the results will be far worse than expected. Because since the only difference in the two programs is the change you made, it tends to influence games more than expected.

I've run millions of games testing A vs A' and the results are unreliable. Far better to run A and A' against a common set of opponents and see which turns out to be better.



Answering to other comments in this thread, I would think the truncation is an integral part of the algorithm, that's what makes it non linear.

But it is true I have not tested by simply increasing the maximum value from 128 to say 160 and see what happens...I'll do.

Marco
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Glaurung compiles from Jim!

Post by Ovyron »

Can you/they use http://www.zshare.net/ next time? mediafire took a real long while to load and never give away the file.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Glaurung compiles from Jim!

Post by mcostalba »

Eelco de Groot wrote:
Marco, here are the compiles from Jim Ablett. Jim writes that the version you made seems to have a slightly lower nodes per second than the original Glaurung 2.1

Great! I have started testing now!

May I ask, please, what is the compiler used (my guess is Intel C++ :wink: ) ?

The reason I ask is that there are speed improvments only for MSVC case (I have tested with _BitScanForward intrinsics), so I would like to know if I have to revert them as seems the case given the node count decrease.

Thanks
Marco

P.S: BTW it is much faseter then my "optimized" version !
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Superlinear interpolator: a nice novelity ?

Post by Gerd Isenberg »

Why do you call it super linear, but not sigmoid?

Sorry for my ignorance,
Gerd
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Superlinear interpolator: a nice novelity ?

Post by mcostalba »

Gerd Isenberg wrote:Why do you call it super linear, but not sigmoid?

Sorry for my ignorance,
Gerd
After looking in wiki at http://en.wikipedia.org/wiki/Sigmoid_function (the ignorance is all on my side!) I have to say that Sigmoid is the proper name...yes it defenitly is, although my is a linearized version, the sigmoid gives exactly the rationale of this modification.


BTW, I know are too much few games, but I couldn't resist:

Currently after 138 matches at 1+0:

Glaurung clone 210918 JA vs Glaurung 2.1 (JA) +43 =76 -19 (58.7%) TP=+61 elo

This make me hope at least is not worst then the stock version.