Code Monkey home page Code Monkey logo

Comments (22)

Vandertic avatar Vandertic commented on August 21, 2024 2

I implemented this already: https://github.com/Nazgand/leela-zero/blob/fc9f3c8887463add076170f6972fd07677beb8f9/src/UCTSearch.cpp
The myprintf("Passing loses or ties; I'll play on.\n");' part was ignored when people implemented integer komi and draws in a similar way', rather than merging my code.
For my information, what was wrong with my code?

My fault. We had already implemented integer komi when you wrote your implementation and moreover, although "panda" winner is a very cute idea, it was considered easier to implement server-side, if the draws were sent as winner: "white", score: 0. In this way no change at all was needed on the server. This is why we didn't merge. So I checked your code by hand and missed that part.

I must also confess that I am no serious programmer, and all this distributed coding facilities are quite new to me, hence I think I am not dealing with your contribution in a professional way. Sorry about that.

As written elsewhere, we have a private gitlab server where most of the development goes on and where I can do my embarrassing experiments, and then we sync with this repo from time to time.

Nevertheless now the code here and at our gitlab is nearly the same. Just very minor optimizations here and there.

We are really grateful for all help and attentions and I will try hard to get better at dealing with them.

from sai.

Vandertic avatar Vandertic commented on August 21, 2024 1

Thank you @Nazgand. Here are some nets for your tests:

867eb63f
90007989
e1b777b8
d018458e
bdf263ff

Notice that we too have been working a lot on the code in the last weeks, and we are going to publish the results very soon. We have symmetries management, advanced board features (will explain...) and japanese score mode (almost done).

from sai.

hzyhhzy avatar hzyhhzy commented on August 21, 2024 1

Oh sorry.
https://drive.google.com/open?id=1Ot3mdvInRHNkI6Ai0asTkX4h6DpjxHjB

from sai.

Vandertic avatar Vandertic commented on August 21, 2024 1

What you suggest could be a little unstable if the estimate of score is not very precise (and this happens sometimes even if the sigmoid is steep), but you are basically right. I will try to improve pass management (both in tree construction and move choice) in the next days.

from sai.

Vandertic avatar Vandertic commented on August 21, 2024 1

I am afraid it took me a couple of months, but I think I found a nice way to deal with pass in tree search. I have not corrected the code you cited, because I am focused on playing with '-d' flag, in which case that part of code is not used. Anyway, I notice now that it was an old code. LZ has draws management now and the code was already corrected. Thank you anyway.

from sai.

Nazgand avatar Nazgand commented on August 21, 2024

I think I implemented this correctly for the engine and autogtp at https://github.com/Nazgand/leela-zero/tree/sai-0.15-scored-games .

I request a sample 7x7 network so I can test my code.

When a game is a tie, the score is 0. When autogtp detects a tie, it says `panda' is the winner.
All games have " : " and black's win-rate appended to the game result which is reported to the server. 1.000 for Black winning, 0.000 for White winning, 0.500 for tie games, and other values when the game ends early based on the networks having similar estimates for the score.
E.g. a game that ends early might have "W+0.130 : 0.474" as a result.

The server can change what counts as `settled enough to end the game early' in the work orders.

from sai.

Vandertic avatar Vandertic commented on August 21, 2024

We implemented integer komi and draws in a similar way as your propose, and we are now testing with a new run.
Our approach is somewhat lighter though. Can you elaborate on why you had to introduce score estimation as an autogtp method and upload that information to the server?

from sai.

Nazgand avatar Nazgand commented on August 21, 2024

I figured that the reason autogtp uploaded the result of who won was probably to give a target win_percent to the neural net trainer, which should be 0.5 for tie games and arbitrary for games that end early.

Score estimate commands are certainly required because I know humans will be interested. Standard deviation is commonly used by statisticians. The reason I had 2 score commands was to make parsing easy and did not add a win_percent command because that could be deduced from the other 2 commands. I suppose a single command that gives results like mean=0.000, standard_deviation=4.321, win_percent=0.500 (EDIT: or JSON) would be nicer and easy to parse.

from sai.

alreadydone avatar alreadydone commented on August 21, 2024

LZ's draw handling leela-zero#1577 includes some modifications of UCTSearch.cpp which may result better play (e.g. choosing when to pass) in actual matches (in non-dumbpass mode). This seems not to have been merged into SAI (cf. 212ff2c). This is a Sai9 vs Kishin game that Sai9 should have won.

from sai.

Vandertic avatar Vandertic commented on August 21, 2024

I don't see a similar modification in the LZ present code and cannot open the link with that old version of UCTSearch.cpp and so I don't understand what the proposed modification is.

But that game makes me upset. Could you maybe give me the weights of 16b-028a and tell me what command line options were used?

from sai.

sbf2000 avatar sbf2000 commented on August 21, 2024

16b-028a weight: http://www.sai9.club:18080/networks/028abef5ee0c75ceb270a6aba70842c50bc50491d89864c130f93053c4414350.gz
Command line options: -r 1 -t 6 -g --noponder --lambda 0.0 --symm -w

from sai.

Nazgand avatar Nazgand commented on August 21, 2024

I implemented this already: https://github.com/Nazgand/leela-zero/blob/fc9f3c8887463add076170f6972fd07677beb8f9/src/UCTSearch.cpp
The `myprintf("Passing loses or ties; I'll play on.\n");' part was ignored when people `implemented integer komi and draws in a similar way', rather than merging my code.
For my information, what was wrong with my code?

from sai.

Vandertic avatar Vandertic commented on August 21, 2024

I confirm the bug. The commit by @Nazgand is ok, apart for a minor change.
I would suggest anyway to always use the flag -d and let the net choose when to pass. It would not have lost if the flag -d was used there. (I checked, and it correctly plays A6, (pass), C4.

from sai.

alreadydone avatar alreadydone commented on August 21, 2024

Sorry, better view here https://github.com/gcp/leela-zero/pull/1577/files#diff-70aab7683fe64f9428b8bc47d1d183c0 (LZ's modification, deleted last comment)

from sai.

Vandertic avatar Vandertic commented on August 21, 2024

@sbf2000, since you were so kind as to give the link of your server, I took the liberty to download two of your recent nets, b8da2b7b and 1ce37548 to test our project progression. We use no gating and it is somewhat difficult to say if there is real improvement from one net to the next one, and this is why we are still perfecting 6x128, while you are at 16x224 I see. Nevertheless I think it is interesting and important that our bc46bd4b now is almost on par with 1ce3 and loses just 2:1 against b8da.
We will be switching to 8x160 in a few days.
BTW: we train at -v850 with --lambda 0.1 with 1/3 of games that are in fact branches and we match at -v250 with --lambda 0.

from sai.

sbf2000 avatar sbf2000 commented on August 21, 2024

@Vandertic ,Here is my test for bc46bd4b and cd2c11a0.
I trained with v50 and tested with v400. Now I try --lambda 0.5, it turns out to be --lambda 0, but it is difficult to continue to go up with bottlenecks.
Now add parameters with your other options settings: --nrsymm --adv_features --blunderthr 0.2 --randomtemp 0.7 --policy_temp 1.50

from sai.

hzyhhzy avatar hzyhhzy commented on August 21, 2024

https://drive.google.com/open?id=1mB0_1XbNY1KjMSSw0H1imBneduGzuDqB
(Update)My latest LZ9 weight.(lz9_135,About 3.8M games,16b224f)
https://drive.google.com/open?id=1Ot3mdvInRHNkI6Ai0asTkX4h6DpjxHjB
Some lz9 weights from 0 to 120.

from sai.

Vandertic avatar Vandertic commented on August 21, 2024

@sbf2000 the options --adv_features --blunderthr 0.2 --randomtemp 0.7 --policy_temp 1.50 should be used for self-play only.

I am doing tests myself with both @hzyhhzy 's 121 and your cd2c.

Edit: 3:2 for cd2c and 7:3 for LZ121.

from sai.

Vandertic avatar Vandertic commented on August 21, 2024

@hzyhhzy both your Google Drive's link point only to weight 121.

from sai.

alreadydone avatar alreadydone commented on August 21, 2024

Drawn games don't participate in training (discovered by @sbf2000):
https://github.com/sai-dev/sai/blob/4c1422a9e2b453f41470f50dfe57fa8c12cd157f/training/tf/chunkparser.py#L234-L235
I don't think this is intended, or is it?

from sai.

Vandertic avatar Vandertic commented on August 21, 2024

No, it is not. Thank you.

from sai.

Nazgand avatar Nazgand commented on August 21, 2024

myprintf("Passing loses or ties; I'll play on.\n"); could cause some problems with tied games lasting forever (or until a blunder is made).

A better way to end games in non-dumbpass-mode is to play until playing longer probably would not improve the score.

If the slope of the sigmoidal function is steep enough to show high certainty of the score, SAI should compare [the score-estimate after SAI passes] to [the current score-estimate before SAI moves]. Prefer passing if the score-estimates are the same (or passing is better).

from sai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.