Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WDL value head support #635

Merged
merged 10 commits into from
Feb 10, 2019
Merged

WDL value head support #635

merged 10 commits into from
Feb 10, 2019

Conversation

Ttl
Copy link
Member

@Ttl Ttl commented Dec 30, 2018

WDL head support for all backends. Includes just the backend support and doesn't do anything yet with the draw information.

Needs updated protobuf: LeelaChessZero/lczero-common#6

Training code for replacing the old value head with WDL in existing old type network: https://github.com/Ttl/lczero-training/tree/wdl_surgery

11248 with WDL value head: http://hforsten.com/leelaz/11248-wdl.pb.gz (Obsolete due to protobuf changes)

Score of lc0_11248_wdl vs lc0_11248: 15 - 5 - 45 [0.577]
Elo difference: 53.88 +/- 46.33, LOS: 98.73 %, DrawRatio: 69.2 %

TC: 10+0.5s on GTX 1050 Ti

@Ttl
Copy link
Member Author

Ttl commented Dec 30, 2018

Strength increase in testing is probably from the additional training on TB rescored test10 data instead of WDL head. I wouldn't expect it to be any stronger. All convolutional layers and policy head were set to non-trainable, so the only difference in this network is the fully connected layers of the value head.

Tests fail because protobuf needs to be updated.

@Ttl
Copy link
Member Author

Ttl commented Jan 28, 2019

Added the tree search part. Previous commit also includes parameter for adjusting the score of the draw, but I removed since it didn't gain any Elo in testing. Verbose-move-stats was modified to report WDL scores for testing purposes.

Also I added WDL head to a test30 net that is much better at evaluating draws than test10 net. It can be downloaded at: http://hforsten.com/leelaz/256x20-32585-wdl-4000.pb.gz (Obsolete due to protobuf changes)

<< ") ";

oss << "(U: " << std::setw(6) << std::setprecision(5) << edge.GetU(U_coeff)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verbose stats still needs to print U. (And Q+U is convenient.)

@TFiFiE
Copy link

TFiFiE commented Feb 2, 2019

This implements #79, right? Like I said there, it would then also be possible to shorten the average training game length by allowing draws by agreement.

@Tilps
Copy link
Contributor

Tilps commented Feb 2, 2019

Yes, but we can do that as a follow up PR.

@TFiFiE
Copy link

TFiFiE commented Feb 3, 2019

Previous commit also includes parameter for adjusting the score of the draw, but I removed since it didn't gain any Elo in testing.

But wouldn't the usefulness of that come from the ability to do stuff like force the engine to play for a draw or for a win or with some other contempt-like factor?

@Tilps
Copy link
Contributor

Tilps commented Feb 3, 2019

Previous commit also includes parameter for adjusting the score of the draw, but I removed since it didn't gain any Elo in testing.

But wouldn't the usefulness of that come from the ability to do stuff like force the engine to play for a draw or for a win or with some other contempt-like factor?

More work can be done on this aspect after the PR is submitted.

@Ttl
Copy link
Member Author

Ttl commented Feb 4, 2019

Needs modifications for protobuf changes in: LeelaChessZero/lczero-common#8

@Ttl Ttl closed this Feb 4, 2019
@borg323 borg323 reopened this Feb 4, 2019
@borg323 borg323 added the wip Work in progress label Feb 4, 2019
@TFiFiE
Copy link

TFiFiE commented Feb 4, 2019

Maybe change https://github.com/orgs/LeelaChessZero/projects/1#card-10518034 to point to this instead?

@Ttl
Copy link
Member Author

Ttl commented Feb 10, 2019

Merged with master and implemented the protobuf changes.

Test network with WDL value head and convolutional policy head: http://hforsten.com/leelaz/128x10-az-pol-map-wdl-200000.pb.gz

@Ttl Ttl removed the wip Work in progress label Feb 10, 2019
src/mcts/node.h Outdated Show resolved Hide resolved
src/neural/network_random.cc Outdated Show resolved Hide resolved
@Tilps Tilps merged commit 39b85ec into LeelaChessZero:master Feb 10, 2019
@borg323
Copy link
Member

borg323 commented Feb 10, 2019

Just tested that 32 bit builds work.

@lp200
Copy link

lp200 commented Feb 10, 2019

iirc, currently move_count is disabled
when it enable, will not it help to judge the draw more accurately?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants