Eucalyptus - KPK Bitbases Generator

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
JohnWoe
Posts: 99
Joined: Sat Mar 02, 2013 10:31 pm

Eucalyptus - KPK Bitbases Generator

Post by JohnWoe » Fri May 24, 2019 11:39 pm

I published a piece of software I use in Sapeli.
https://github.com/SamuraiDangyo/Eucalyptus

These bitbases tells whether a position is a draw or not.
Your chess engine will never lose a drawn KPK endgame ever again!

Pretty simple to use. See in Sapeli.
https://github.com/SamuraiDangyo/Sapeli ... li.c#L2253

User avatar
xr_a_y
Posts: 784
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: Eucalyptus - KPK Bitbases Generator

Post by xr_a_y » Sat May 25, 2019 7:12 am

Is it worth using KPK as precomputed ? why not on the fly ?

JohnWoe
Posts: 99
Joined: Sat Mar 02, 2013 10:31 pm

Re: Eucalyptus - KPK Bitbases Generator

Post by JohnWoe » Sat May 25, 2019 8:47 am

Thanks for the reply!

Why not on the fly? To save cycles. It takes 800ms to generate these bitbases on my pc. Plus it is polluting RAM with all these generating arrays.

To be honest it doesn't make much difference in +ELO hunting.
But once generated you don't have to touch that array ever again.
Once generated that header is 72kB.
Eucalyptus only tells whether a position is draw.

For example Stockfish has fast on-the-fly KPK generator. Not sure if it is similar to mine. But precomputed arrays are always faster.

mar
Posts: 2010
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Eucalyptus - KPK Bitbases Generator

Post by mar » Sat May 25, 2019 9:20 am

JohnWoe wrote:
Fri May 24, 2019 11:39 pm
I published a piece of software I use in Sapeli.
https://github.com/SamuraiDangyo/Eucalyptus
Are you crazy? :D You attach GPL to the generated kpk table?! :D
So when someone includes it, you force the cancerous GPL crap on him?

I wonder why some people still believe that open source = GPL. There are many other (much better and much less restrictive) options.
Martin Sedlak

Ras
Posts: 1161
Joined: Tue Aug 30, 2016 6:19 pm
Contact:

Re: Eucalyptus - KPK Bitbases Generator

Post by Ras » Sat May 25, 2019 9:52 am

JohnWoe wrote:
Sat May 25, 2019 8:47 am
It takes 800ms to generate these bitbases on my pc.
Marcels generator takes a few milliseconds: https://github.com/kervinck/pfkpk
xr_a_y wrote:
Sat May 25, 2019 7:12 am
Is it worth using KPK as precomputed ? why not on the fly ?
I've baked the resulting bitbase into my engine because my target platform has a lot of free ROM, but not RAM.
There are many other (much better and much less restrictive) options.
The freedom to make closed source software out of open source software is a freedom that harms everyone except the freeloader. Just like the freedom to burn down any house would harm everyone except the arsonist.
Rasmus Althoff
https://www.ct800.net


mar
Posts: 2010
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Eucalyptus - KPK Bitbases Generator

Post by mar » Sat May 25, 2019 10:34 am

Ras wrote:
Sat May 25, 2019 9:52 am
The freedom to make closed source software out of open source software is a freedom that harms everyone except the freeloader. Just like the freedom to burn down any house would harm everyone except the arsonist.
That's a really weird analogy. Closed source is a freedom of choice as well, and it doesn't have to be that big evil corporation
who wants to harm you. How exactly does closed source harm you? This is just paranoia.

So how do you make closed source software out of a generated kpk table? It's not even code but data.
It's not Linux kernel either (and there's FreeBSD).
Martin Sedlak

Ras
Posts: 1161
Joined: Tue Aug 30, 2016 6:19 pm
Contact:

Re: Eucalyptus - KPK Bitbases Generator

Post by Ras » Sat May 25, 2019 10:57 am

mar wrote:
Sat May 25, 2019 10:34 am
Closed source is a freedom of choice as well
The GPL doesn't prevent that choice. You can make closed source all day long. It's just that you can't take GPL software for that and reap where otheres have harvested.
How exactly does closed source harm you?
Closed source itself doesn't, but the inherent competetive advantage of the leecher does harm the ecosystem. With the GPL, someone may add additional 10% on top of the existing code, but has to give that back so that also the original authors may include the patches.

Of course, there's also the other way around where you obviously don't want to GPL your non-GPL-software just because of a hundred LOC. Then just write them yourself - the GPL only protects the code, not the underlying ideas.
It's not even code but data.
The output of a GPL program is not under GPL, the FSF explains that quite clearly.
Rasmus Althoff
https://www.ct800.net

JohnWoe
Posts: 99
Joined: Sat Mar 02, 2013 10:31 pm

Re: Eucalyptus - KPK Bitbases Generator

Post by JohnWoe » Sat May 25, 2019 11:20 am

mar wrote:
Sat May 25, 2019 9:20 am
JohnWoe wrote:
Fri May 24, 2019 11:39 pm
I published a piece of software I use in Sapeli.
https://github.com/SamuraiDangyo/Eucalyptus
Are you crazy? :D You attach GPL to the generated kpk table?! :D
So when someone includes it, you force the cancerous GPL crap on him?

I wonder why some people still believe that open source = GPL. There are many other (much better and much less restrictive) options.
Thanks for the reply!
It was poorly worded. I meant the generator to be under GPLv3 not the 64bit KPK table.
I updated 1.01. I need to think whether this probing code needs licensing.
Nice! There are public domain generators for all sort of projects!

mar
Posts: 2010
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Eucalyptus - KPK Bitbases Generator

Post by mar » Sat May 25, 2019 11:37 am

Ras wrote:
Sat May 25, 2019 10:57 am
It's just that you can't take GPL software for that and reap where otheres have harvested.
Closed source itself doesn't, but the inherent competetive advantage of the leecher does harm the ecosystem. With the GPL, someone may add additional 10% on top of the existing code, but has to give that back so that also the original authors may include the patches.
From experience, people who use open source libraries (with truly free licenses) in their closed source programs often create PRs to help fix/add new features.

Speaking of "leechers" and "arsonists", I see 3 cheap SF clones in top 10 in CCRL, for example.
To me it's actually the cloners who are the leechers: people who take an existing chess program (where others have harvested), attach their name to it, rename the engine (reap where) and make random changes and pollute rating lists.

They still "honor" the GPL so it's perfectly legal, but I can't respect those at all (I don't see any honor in cloning existing programs).
There's way more "open source" chess programs like this than closed source.
Martin Sedlak

Post Reply