lightvector / KataGo

GTP engine and self-play learning in Go
https://katagotraining.org/
Other
3.56k stars 564 forks source link

How to compile the engine to a dll so other language can call it? #552

Open mcguu opened 3 years ago

mcguu commented 3 years ago

If I use other language such as .net how to compile it to dll so a c# can call it?

mega-optimus commented 3 years ago

Instead of calling a dll, you can use C# to create a child process running the katago.exe

lightvector commented 3 years ago

Yes, just invoke KataGo as a separate process and use the analysis engine whose interface is fully documented here: https://github.com/lightvector/KataGo/blob/master/docs/Analysis_Engine.md

mcguu commented 3 years ago

@mega-optimus what about swift? in mac?

HackYardo commented 3 years ago

@mcguu You can use Julia Lang if you have a time of ten days to learn it. By Julia, run and stop katago.exe are as easy as

cmd=`./katago.exe mode cfg model`
open(cmd) 
close(cmd)
y-ich commented 3 years ago

@mcguu san,

I think that Process in Foundation is for you.