Andscacs nnue 0.1

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

Moderators: hgm, Rebel, chrisw

User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Andscacs nnue 0.1

Post by pedrox »

Michel wrote: Fri Jan 22, 2021 12:11 pm
What you are saying makes no sense. What you are saying is that I can create a shared library "stockfish.dll" and then release a closed source chess engine that links against stockfish.dll. After all: I am not modifying the Stockfish source code so I have obligations towards the Stockfish authors.

Have you followed my advice and Googled for LGPL?
If you modify the stockfish code to create a dll and you are going to distribute that dll, then you should also provide the source code with the changes made in stockfish to create that dll if you have needed to modify the code of the files because you might fix it by adding new ones. The new code must of course be open source and GPL licensed.

When Pocket Fritz used Fruit as a dll, they provided on request the code they used to convert Fruit into a dll, I think I remember it was 2 files. Of course they did not provide the source code for the GUI (Pocket Fritz).

I am giving you real examples that have already happened.

From there, nothing prevents you from creating a closed source engine that accesses that dll.

You can distribute your engine without providing source code. If you are going to distribute the stockfish dll, then also provide the new stockfish code that creates the dll.

About LGPL, I have nothing to say.

Sorry, my English is very poor, I don't know how to explain this to you better. Besides I think you are not in the mood to listen to my opinion and my reasoning. So I'll stop here.
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Andscacs nnue 0.1

Post by Dann Corbit »

pedrox wrote: Fri Jan 22, 2021 10:28 am
Michel wrote: Fri Jan 22, 2021 10:03 am
pedrox wrote: Fri Jan 22, 2021 9:15 am Daniel and Engin could use SF NNUE if instead of integrating Daniel Shawul's GPL code into their engine they would use his dll. This has happened before, e.g. GUIs (code closed) accessing bitbase dll. You can use the dll and distribute the source code for it and you comply with the GPL and your engine can be closed source.

Using the dll is as easy or even easier than integrating the code into your engine. The good thing about the integration is that it allows the programmer to distribute for his engine only an exe file instead of exe + dll which complicates the user's life. In addition in case of using multiple platforms it facilitates the work.

I have a test code to access the dll, it is only a few lines of code. The code accesses the dll and the NNUE file, with FEN allows to check the eval and also shows an example how my engine does the board conversion to access directly without FEN.

File: nnueprobe.c --> code source
nnueprobe.bat --> exe for console (use nnueprobe.exe)
Folder: libnnueprobe contains the code GPL of Daniel Shawul

https://www.mediafire.com/file/j5v42uyx ... ue.7z/file
This false. Dlls execute in the same process. They fall still under the GPL.
This is not false. This has happened before. Especially with GUI code closed accessing GPL dll. That the dll runs in the same process has nothing to do with it.

I seem to remember it was used by Fritz Pocket PC Version already several years ago and others. For example Fritz Pocket PC used the Fruit engine as a dll and you do not have the Fritz Pocket PC code. Besides Fritz Pocket PC other Pocket PC GUIs used the same technique. CEBoard another ...
You are both right.
GPL code does not become legal when converted to a DLL (for arbitrary use).
LGPL code does become legal when converted to a DLL.
So the exact nature of the license is the pivotal point.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Engin
Posts: 918
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: Andscacs nnue 0.1

Post by Engin »

question about GPL NNUE probing code

would it be OK/legal to using daniel shawuls NNUE probing code in closed source engines if i am asking him it self to allow the code to use without open my source public?

also i can generate my own nnue data training with pytorch by my self to use it and not to using stockfish nnue data, just i need the probing code from daniel to access the weights data.

would it be then all ok for me and other closed engines to use the own nnue data?
Engin
Posts: 918
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: Andscacs nnue 0.1

Post by Engin »

or is it OK even using dll probing code without modified + own created nnue weight data file ?
connor_mcmonigle
Posts: 530
Joined: Sun Sep 06, 2020 4:40 am
Full name: Connor McMonigle

Re: Andscacs nnue 0.1

Post by connor_mcmonigle »

Engin wrote: Thu Jan 28, 2021 2:19 pm question about GPL NNUE probing code
would it be OK/legal to using daniel shawuls NNUE probing code in closed source engines if i am asking him it self to allow the code to use without open my source public?
In the strictly legal since, I believe the conclusion of the above is that the answer is no. If Daniel Shawul was able to re-license it, then perhaps. However, Daniel's nnue-probe largely originates from CFish which has a GPL license. Therefore, it would not be possible for Daniel to re-license it afaik.
Engin wrote: Thu Jan 28, 2021 2:19 pm also i can generate my own nnue data training with pytorch by my self to use it and not to using stockfish nnue data, just i need the probing code from daniel to access the weights data.
What are your motivations for keeping your engine's source closed? It would seem open sourcing your engine would resolve a lot of your problems and likely increase others' interest in your engine.

On the other hand, writing your own unoptimized nnue inference code is pretty trivial and can be fairly competitive if that's the route you want to take (see Orion 0.7). It's just some matrix multiplications. The difficulty arises in writing training code, finding improvements to the input features/arch and producing a competitive network without relying on data generated by other engines.
Engin
Posts: 918
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: Andscacs nnue 0.1

Post by Engin »

connor_mcmonigle wrote: Thu Jan 28, 2021 6:45 pm
Engin wrote: Thu Jan 28, 2021 2:19 pm question about GPL NNUE probing code
would it be OK/legal to using daniel shawuls NNUE probing code in closed source engines if i am asking him it self to allow the code to use without open my source public?
In the strictly legal since, I believe the conclusion of the above is that the answer is no. If Daniel Shawul was able to re-license it, then perhaps. However, Daniel's nnue-probe largely originates from CFish which has a GPL license. Therefore, it would not be possible for Daniel to re-license it afaik.
Engin wrote: Thu Jan 28, 2021 2:19 pm also i can generate my own nnue data training with pytorch by my self to use it and not to using stockfish nnue data, just i need the probing code from daniel to access the weights data.
What are your motivations for keeping your engine's source closed? It would seem open sourcing your engine would resolve a lot of your problems and likely increase others' interest in your engine.

On the other hand, writing your own unoptimized nnue inference code is pretty trivial and can be fairly competitive if that's the route you want to take (see Orion 0.7). It's just some matrix multiplications. The difficulty arises in writing training code, finding improvements to the input features/arch and producing a competitive network without relying on data generated by other engines.
Ok, thanks for you answered me, that's a big problem between open sources with GPL and close sources, i don't agree the GPL rules so keep closed my source, of course it would be solve my problems, but its paradox that open sources can copy and paste each from others clones or what ever they want to do until they are open his code too. while closed source are guilty because using GPL ideas or even simple Algorithm thats know over 50 years of Computerchess, thats very pitty and painfully for some programmers.

On the other side its a huge work to create/optimize own network even i am still working and tuning my eval values since many years ago without any success.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Andscacs nnue 0.1

Post by Daniel Shawul »

I have added support of Stockfish NNUE probing code in NNCPU probe i.e. a non-GPL code that can be used in any private engine!
I haven't yet pushed the code but I tested that it works fine.
So you can now focus on training your NNUE net without worrying about how you probe it or making your engine open source.
It was such a nonsense to begin with anyway.
DmitriyFrosty
Posts: 57
Joined: Mon Mar 27, 2023 8:29 pm
Full name: Dmitry Frosty

Re: Andscacs nnue 0.1

Post by DmitriyFrosty »

Please someone post source code or android compilations of Andscacs nnue. Thanks.
DmitriyFrosty
Posts: 57
Joined: Mon Mar 27, 2023 8:29 pm
Full name: Dmitry Frosty

Re: Andscacs nnue 0.1

Post by DmitriyFrosty »

Anyone???
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Andscacs nnue 0.1

Post by Dann Corbit »

Andscacs is not open source.
Only the original author can create it
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.