It is currently Thu May 23, 2019 7:47 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
Offline
 Post subject: Alphago Zero pseudo code?
Post #1 Posted: Tue Feb 12, 2019 4:59 pm 
Beginner

Posts: 17
Liked others: 0
Was liked: 4
Is there a pseudo code for Alphago Zero or leela zero?
There is a diagram "Alphago Zero cheap sheet", but I need more details than this, and less details than the real program C codes of Leela Zero.

For this purpose, I traced the lz codes instruction by instruction, followed paticularly "'genmove", used to be missing somewhere in those recursive functions.

I wonder if there might be some people who had tried what I have tried and left pseudo codes. If there is no, then can you make one?

Top
 Profile  
 
Offline
 Post subject: Re: Alphago Zero pseudo code?
Post #2 Posted: Tue Feb 12, 2019 5:28 pm 
Lives in gote

Posts: 313
Liked others: 257
Was liked: 159
deungsan wrote:
Is there a pseudo code for Alphago Zero or leela zero?
There is a diagram "Alphago Zero cheap sheet", but I need more details than this, and less details than the real program C codes of Leela Zero.

For this purpose, I traced the lz codes instruction by instruction, followed paticularly "'genmove", used to be missing somewhere in those recursive functions.

I wonder if there might be some people who had tried what I have tried and left pseudo codes. If there is no, then can you make one?


It may be easier if you can tell what is your goal in looking at pseudo-code, are you trying to figure out something in particular, or is it just exploratory?

_________________
Sorin - 361points.com

Top
 Profile  
 
Offline
 Post subject: Re: Alphago Zero pseudo code?
Post #3 Posted: Tue Feb 12, 2019 6:08 pm 
Beginner

Posts: 17
Liked others: 0
Was liked: 4
sorin wrote:
It may be easier if you can tell what is your goal in looking at pseudo-code, are you trying to figure out something in particular, or is it just exploratory?


I like to replicate the whole process with my codes and see if there can be improvements or different ways of getting moves.

Top
 Profile  
 
Offline
 Post subject: Re: Alphago Zero pseudo code?
Post #4 Posted: Tue Feb 12, 2019 6:55 pm 
Lives in gote

Posts: 313
Liked others: 257
Was liked: 159
deungsan wrote:
sorin wrote:
It may be easier if you can tell what is your goal in looking at pseudo-code, are you trying to figure out something in particular, or is it just exploratory?


I like to replicate the whole process with my codes and see if there can be improvements or different ways of getting moves.


So you tried to read the LeelaZero code and got lost in the details? Maybe the Minigo code is easier to read, give it a try: https://github.com/tensorflow/minigo

You can see some of the latest Minigo models here: https://cloudygo.com/v16-19x19/eval-graphs and it seems to be around the same strength as LZ.

_________________
Sorin - 361points.com

Top
 Profile  
 
Offline
 Post subject: Re: Alphago Zero pseudo code?
Post #5 Posted: Tue Feb 12, 2019 8:18 pm 
Beginner

Posts: 17
Liked others: 0
Was liked: 4
I asked for a pseudo code for Alphago Zero, not for another program, besides I am not familiar with Python.

Top
 Profile  
 
Offline
 Post subject: Re: Alphago Zero pseudo code?
Post #6 Posted: Tue Feb 12, 2019 9:04 pm 
Lives in gote

Posts: 313
Liked others: 257
Was liked: 159
deungsan wrote:
I asked for a pseudo code for Alphago Zero, not for another program, besides I am not familiar with Python.


Minigo is a very accurate implementation of the AlpphaGo Zero algorithm, as described in the published DeepMind paper.

What programming language do you plan to use for your program?

_________________
Sorin - 361points.com

Top
 Profile  
 
Offline
 Post subject: Re: Alphago Zero pseudo code?
Post #7 Posted: Tue Feb 12, 2019 11:19 pm 
Beginner

Posts: 17
Liked others: 0
Was liked: 4
sorin wrote:
Minigo is a very accurate implementation of the AlpphaGo Zero algorithm, as described in the published DeepMind paper.

What programming language do you plan to use for your program?


I started this thread because I need a pseudo code. If Minigo is a accurate implementation of Alphago, then could you write down a pseudo code on the basis of Minigo? Unless otherwise you are wasting time and hijacking what this thread is meant to be.

Top
 Profile  
 
 Post subject: Re: Alphago Zero pseudo code?
Post #8 Posted: Wed Feb 13, 2019 1:53 am 
this is probably as good an explanation of the basics of Alpha Zero as you can find anywhere on the web. Note that it is chapter 4, so there are 3 chapters before it. i recommend asking any questions in the video maker's own site.

Top
  
 
Offline
 Post subject:
Post #9 Posted: Wed Feb 13, 2019 4:09 am 
Honinbo
User avatar

Posts: 8472
Location: Santa Barbara, CA
Liked others: 321
Was liked: 1947
GD Posts: 312
deungsan wrote:
I need more details
can you make one?
deungsan wrote:
I asked for a pseudo code for Alphago Zero
deungsan wrote:
I started this thread because I need a pseudo code. If Minigo is a accurate implementation of Alphago, then could you write down a pseudo code on the basis of Minigo? Unless otherwise you are wasting time and hijacking what this thread is meant to be.
No. Nobody is obligated to answer any of your questions. You come here asking for free advice, for your needs; you, you, you, you, you, without so much a single please or thank you to sorin who's trying to help you.

What preposterous sense of entitlement and ungratefulness.


This post by EdLee was liked by: Waylon
Top
 Profile  
 
Offline
 Post subject: Re: Alphago Zero pseudo code?
Post #10 Posted: Wed Feb 13, 2019 6:37 am 
Lives in gote
User avatar

Posts: 428
Liked others: 60
Was liked: 89
Rank: 4 Dan European
You may be interested in this book:
https://www.manning.com/books/deep-learning-and-the-game-of-go

It has Python code, and seems to be well explained from my brief perusal so far. (It uses the Keras library for the convolutional nets.) They have put all their code on GitHub as well, although my vague intention is to programme my own version.

Top
 Profile  
 
Offline
 Post subject: Re: Alphago Zero pseudo code?
Post #11 Posted: Wed Feb 13, 2019 9:58 am 
Lives in sente

Posts: 912
Liked others: 0
Was liked: 149
It is unclear what you need and what your limitations might be. So let me ask some questions.

You have been told that a description of the algorithm is available. Since I have not looked at that myself, I don't know in what way the algorithm is described. But at least confirm that you have looked at it. In other words, that you cannot convert the formal definition of the algorithm into what you would call pseudo-code.

In some ways I agree with your approach and disagree that you would find an implementation useful to look at. I might (probably could) reverse engineer from a python implementation (even without really knowing python!) but that's because I have LOTS of experience << things like turning the output of a disassembler into human readable assembler code to replace lost source code, etc.>>

The problem is that given the formal definition of an algorithm I would expect to be able to describe it in pseudo-code as that is a good way to proceed in writing an implementation << after retirement, bored, and choosing to learn c, I picked a direct (but finite) implementation of the 2nd Lemple-Zeve universal compression algorithm from the definition of the algorithm as my "case problem".

I would THINK if your objective is to write "a more efficient implementation" you need that skill (go from algorithm definition to your own pseudo-code). The reason is that a poor choice for something in the pseudo-code is at least as possible a source of inefficiency as poor coding of the implementation of a pseudo-code object/function. In my working days, my first "make code more efficient" coup (made the program run almost two orders of magnitude faster) was fixing a bad choice that had been made at a very high level of the process. In other words, the pseudo code was a "correct" but "inefficient" version of the process.

Michael

Top
 Profile  
 
Offline
 Post subject: Re: Alphago Zero pseudo code?
Post #12 Posted: Wed Feb 13, 2019 3:06 pm 
Beginner

Posts: 17
Liked others: 0
Was liked: 4
I found one!

https://github.com/edchengg/alphazero_l ... doCode.pdf

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group