lightvector / KataGo

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

Ladder strategy #656

Open hope366 opened 2 years ago

hope366 commented 2 years ago

With the Black M-12, Black's aim is to make either ladder successful.The best white move KataGo shows here is White 1 in the screenshot below. It seems that KataGo thinks that this movement prevents White from both ladders ... Black decided that there was no effective means in this place and switched to M-18 and another place. 無題

However, by following the steps shown in the screenshot below, Black can defeat White 1's intentions and make great profits.I searched about 50,000 visits with the best KataGo 40B, but it seems difficult to find this black clever procedure.

1無題

lightvector commented 2 years ago

Do you have an SGF?

hope366 commented 2 years ago

I intended to upload the SGF, but it seems I forgot ... https://drive.google.com/file/d/1e6TOrQpD7_NE1Ij-aZLEO40uLLQUFG5F/view?usp=sharing

hwj-111 commented 2 years ago

after B plays 14, white would not play 15. The left side of B already in a broken shape, which is not good for B. So, IMO, Katago 40B did make the right choice by not playing here

hwj-111 commented 2 years ago

the right side ladder is not important to white

hope366 commented 2 years ago

This change chart is posted as it is explained by a professional Go player on youtube. https://www.youtube.com/watch?v=LXxtfq69JBg Yes, the changes up to Black 16 don't seem to be the best on both sides. This change chart is meant to clearly explain the success of at least one of the ladders for those who are not yet very high in Go, and not all seem to be the best move. The problem this time around is that it's difficult for KataGo to find the best move for Black after White K-13, but what you're pointing out is purely in the sense of Go strategy. It's interesting.

michito744 commented 2 years ago

On my using 60b network, KataGo found it in a few seconds. 2022-06-25 However, the settings have been changed significantly from the default.

The ongoing distributed training does not explore deeply enough to obtain correct answers at the NN level.

It is like using scissors.

hope366 commented 2 years ago

@michito744 Even in my environment, KataGo has been able to discover L-7 with very little analysis. It is this next black move that is difficult to find. In my environment, the N-1 Nidanbane is a blue spot, but it seems difficult to find the J-9, which should probably be the correct answer.

michito744 commented 2 years ago

Take a closer look at the “diagram on the left”. It accurately predicts the both ladders and J-9, and L-6.

hope366 commented 2 years ago

I wasn't looking at the subboard. Black looks like he's finding a good procedure.

michito744 commented 2 years ago

This result is obtained in the 6k total searches range, of which the first place candidate is less than 4k searches.

hope366 commented 2 years ago

The default settings don't seem to work. What settings are you using?

michito744 commented 2 years ago

It is a secret original setting:-)

This is exactly the situation I pointed out in #654.

michito744 commented 2 years ago

@lightvector There are a rotten number of events similar to those pointed out by hope366 here.

The waste of resources is too lot to conduct a large amount of training in the current default setting.

lightvector commented 2 years ago

@michito744 - If you have settings that are better than the default settings, would you be willing to share them?

michito744 commented 2 years ago

@lightvector I will help if I can, but the reality is that different versions of the network will behave differently, even with the same configuration.

I have several difficult test cases and in each I tweak until I get the right solution. Different environments may behave differently, so a different approach may be necessary.

hope366 commented 2 years ago

@michito744 You are using the software provided free of charge (KataGo or Lizzie). So, if you can use them to get useful information to enhance KataGo, isn't it a good idea to at least tell the creators of KataGo?

michito744 commented 2 years ago

Of course you are right.

I was just stating the caveat that using it without any thought will not work.

Then there are a large number of decimals in the configuration file that are, for all intents and purposes, meaningless. I can't answer any questions or complaints about its contents, because it just happens to work well in the overall balance for a particular version.

hope366 commented 2 years ago

It's not about the decimal point, it's that you don't want to tell anyone what you've struggled to find. You don't seem to have the idea of giving back to the people who provided KataGo and Lizzie with great effort and time ...

michito744 commented 2 years ago

@hope366 If I use the settings for kata1-b60c320-s6093801984-d2892798921 as is for kata1-b60c320-s6119310080-d2899227642, it does not work as expected at all.

Irresponsibly handing them over will not help the project in any way.

hope366 commented 2 years ago

I don't know what "irresponsible" is. Specific settings for specific nets have made it possible to do things that are usually difficult. All you have to do is tell that fact.

michito744 commented 2 years ago

I'm not comfortable being accused by people who don't understand at all, so I'm just going to upload it for now.

Configuration for kata1-b60c320-s6093801984-d2892798921 KataGo_gtp_TensorRT_1_11_0_60x320_dummy_11.txt

Configuration for kata1-b60c320-s6119310080-d2899227642 KataGo_gtp_TensorRT_1_11_0_60x320_dummy_12.txt

Changed due to upload extension restrictions. Please change to ".cfg".

michito744 commented 2 years ago

If this configuration file does not work correctly, it is due to differences in your environment. Please do something about it yourself.

michito744 commented 2 years ago

Actual operation image 2022-06-26

hope366 commented 2 years ago

Thank you for publishing the configuration file. Don't get me wrong, I may not know anything, but I didn't blame you. Shouldn't we stop secrecy? I just made a suggestion.

I looked at your customized config file and found that WRN and cpuct related numbers were distinguished in surprisingly fine increments. Memory usage has also increased significantly. I can't imagine why this was possible. For example, the numerical value of cpuct is the same up to about 13 digits after the decimal point, and it fluctuates little by little after that. Why is this possible?

michito744 commented 2 years ago

@hope366

There is no particular meaning.

Configuration file for kata1-b60c320-s6144619008-d2905897817 KataGo_gtp_TensorRT_1_11_0_60x320_dummy_13.txt

Actual operation image 2022-06-28

hope366 commented 2 years ago

I'm surprised that it is specified in detail with 13 digits or more after the decimal point, and I can't imagine why it can be specified in that part. If you try them in order without thinking about anything, it will take an enormous amount of time.

hope366 commented 2 years ago

@lightvector Have you seen the configuration file uploaded by michito744? There are amazingly detailed settings for WRN, cpuct, FPU and more. It is wonderful that we have succeeded in finding the correct movement for both ladders in this theme diagram with only about 6000 searches. Since the memory usage has been greatly increased, I think that this has an effect, of course ... Is it possible that the config file he uploaded will give you some hints on how KataGo can make a big leap forward?

michito744 commented 2 years ago

Sorry, KataGo_gtp_TensorRT_1_11_0_60x320_dummy_13.txt was not very good.

hope366 commented 2 years ago

@michito744 According to the screenshot you pasted a while ago, after around 6000 searches, Black has found good movements associated with both ladders. In my environment, a search of about 10 to 15k may show similar changes, but when it is not good, even tens of thousands of searches will not work. Can black find good movements within 10k almost every time in your environment?

rooklift commented 2 years ago

Here's a convenient SGF

(;GM[1]FF[4]CA[UTF-8]KM[6.5]SZ[19]RU[Japanese]
;B[pp];W[dd];B[dp];W[pd];B[qc];W[qd];B[pc];W[od];B[nb];W[qq];B[qp];W[pq];B[nq];W[oq];B[op];W[nr];B[qh];W[oh]
;B[pj];W[rc];B[rb];W[ob];B[rd];W[oc];B[kc];W[ic];B[ke];W[kg];B[mf];W[md];B[lh];W[oj];B[re];W[of];B[mc];W[ld]
;B[kd];W[pk];B[hd];W[qf];B[ok];W[qj];B[pi];W[oi];B[fc];W[rf];B[qk];W[pl];B[ql];W[qi];B[pm];W[ol];B[om];W[nl]
;B[ph];W[rh];B[rk];W[rj];B[sj];W[ri];B[cf];W[fd];B[gd];W[ec];B[fe];W[ed];B[fb];W[df];B[dg];W[ff];B[be];W[bd]
;B[eb];W[eg];B[cd];W[cc];B[ce];W[dh];B[cg];W[ge];B[he];W[ee];B[db];W[ch];B[eh];W[fh];B[ei];W[dj];B[fi];W[gh]
;B[gi];W[cl];B[hh];W[hg];B[hf];W[gg];B[de];W[ef];B[bc];W[hi];B[ih];W[ig];B[hj];W[ii];B[jh];W[kh];B[ji];W[ij]
;B[ml];W[km];B[ik];W[jj]TR[nk]C[KataGo struggles to see the triangled move.]
(;B[nk];W[nm];B[nn];W[mm];B[lm];W[mn];B[kj];W[jk];B[jl];W[kk];B[lk];W[kl];B[kn];W[ki];B[mo])
(;B[ki]))
michito744 commented 2 years ago

@hope366

Therefore,

I was just stating the caveat that using it without any thought will not work.

Then there are a large number of decimals in the configuration file that are, for all intents and purposes, meaningless. I can't answer any questions or complaints about its contents, because it just happens to work well in the overall balance for a particular version.

Irresponsibly handing them over will not help the project in any way.

I said.

hope366 commented 2 years ago

@rooklift Thank you for preparing SGF. There is a statement "KataGo struggles to see the triangled move.", But in my view, KataGo has a hard time finding the move of Black 9-11. With the default settings, you may not be able to find it even with a huge search. However, using the settings presented by michito744, KataGo can find Black 9-11 movements with fairly few searches. 無題

@michito744 No, not that, but I'd like to say why you were able to partially identify a very precise number with 13 decimal places. It takes a lot of time to try them in order, right?

michito744 commented 2 years ago

From the days when KataGo's version was g104, I just went through a lot of testing and fine-tuning to get to this point.

I really just spent a lot of time. (Some call it a waste of time.)

hope366 commented 2 years ago

I was guessing that it could be identified in a relatively short time by some special method, but instead you spent a lot of time customizing KataGo. We hope that will help KataGo to develop further.

HackYardo commented 2 years ago

@hope366 Did you try to play white to beat black(KataGo)? On my computer, in any case, black hold the superiority. So I don't know whether there are bugs or not...

hope366 commented 2 years ago

@HackYardo Black is probably a professional Go player, not KataGo. And White is a famous Japanese professional Go player. Black has an advantage, but this discussion isn't about which one is better, but whether KataGo can find great moves related to both ladders.

lightvector commented 2 years ago

Thanks @michito744 for posting the configs! I'm pretty sure that the extreme tuning of parameters to so many decimal places isn't actually doing anything - unless you've disabled multithreading, random symmetries, and various other sources of entropy, the randomness in the search is going to vastly dominates any possible effect that the parameters are going to have.

If you find that changing the 10th decimal place of some value has a meaningful effect and causes a problem to be solved, it is just luck and it would have had been the same likely to have been solved if you simply changed nothing and ran it again. Similarly, a few parameters that have been tuned have literally no effect - for example chosenMoveTemperatureEarly has zero effect on analysis.

However, I do notice your config has a lot of interesting settings that are very likely to have an effect, thanks for sharing! In particular, cpuctExplorationLog is set to a very high value, encouraging extremely much larger amounts of exploration in nodes higher up in the search tree that have been searched a lot, while cpuctExploration is set to a very low value, encouraging there to be almost no exploration for nodes that have relatively few visits. It make sense that this could help solving some blind-spot-like positions, but it might harm more general play. I would be very curious to know if anyone can identify and test if some similar values (probably not as extreme, but slightly in the same direction) could also improve the strength of general play or analysis.

michito744 commented 2 years ago

@lightvector

I think you're right.

KataGo's NN is far short of the highest level Go players, It can't find the best move without deep exploration with high noise and randomness. I think the settings are intended for that.

HackYardo commented 2 years ago

@hope366
Sorry I didn't make my point clearly, I wanted to say that if you assert that the AI made a mistake, you should catch the mistake and play better than the AI, just like Lee Se-dol did, otherwise it is not known whether the assertion is true or not.

hope366 commented 2 years ago

@HackYardo KataGo has discovered that black can succeed at least one of the two ladders (with special settings). However, with the default settings, KataGo recognizes that the bottom M-18 is the best move, not the ladder-related move, as the screenshot below shows. Do you need to prove yourself that ladder-related movements are better than M-18, without relying on KataGo? 無題

HackYardo commented 2 years ago

You can't build Rome with one brick, one position can't build a game. If you have a disagreement with another player, settle it in real play, not verbally. The same goes for an AI player. Do you agree with:

Usain Bolt says he and a cheetah have different views on speed, so the cheetah must be slower than him.

michito744 commented 2 years ago

@HackYardo

Optimal brickwork results in a double ladder as shown below. The best move can only emerge from a chain of moves, regardless of the NN statistics. image

hope366 commented 2 years ago

@HackYardo It's hard to prove perfectly. However, from my experience, I think the ladder tesuji is much more valuable than the lower Nidanbane.