Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What would be the best way to reuse your code (if you agree)? #277

Open
fathzer opened this issue Jan 13, 2025 · 5 comments
Open

What would be the best way to reuse your code (if you agree)? #277

fathzer opened this issue Jan 13, 2025 · 5 comments

Comments

@fathzer
Copy link
Contributor

fathzer commented Jan 13, 2025

Hi (again),

I would like to reuse your move generator in my own toy chess engine project.

Do you agree? There is no license information in your project.
Of course, I would credit you in my project as I do with my current move generator.

If you don't agree ... you can stop reading ;-)

If you agree, maybe your move generator could be distributed as a separate library in Maven central in a new com.kelseyde groupid (I can help, I already had published some artifacts there), or in mine com.fathzer if you prefer.
The artifact could also be published via Github (I they they provide an artifact registry), if Maven if too complicated (it requires to publish pgp keys in an appropriate registry ... and to renew the keys).

I think the only things that need be changed to have a really clean interface are to remove the dependencies of Board and MoveGenerator on UCI and Search.
In particular the static UCI.Options.chess960 variable makes it impossible to run a regular chess game and a chess960 game at the same time. This is usually not a problem, but static variables in libraries are always a nightmare for someone ;-)
Changing the uses of System.out (e.g in Board.print) to a toString methods could be the icing on the cake ;-)

For all these things, I can do it, partially, totally ... as you wish.

Best regards,

Jean-Marc

@kelseyde
Copy link
Owner

Hello Jean-Marc,

You are more than welcome to re-use the move generator in your own engine!

I had actually already planned this year to split out the Board and MoveGenerator packages into their own library, which could be published to maven and re-used by other Java developers.

Now that there is one person interested in that idea, I will accelerate that side project :-)

If you would be interested in also working on this separate library, that would also be more than welcome. Perhaps I can already create the initial repository and invite you as a contributor?

@kelseyde
Copy link
Owner

Regarding the UCI.Options.chess960 global variable, indeed, that needs to be improved... global variables in general are not the best pattern :-)

@fathzer
Copy link
Contributor Author

fathzer commented Jan 14, 2025

Hello Dan,

If you would be interested in also working on this separate library, that would also be more than welcome. Perhaps I can already create the initial repository and invite you as a contributor?

Yes, I am interested. You can create the initial repository and invite me :-)

@kelseyde
Copy link
Owner

I sent you an invite :-)

@kelseyde
Copy link
Owner

@fathzer I created the calvin-chess repository and migrated the initial src + test packages across there, as well as creating some open issues. Feel free to contribute there if you would like! I definitely need to tidy up a lot of things before it's in a nice state to publish the first version to maven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants