KataGo icon indicating copy to clipboard operation
KataGo copied to clipboard

why the training games of kata1 have many board size?

Open l1t1 opened this issue 4 years ago • 49 comments

19 x16,18x 18 etc

l1t1 avatar Mar 26 '21 05:03 l1t1

and what the different game type means?

l1t1 avatar Mar 26 '21 05:03 l1t1

Because 1) KataGo can play on different board sizes 2) it's a very nice feature 3) playing on different sizes probably help it generalize concepts better 4) in order to play well on different board sizes, it must be trained on different board sizes

Note: while trained on board sizes from 7x7 to 19x19, KataGo can also play well on board with sizes somewhat out of this range, as it generalized quite well ;-). Eg it understands with low visit than a 20 komi is not enough for white on 5x5, and it is still extremely strong on 25x25: almost certainly weaker than if it were trained with selfplay on these sizes, but still very strong

Friday9i avatar Mar 27 '21 15:03 Friday9i

I really want to play on boards up to 37x37! will we ever see at least one release?

cryptsport avatar Mar 28 '21 16:03 cryptsport

From the default KataGo, if you compile it with Large Board Size feature ("USE_BIGGER_BOARDS_EXPENSIVE" in CMake), I know you can play up to 25x25, and if your GUI handles bigger boards, I think you can play up to 37x37. I tested a long time ago (1 year?) a game on 25x25 and ~15 handicap, and I lost (I'm around 1k KGS): so KataGo was very strong on 25x25, probably around pro level or more. I don't know on bigger sizes, but it's probably weaker when you go way very far from 19x19?

Friday9i avatar Mar 28 '21 19:03 Friday9i

@Friday9i thanks for the answer! unfortunately I do not know how to do it. if anyone could do this for windows I would be very grateful! I compared memory consumption for different board sizes, and as the size increases, the memory consumption does not grow much https://lifein19x19.com/viewtopic.php?p=259426#p259426

cryptsport avatar Mar 28 '21 19:03 cryptsport

I compiled it last week for Windows, with Large Board Size and OpenCL, here it is. katagoLBSU.zip You should unzip it and you can rename it simply katago. LBSU means Large Board Size + the fact it includes latest Uncertainty modification of MCTS by lightvector :-)

Otherwise, if you prefer, there is an official version from lightvector (but it is from last year): https://github.com/lightvector/KataGo/releases/tag/v1.6.1%2Bbs29

Friday9i avatar Mar 28 '21 21:03 Friday9i

@Friday9i thanks, I know about the version up to 29x29, I launched katagoLBSU, this is also up to 29x29: "boardsize 31 2021-03-29 14:27:05+0400: Controller: 2 boardsize 31 2021-03-29 14:27:05+0400: ?2 unacceptable size (Board::MAX_LEN is 29, consider increasing and recompiling)" can you make a version up to 37x37? (better version eigenavx2)

cryptsport avatar Mar 29 '21 10:03 cryptsport

Sorry but I don't know how to compile KataGo for 37x37... I'll take a look at the code to see: if there's some easy-to-change parameter, I'll do it...

Edit: I found these lines in CMakeLists.txt: if(USE_BIGGER_BOARDS_EXPENSIVE) target_compile_definitions(katago PRIVATE COMPILE_MAX_BOARD_LEN=29) endif() I'll try to change it from 29 to 37 and then I'll recompile it, I hope it should work : -)! @lightvector: do you think it'll work?

Friday9i avatar Mar 29 '21 12:03 Friday9i

Is this version working on 37x37? Hopefully yes :-). It's an OpenCL version (never compiled Eigen...) katago37x37.zip

Friday9i avatar Mar 29 '21 12:03 Friday9i

@Friday9i today is a wonderful day !!! thanks a lot!!! works at 35x35 !!! q5go does not support 37x37 :(

cryptsport avatar Mar 29 '21 13:03 cryptsport

@Friday9i please compile eigenavx2. maybe it will work. OpenCL at me terribly freezes

cryptsport avatar Mar 29 '21 13:03 cryptsport

Ok, done, here it is: katago37x37-Eigen.zip

Friday9i avatar Mar 29 '21 14:03 Friday9i

@Friday9i I am immensely grateful to you!!!

everything is fine, it works !!!

cryptsport avatar Mar 29 '21 15:03 cryptsport

cool :-) I just tried it too, and with a (very) good CPU, it's reasonably fast! Enjoy!

By the way, how is it playing on 35x35, is it strong too? Any fancy opening moves (eg 5x5 corner moves)? I doubt it, but who knows ;-)

Friday9i avatar Mar 29 '21 15:03 Friday9i

I'm still euphoric ... but, first impression, a network of 10 blocks, 5 playouts, nothing strange (played 2 networks ). but I just watched and was happy! I've been waiting for this for many years!

cryptsport avatar Mar 29 '21 16:03 cryptsport

the opening moves are likely to be similar on boards of any size, unless there has been training on them. strength in my opinion change little KataGo s730 5 playouts - KataGo s730 5 playouts 35 X 35 https://lifein19x19.com/viewtopic.php?p=264288#p264288

cryptsport avatar Mar 30 '21 15:03 cryptsport

@Friday9i if the compilation takes a little time, could you make a version with no board size limit, or up to 100x100 or 255x255? I want to experiment!

cryptsport avatar Mar 30 '21 15:03 cryptsport

Here it is, but no guarantee at all: above 37 is clearly ouside of the scope it was designed for... Compilation worked, but I doubt it'll be technically able to play such large boards, and if it can, if it makes sense at all. You'll tell us! katago-Eigen-100x100.zip

Note: there is possibly/probably an issue regarding board moves, coded IIRC by letters from a to z then A to Z ... That makes 52 letters (and I think i is not used), so possibly a limit at 50... I guess it should crash above that (?)

Friday9i avatar Mar 30 '21 15:03 Friday9i

thank you so much!!! works at 35x39 !!! q5Go yesterday updated to 52x52, but there is no Windows version yet ... waiting again, this is terrible!

cryptsport avatar Mar 30 '21 15:03 cryptsport

@lightvector made the numbering, as far as I understood, up to 650x650. it was soon implemented in the q5Go

cryptsport avatar Mar 30 '21 16:03 cryptsport

possible only up to 52x52 https://lifein19x19.com/viewtopic.php?p=255925#p255925 but you can continue to 650x650

cryptsport avatar Mar 30 '21 16:03 cryptsport

Ok, 100x100 should do the job for the moment, possibly up to 52x52 if coding moves is an issue. Then, if all is well and 100x100 works and is not enough, I'll be in a position to compile it for larger boards :-). Enjoy!

Friday9i avatar Mar 30 '21 16:03 Friday9i

Sorry! it turned out that the 100x100 version takes a very, very long time to load. probably the fact is that memory is reserved for this. if it's easy, please make a 52x52 version. probably it will be perfect

cryptsport avatar Mar 30 '21 16:03 cryptsport

for a 36x36 board and a network of 10b katago37x37-Eigen starts in a second, but also, for a 36x36 board and a network of 10b katago100x100 starts in 3 minutes. unclear. maybe 52x52 will work fine? 36x52 works!

cryptsport avatar Mar 30 '21 17:03 cryptsport

Here is the 52x52 version: katago-Eigen-52x52.zip

Friday9i avatar Mar 30 '21 17:03 Friday9i

started right away! very grateful !!!

cryptsport avatar Mar 30 '21 17:03 cryptsport

There is a reason why boards larger than 52x52 will not be popular in the foreseeable future - the modern sgf format is only up to 52x52. unless suddenly something amazingly interesting, new, is found on large boards!

cryptsport avatar Mar 30 '21 17:03 cryptsport

KataGo b10-s114 5 playouts - KataGo b10-s114 5 playouts 36 X 52 https://lifein19x19.com/viewtopic.php?p=264301#p264301 on the first games it seems that the 10b network is better "suited" for very large boards than the 40b s730 network

cryptsport avatar Mar 31 '21 13:03 cryptsport

@Friday9i please make OpenCL version 52x52! I'm going to install a new video card the other day

cryptsport avatar Mar 31 '21 13:03 cryptsport

Keep in mind that that part of the reason the flag for larger board sizes by default caps to 29 is that all of the neural networks don't generalize upward too much farther than that before losing quality. The largest they're trained on is 19x19, and they seem to continue to be good-quality up into board sizes in the twenties, and to some degree the thirties, but beyond that, the evaluations start to become corrupted. Almost certainly by size 50+, the board evaluation is not going to behave sanely any more.

lightvector avatar Mar 31 '21 13:03 lightvector