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

Action representation used by AlphaZero in Chess #720

Open
Vovak1919 opened this issue Feb 26, 2020 · 2 comments
Open

Action representation used by AlphaZero in Chess #720

Vovak1919 opened this issue Feb 26, 2020 · 2 comments

Comments

@Vovak1919
Copy link

Ok, I downloaded the source code of Leela Zero 0.17. Tell me, someone, in which file is the code that is described by this fragment of the article "Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm", p.13:

A move in chess may be described in two parts: selecting the piece to move, and then selecting among the legal moves for that piece. We represent the policy pi(a|s) by a 8x8x73 stack of planes encoding a probability distribution over 4,672 possible moves. Each of the 8x8 positions identifies the square from which to “pick up” a piece. The first 56 planes encode possible ‘queen moves’ for any piece: a number of squares [1::7] in which the piece will be moved, along one of eight relative compass directions fN;NE;E; SE; S; SW;W;NWg. The next 8 planes encode possible knight moves for that piece. The final 9 planes encode possible underpromotions for pawn moves or captures in two possible diagonals, to knight, bishop or rook respectively. Other pawn moves or captures from the seventh rank are promoted to a queen.

Chess
Feature Planes
Queen moves 56
Knight moves 8
Underpromotions 9
Total 73
Table S2: Action representation used by AlphaZero in Chess and Shogi respectively. The policy is represented by a stack of planes encoding a probability distribution over legal moves; planes correspond to the entries in the table.

@brianprichardson
Copy link

This repo has been superseded per the note on the main page. Suggest going here and looking at the current Github and asking questions in the #help channel of the Discord (see bottom of page).
http://lczero.org/

@Dboingue
Copy link

Dboingue commented Mar 22, 2020

@Vovak1919 Are you member of the lc0 google group as well?
If you find answers to your questions, I would be interested to know.

https://github.com/Dboingue/Lc0.Documentation.Workshop (you could link some of your issues there. or just send me some links, as we are trying to establish inventory of links as our first task. You are welcome to participate at any degree.

We are trying to complement the existing documentation, on topics possibly similar to yours. We would be interested in your findings, past and future, what helped you figure out answers, as possible pointers in our documentation research effort, and potential contribution to lc0 official documentation.

Things such as pointers to discussions where you got answers to similar questions in the timeline between alpha-zero-chess and recent leelas. Pointers from your questions on Discord, and pointers from similar threads in the lc0 google group forum.

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

No branches or pull requests

3 participants