Rayon (rn-3.9) is the strongest open source go AI

For discussing go computing, software announcements, etc.
Gomoto
Gosei
Posts: 1733
Joined: Sun Nov 06, 2016 6:56 am
GD Posts: 0
Location: Earth
Has thanked: 621 times
Been thanked: 310 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by Gomoto »

Thanks for the link, i use it just now to play with Drago. I can use the gtp window to show win percentages and to suggest moves ("genmove b" or "genmove w" for example).

Are there any options to show alternative moves and win percentages in the gtp output available?
Or are there any other hidden analysis features available already?

Dear Rayon developers,

thanks for your outstanding work on this engine. It is very nice to have such a strong open source engine available. I am looking forward to analyze my games with your engine. And it even makes sense to develop some custom tools for analyzing because the engine is open source :-)

Regards
Gomoto
kdbaby1412
Dies in gote
Posts: 31
Joined: Mon Nov 14, 2016 1:49 pm
Rank: KGS 4 kyu
GD Posts: 0

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by kdbaby1412 »

Can ypu post an instruction on how to compile? Cause I'm unable to compile it.
Is there a way to run this on an engine like Drago or fuego?
as0770
Lives with ko
Posts: 180
Joined: Sun Jun 26, 2016 8:07 am
Rank: Beginner
GD Posts: 0
Has thanked: 15 times
Been thanked: 23 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by as0770 »

roy7 wrote:
as0770 wrote:Thanks but it won't compile:

g++ -O3 -Wall -std=c++11 -g -c src/UctSearch.cpp -o src/UctSearch.o
src/UctSearch.cpp:39:18: fatal error: Eval.h: Datei oder Verzeichnis nicht gefunden
#include "Eval.h"
^
compilation terminated.


You have to download the CNTK as well and add the cntk/Include directory to the includes path when compiling. Either add to your PATH in general or add

Code: Select all

-I /path/to/cntk/Include
When you link at the end you'll need to add cntk/ctnk/EvalDll.dll (I think it was called) to the list of objects on the file command make does.


Thanks, but I still have problems. After downloading cntk I get this error:

src/UctSearch.cpp: In function ‘void ParallelUctSearch(thread_arg_t*)’:
src/UctSearch.cpp:1263:15: error: ‘atomic_int64_t’ in namespace ‘std’ does not name a type
static std::atomic_int64_t queue_full;
^
src/UctSearch.cpp:1281:25: error: ‘queue_full’ was not declared in this scope
std::atomic_fetch_add(&queue_full, 1);
^
I can remove the function:

void
ParallelUctSearch(thread_arg_t *arg)
{
}

And get the next error:

/home/alex/Programme/Engines/Go/Rayon/src/UctSearch.cpp:2070: Nicht definierter Verweis auf `GetEvalF'

I can fix this by:

// GetEvalF(&nn_model);

And it compiles but of course it don't work:

./ray
Init CNTK
Get EvalModel failed
zakki
Beginner
Posts: 14
Joined: Wed Feb 22, 2017 4:44 am
GD Posts: 0
Has thanked: 1 time
Been thanked: 3 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by zakki »

Perhaps you need to link libeval like

Code: Select all

-L<cntk lib dir> -leval
.
roy7
Dies in gote
Posts: 41
Joined: Sat Jan 28, 2017 8:36 pm
GD Posts: 0
OGS: roy7
Universal go server handle: roy7
Been thanked: 7 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by roy7 »

as0770 wrote:Thanks, but I still have problems. After downloading cntk I get this error:

src/UctSearch.cpp: In function ‘void ParallelUctSearch(thread_arg_t*)’:
src/UctSearch.cpp:1263:15: error: ‘atomic_int64_t’ in namespace ‘std’ does not name a type
static std::atomic_int64_t queue_full;
^
src/UctSearch.cpp:1281:25: error: ‘queue_full’ was not declared in this scope
std::atomic_fetch_add(&queue_full, 1);


See my comments here:

viewtopic.php?p=216681#p216681
as0770
Lives with ko
Posts: 180
Joined: Sun Jun 26, 2016 8:07 am
Rank: Beginner
GD Posts: 0
Has thanked: 15 times
Been thanked: 23 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by as0770 »

zakki wrote:Perhaps you need to link libeval like

Code: Select all

-L<cntk lib dir> -leval
.


Then I get this:

Code: Select all

alex@alex-Aspire-VN7-791:~/Downloads/Ray-rn-2.3$ make
g++ -O3 -Wall -std=c++11 -g -o ray src/Command.o src/DynamicKomi.o src/GoBoard.o src/Gtp.o src/Ladder.o src/Message.o src/Nakade.o src/Pattern.o src/PatternHash.o src/Point.o src/Rating.o src/RayMain.o src/Semeai.o src/Simulation.o src/UctRating.o src/UctSearch.o src/Utility.o src/ZobristHash.o -lm -pthread -L/home/alex/Downloads/cntk/cntk/lib -leval
/usr/bin/ld: warning: libcudart.so.8.0, needed by /home/alex/Downloads/cntk/cntk/lib/libeval.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libiomp5.so, needed by /home/alex/Downloads/cntk/cntk/lib/libeval.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcntkmath.so, needed by /home/alex/Downloads/cntk/cntk/lib/libeval.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmultiverso.so, needed by /home/alex/Downloads/cntk/cntk/lib/libeval.so, not found (try using -rpath or -rpath-link)
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::Matrix<double>::CopyColumnsStrided(Microsoft::MSR::CNTK::Matrix<double> const&, unsigned long, unsigned long, unsigned long)'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `cudaGetDevice'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::Matrix<double>::operator()(unsigned long, unsigned long)'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::Matrix<float>::AssignRowSliceValuesOf(Microsoft::MSR::CNTK::Matrix<float> const&, unsigned long, unsigned long)'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::Matrix<float>::InplaceSoftThreshold(float)'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::Matrix<float>::Reset()'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::ProfilerTimeEnd(long long, int)'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `cudaDeviceSynchronize'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::Matrix<float>::AddScaledDifference(Microsoft::MSR::CNTK::Matrix<float> const&, Microsoft::MSR::CNTK::Matrix<float> const&, Microsoft::MSR::CNTK::Matrix<float> const&, Microsoft::MSR::CNTK::Matrix<float>&)'
.
.
.
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::Matrix<float>::AddElementToElement(Microsoft::MSR::CNTK::Matrix<float> const&, unsigned long, unsigned long, Microsoft::MSR::CNTK::Matrix<float>&, unsigned long, unsigned long)'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::File::operator>>(std::string&)'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::CUDAPageLockedMemAllocator::CUDAPageLockedMemAllocator(int)'
/home/alex/Downloads/cntk/cntk/lib/libeval.so: Nicht definierter Verweis auf `Microsoft::MSR::CNTK::Matrix<double>::Write(Microsoft::MSR::CNTK::File&) const'
collect2: error: ld returned 1 exit status
Makefile:22: die Regel für Ziel „ray“ scheiterte
make: *** [ray] Fehler 1
alex@alex-Aspire-VN7-791:~/Downloads/Ray-rn-2.3$


:sad:
roy7
Dies in gote
Posts: 41
Joined: Sat Jan 28, 2017 8:36 pm
GD Posts: 0
OGS: roy7
Universal go server handle: roy7
Been thanked: 7 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by roy7 »

as0770 wrote:[code]alex@alex-Aspire-VN7-791:~/Downloads/Ray-rn-2.3$ make
g++ -O3 -Wall -std=c++11 -g -o ray src/Command.o src/DynamicKomi.o src/GoBoard.o src/Gtp.o src/Ladder.o src/Message.o src/Nakade.o src/Pattern.o src/PatternHash.o src/Point.o src/Rating.o src/RayMain.o src/Semeai.o src/Simulation.o src/UctRating.o src/UctSearch.o src/Utility.o src/ZobristHash.o -lm -pthread -L/home/alex/Downloads/cntk/cntk/lib -leval


Instead of adding the -L and the -leval, I just moved EvalDll.dll to the build directory and did this:

g++ -O3 -Wall -std=c++11 -g -o ray src/Command.o src/DynamicKomi.o src/GoBoard.o src/Gtp.o src/Ladder.o src/Message.o src/Nakade.o src/Pattern.o src/PatternHash.o src/Point.o src/Rating.o src/RayMain.o src/Semeai.o src/Simulation.o src/UctRating.o src/UctSearch.o src/Utility.o src/ZobristHash.o EvalDll.dll -lm -pthread
as0770
Lives with ko
Posts: 180
Joined: Sun Jun 26, 2016 8:07 am
Rank: Beginner
GD Posts: 0
Has thanked: 15 times
Been thanked: 23 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by as0770 »

roy7 wrote:
as0770 wrote:[code]alex@alex-Aspire-VN7-791:~/Downloads/Ray-rn-2.3$ make
g++ -O3 -Wall -std=c++11 -g -o ray src/Command.o src/DynamicKomi.o src/GoBoard.o src/Gtp.o src/Ladder.o src/Message.o src/Nakade.o src/Pattern.o src/PatternHash.o src/Point.o src/Rating.o src/RayMain.o src/Semeai.o src/Simulation.o src/UctRating.o src/UctSearch.o src/Utility.o src/ZobristHash.o -lm -pthread -L/home/alex/Downloads/cntk/cntk/lib -leval


Instead of adding the -L and the -leval, I just moved EvalDll.dll to the build directory and did this:

g++ -O3 -Wall -std=c++11 -g -o ray src/Command.o src/DynamicKomi.o src/GoBoard.o src/Gtp.o src/Ladder.o src/Message.o src/Nakade.o src/Pattern.o src/PatternHash.o src/Point.o src/Rating.o src/RayMain.o src/Semeai.o src/Simulation.o src/UctRating.o src/UctSearch.o src/Utility.o src/ZobristHash.o EvalDll.dll -lm -pthread



Doesn't work for me, same error messages... :sad:
Claes1981
Beginner
Posts: 1
Joined: Fri Feb 24, 2017 10:12 am
GD Posts: 0

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by Claes1981 »

as0770 wrote:Doesn't work for me, same error messages... :sad:

If you compile on Linux, maybe you need to compile CNTK too, as bihonglu writes he has done in the first post here: https://github.com/zakki/Ray/issues/5.
as0770
Lives with ko
Posts: 180
Joined: Sun Jun 26, 2016 8:07 am
Rank: Beginner
GD Posts: 0
Has thanked: 15 times
Been thanked: 23 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by as0770 »

Claes1981 wrote:
as0770 wrote:Doesn't work for me, same error messages... :sad:

If you compile on Linux, maybe you need to compile CNTK too, as bihonglu writes he has done in the first post here: https://github.com/zakki/Ray/issues/5.


In the meantime I was able to compile ray with: -L/home/alex/Downloads/cntk/cntk/lib -L/home/alex/Downloads/cntk/cntk/dependencies/lib -leval

I downloaded the bin version of cntk and used the install script, my problem was that I have to "activate" cntk before compiling...

Code: Select all

alex@alex-Aspire-VN7-791:~/Downloads/Ray-rn-2.3$ source "/home/alex/Downloads/cntk/activate-cntk"

************************************************************
CNTK is activated.

Please checkout tutorials and examples here:
  /home/alex/Downloads/cntk/Tutorials
  /home/alex/Downloads/cntk/Examples

************************************************************
(/home/alex/anaconda3/envs/cntk-py35) alex@alex-Aspire-VN7-791:~/Downloads/Ray-rn-2.3$ make
g++ -O3 -Wall -std=c++11 -g -o ray src/Command.o src/DynamicKomi.o src/GoBoard.o src/Gtp.o src/Ladder.o src/Message.o src/Nakade.o src/Pattern.o src/PatternHash.o src/Point.o src/Rating.o src/RayMain.o src/Semeai.o src/Simulation.o src/UctRating.o src/UctSearch.o src/Utility.o src/ZobristHash.o -lm -pthread -L/home/alex/Downloads/cntk/cntk/lib -L/home/alex/Downloads/cntk/cntk/dependencies/lib -leval
(/home/alex/anaconda3/envs/cntk-py35) alex@alex-Aspire-VN7-791:~/Downloads/Ray-rn-2.3$


When I started ray I got this kind of error messages:

Code: Select all

./ray: error while loading shared libraries: libcudart.so.8.0: cannot open shared object file: No such file or directory


I copied the libraries to the /lib directory and now I am stuck with this error:

Code: Select all

./ray
Init CNTK
terminate called after throwing an instance of 'Microsoft::MSR::CNTK::ExceptionWithCallStack<std::runtime_error>'
  what():  unmatched bracket found in parameters
Abgebrochen (Speicherabzug geschrieben)
(/home/alex/anaconda3/envs/cntk-py35)


Now I am tired and go to bed, maybe I have more luck tomorrow :)
User avatar
ez4u
Oza
Posts: 2414
Joined: Wed Feb 23, 2011 10:15 pm
Rank: Jp 6 dan
GD Posts: 0
KGS: ez4u
Location: Tokyo, Japan
Has thanked: 2351 times
Been thanked: 1332 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by ez4u »

Gomoto wrote:Thanks for the link, i use it just now to play with Drago. I can use the gtp window to show win percentages and to suggest moves ("genmove b" or "genmove w" for example).

Are there any options to show alternative moves and win percentages in the gtp output available?
Or are there any other hidden analysis features available already?

Dear Rayon developers,

thanks for your outstanding work on this engine. It is very nice to have such a strong open source engine available. I am looking forward to analyze my games with your engine. And it even makes sense to develop some custom tools for analyzing because the engine is open source :-)

Regards
Gomoto

How did you add it to drago? What does your engines.config look like? I downloaded the binary and then cntk (based on the readme) but I don't have any success with drago, gogui, or just trying to run Rn.3.10.2.exe in a command window. :-(
Dave Sigaty
"Short-lived are both the praiser and the praised, and rememberer and the remembered..."
- Marcus Aurelius; Meditations, VIII 21
kdbaby1412
Dies in gote
Posts: 31
Joined: Mon Nov 14, 2016 1:49 pm
Rank: KGS 4 kyu
GD Posts: 0

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by kdbaby1412 »

ez4u wrote:
Gomoto wrote:Thanks for the link, i use it just now to play with Drago. I can use the gtp window to show win percentages and to suggest moves ("genmove b" or "genmove w" for example).

Are there any options to show alternative moves and win percentages in the gtp output available?
Or are there any other hidden analysis features available already?

Dear Rayon developers,

thanks for your outstanding work on this engine. It is very nice to have such a strong open source engine available. I am looking forward to analyze my games with your engine. And it even makes sense to develop some custom tools for analyzing because the engine is open source :-)

Regards
Gomoto

How did you add it to drago? What does your engines.config look like? I downloaded the binary and then cntk (based on the readme) but I don't have any success with drago, gogui, or just trying to run Rn.3.10.2.exe in a command window. :-(


Same. I'm still trying to compile this thing
User avatar
daal
Oza
Posts: 2508
Joined: Wed Apr 21, 2010 1:30 am
GD Posts: 0
Has thanked: 1304 times
Been thanked: 1128 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by daal »

Wake me up when I can buy it.
Patience, grasshopper.
Gomoto
Gosei
Posts: 1733
Joined: Sun Nov 06, 2016 6:56 am
GD Posts: 0
Location: Earth
Has thanked: 621 times
Been thanked: 310 times

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by Gomoto »

How to play with Drago:

Binary for Win 64 & Nvidia GPU:

https://github.com/zakki/Ray/releases

Add the engine manually after adding this to the engines config file in the Drago directory:

[Ray]
url = https://github.com/zakki/Ray/releases
connection = not.required
level = not.handled
boardsize = not.required
chinese.rules = not.required
japanese.rules = not.handled
time.per.move = not.handled
total.time = not.handled
overtime = not.handled

This are just the settings I am using, not the optimal settings. Drago can pass commandline options to the engine. And you can use the GTP window too.

Regards
Gomoto
kdbaby1412
Dies in gote
Posts: 31
Joined: Mon Nov 14, 2016 1:49 pm
Rank: KGS 4 kyu
GD Posts: 0

Re: Rayon (rn-3.9) is the strongest open source go AI

Post by kdbaby1412 »

Gomoto wrote:How to play with Drago:

Binary for Win 64 & Nvidia GPU:

https://github.com/zakki/Ray/releases

Add the engine manually after adding this to the engines config file in the Drago directory:

[Ray]
url = https://github.com/zakki/Ray/releases
connection = not.required
level = not.handled
boardsize = not.required
chinese.rules = not.required
japanese.rules = not.handled
time.per.move = not.handled
total.time = not.handled
overtime = not.handled

This are just the settings I am using, not the optimal settings. Drago can pass commandline options to the engine. And you can use the GTP window too.

Regards
Gomoto


Is there the way to optimize this engine on i7 computer? I tried but it's failed. Anyway, thanks for the guidelines
Post Reply