how to bot Hex, Havannah

16 replies. Last post: 2020-02-07

Reply to this topic Return to forum

how to bot
  • Tom Ace ★ at 2019-10-17

    If no one else wants to offer bots for download, how hard is it to set one up?  I have some spare time.

    Can anyone say where the bots we see playing here got their code from?  Is there more than one flavor?  I downloaded code from

    but I am new to Python and don’t have all the required libraries on hand.  To gear up to run this might be a bit of work, which is OK but it would be nice to know if this is the right starting point or if other code is preferable.

    If I get a bot running I would be happy to offer it for others to download.

    Or would any of the people running bots here be kind enough to offer downloads (hint, hint).

  • Arek Kulczycki at 2019-10-17

    I do not have any spare time but if by any chance I will have, then I would like to help. I would like to learn some machine learning and generally Im a python backend developer so maybe Im able to at least understand some of the existing code ;)

  • Arek Kulczycki at 2019-10-17

    Tomorrow I download the code and have a look

  • gzero_bot at 2019-10-18

    Just wanted to point out that gzero has been available to “download” since the first line of code was written.  It is a GGP bot, not a hex bot however, and it isn’t exactly double click and away you go.


    and for models:

    all trained models for other games can be found in the gzero_data repo also.

    If anyone wants the training data so they can continue where I left off, I can give you access via ssh/scp.

  • gzero_bot at 2019-10-18

    I was thinking if 15x15 comes to fruition here on LG, perhaps anyone here would like to be part of a collaborative effort for a new bot?  I am thinking 95% pure python, minimal dependencies and  keeping things as simple as possible.

  • Arek Kulczycki at 2019-10-18

    So I managed to run the script that TomAce has linked. It has some ugly hard-coded constants which I corrected, but it doesn’t have a requirements file so I’m not sure if I use proper libraries' versions.  Generally it runs, but the problem is that it takes up all my memory and dies.

    Does anybody have an experience in how to manage tensorflow 2.0 memory usage?

  • lguser at 2019-10-18

    downloading gzero bot seems like the best choice because it has already been trained

  • Arek Kulczycki at 2019-11-14

    @Tom Ace

    have you had any attempts with the code finally?

    I found that the script could be optimized to go significantly faster with just the code optimization. Also the huge RAM consumption is avoidable. I would maybe find time to do all that, but I hate to be stuck at the configuration level and I failed a couple attempts to have tensorflow use my GPU.

    If there are people who have configured GPU and tensorflow in the past I will appreciate all advice. I’m using nvidia gtx 850m and linux mint.

  • vasheus at 2019-12-11


    you wrote some time ago in readme: How to run and install instruction coming soon!  Will you keep your promise? ;)

  • gzero_bot at 2019-12-12

    haha – I’ll keep my promise, maybe for xmas! 

  • gzero_bot at 2019-12-20

    As it stands the gzero code (galvanise_zero) is extremely fiddly, and is based on the now very inactive Stanford General Game Playing project and ggp-base java library.  Not to mention it is using python 2, and a very old version of TensorFlow.

    So I decided to start afresh with a new project, with the goal of training hex 11x11 using Deepmind’s MuZero method.  I’ll use most of what I learned with gzero, so other game types will be easy to add.

    However, not sure I will have much time over the holidays to work on it, but can follow here if you like

    Send it some love, and I might actually keep promises and document it this time. ;)

  • Tom Ace ★ at 2019-12-20

    Arek Kulczycki:  I missed seeing your question when you posted it on November 14.  Sorry about that.

    I haven’t attempted anything with the code yet.  Other things have keeping me busy, unfortunately.

  • Carroll ★ at 2019-12-20

    @gzero_bot, I send you some love <3

    And thx for the links about extraordinary MuZero project.

    How To Build Your Own MuZero AI Using Python

  • vasheus at 2019-12-22

    @gzero_bot wonderful news!

  • Andrey at 2019-12-23

    Will be interesing to see the perfomance and play of new bot project. However first love the most deep love. gzero in mu heart :-))

  • kspttw at 2020-02-07

    Do you know where I can donwload source code for leela bot?

Return to forum

Reply to this topic

Include game board: [game;id:123456] or [game;id:123456;move:20] or [game;id:123456;move:20;title:some text]