Live data from Hacker News

Fast implementation of DeepMind's AlphaZero algorithm in Julia

github.com

21–30 of 73 posts

Re: Fast implementation of DeepMind's AlphaZero algorithm in Julia

#21
Does anybody know how long it would take to train an alphazero go version using one gpu? In [1] they claim that it took 13 hours until the model was able to beat the original alphago version, but they don't state what hardware they used.

[1] https://deepmind.com/blog/article/alphazero-shedding-new-lig...

Re: Fast implementation of DeepMind's AlphaZero algorithm in Julia

#22

Author here: I am happy to answer any question you may have about AlphaZero.jl. :-)

Hi, thanks for this great project.

Connect Four was used as a demonstration. I presume this is because it's much easier/cheaper to train a Connect Four AI, compared to Go?

Re: Fast implementation of DeepMind's AlphaZero algorithm in Julia

#23

Does anybody know how long it would take to train an alphazero go version using one gpu? In [1] they claim that it took 13 hours until the model was able to beat the original alphago version, but they don't state what hardware they used. [1] https://deepmind.com/blog/article/alphazero-shedding-new-lig...

I can’t find it now but iirc there was a blog post on HN about a month ago that estimated their training costs at $25 million, using many TPU pods.

Re: Fast implementation of DeepMind's AlphaZero algorithm in Julia

#24
post #3

I don't know anything about Julia...how hard would this be to port to python or a c-style language? Edit: I was mainly asking because I was curious about the relative expressiveness Julia...

I was going through this project over the weekend. And while I can't recall where exactly in the docs I read this, I am quite sure the author mentioned that there are various python projects but they are quite slow. Other implementations such as leela chess zero have a lot of C++ and are difficult to follow. In fact, one of the things we want to do is maximize the performance of the Julia implementation. We hope to c…

Truly truly thank you for your work <3

Re: Fast implementation of DeepMind's AlphaZero algorithm in Julia

#25

Does anybody know how long it would take to train an alphazero go version using one gpu? In [1] they claim that it took 13 hours until the model was able to beat the original alphago version, but they don't state what hardware they used. [1] https://deepmind.com/blog/article/alphazero-shedding-new-lig...

From an offline chat with the original author,

The ELF OpenGo paper[1], which is an open implementation of AlphaGo Zero developed by Facebook AI:

"First, we train a superhuman model for ELF OpenGo. Af-ter running our AlphaZero-style training software on 2,000GPUs for 9 days, our 20-block model has achieved super-human performance that is arguably comparable to the 20-block models described in Silver et al. (2017) and Silveret al. (2018)."

[1]: https://arxiv.org/pdf/1902.04522.pdf

Re: Fast implementation of DeepMind's AlphaZero algorithm in Julia

#26

I've been working on a Python implementation that uses Gradient Boosted Decision Trees (LightGBM/Treelite) instead of using a neural network for the value/policy models: https://github.com/cgreer/alpha-zero-boosted It's mostly to understand how AlphaZero&Friends work. I'm also curious about how well a GBDT could do, and if there are self-play techniques that can accelerate training. The nice thing about a GBDT is tha…

This is really interesting, thanks for sharing! I've been thinking about extensions to decision tree models that could get the benefits of NNs and it seems like there are a few ideas floating around. For example; Probabilistic Random Forests have some really interesting properties for noisy datasets, e.g. "The PRF accuracy decreased by less then 5% for a dataset with as many as 45% misclassified objects, compared to…

There appears to be a LogitBoost tree that does what you say, if I understand you correctly.

[1] https://en.wikipedia.org/wiki/LogitBoost

Re: Fast implementation of DeepMind's AlphaZero algorithm in Julia

#28

Earlier quoted context omitted.

I was going through this project over the weekend. And while I can't recall where exactly in the docs I read this, I am quite sure the author mentioned that there are various python projects but they are quite slow. Other implementations such as leela chess zero have a lot of C++ and are difficult to follow. In fact, one of the things we want to do is maximize the performance of the Julia implementation. We hope to c…

Truly truly thank you for your work <3

Not sure you are thanking jonath_laurent (original author of package of discussion) or ViralBShah (co-creator of Julia). But I concur on both accounts :D

Re: Fast implementation of DeepMind's AlphaZero algorithm in Julia

#29
post #10

First of all this is very cool. Dunno if author is on here, but I’m curious why both Flux and Knet are used rather than just one of them (Flux seems the most Julianic?). Also, is this really faster than PyTorch/TF? Last time I benchmarked Flux for non-trivial networks, the speed was quite good with small models but memory usage was ~5x higher than pytorch, and I couldn’t fit my models on the GPU for flux. For large m…

> 5x higher than pytorch, and I couldn’t fit my models on the GPU for flux. For large models, I had to compromise on batch size in Julia

I had the exact same experience. While I like Julia and Flux I can't use it in this state for my models.

Re: Fast implementation of DeepMind's AlphaZero algorithm in Julia

#30
post #14

The implementation includes Connect Four as an example application. While the standard board size of 7x6 is indeed solved, as they note, and in fact all sizes up to 8x8 are [1], they could have picked 9x8 or 9x9 which are currently unsolved. The latter is the new standard size on Little Golem which upgraded from 8x8 when that was solved. [1] https://tromp.github.io/c4/c4.html [2] http://www.littlegolem.net/jsp/games/…

I completely agree with you. Let me just add two remarks. First, although picking 9x9 boards makes connect-four intractable for bruteforce search indeed, I would be suprised if it made it much more difficult for AlphaZero, which relies on the generalization capabilities of the network anyway. Second, using a solved game for the tutorial is a feature, not a bug. This allows precise benchmarking of the resulting agent…

I did not see an evaluation of how close to perfection the agent becomes. Did you compute any sort of error rate (by finding moves that turn a won position into a non-won one or a drawn position into a lost one) ? And how this error rate drops over time as learning advances? That would indeed be very interesting to see.
Post reply on HN