Giraffe dissertation, and now open source

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
matthewlai
Posts: 791
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

Re: Giraffe dissertation, and now open source

Post by matthewlai » Tue Sep 08, 2015 6:52 pm

cdani wrote:Congratulations for your work and thanks for it!!
Thanks! :D
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.

matthewlai
Posts: 791
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

Re: Giraffe dissertation, and now open source

Post by matthewlai » Tue Sep 08, 2015 6:52 pm

JoshPettus wrote:Huge congratulations Matthew! :) And Thank-you so much for making it open source.

The windows 64bit version is a little tricky for me in wine (it's very limited right now), so I made an OSX compile. should be good for OSX 10.6 or newer.
https://dl.dropboxusercontent.com/u/504 ... iraffe.zip
Awesome! Is that with homebrew/MacPorts GCC? Did you have to change anything? I have been doing most of my testing with homebrew GCC 4.9.

Also, feel free to include eval.net and meval.net from the binary distribution as well. Without them Giraffe will use very weak built-in functions.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.

JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 12:23 am

Re: Giraffe dissertation, and now open source

Post by JoshPettus » Tue Sep 08, 2015 6:58 pm

macports gcc 4.9 with --static-libgcc and -mmacosx-version-min=10.6

I still had some trouble though. the assembler wanted clang in the same folder as gcc, so I made a softlink (not sure why to be honest). The linker couldn't find -ltcmalloc. I tried it without it, and seems to work.

I added both files

matthewlai
Posts: 791
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

Re: Giraffe dissertation, and now open source

Post by matthewlai » Tue Sep 08, 2015 7:03 pm

JoshPettus wrote:macports gcc 4.9 with --static-libgcc and -mmacosx-version-min=10.6

I still had some trouble though. the assembler wanted clang in the same folder as gcc, so I made a softlink (not sure why to be honest). It couldn't find -ltcmalloc. I tried it without it, and seems to work.
Ah! Good catch. I will mention it in the readme.

libtcmalloc is optional. It replaces malloc/free with another implementation with thread-local caching. It speeds up training on 10+ cores, but doesn't really matter for playing.

OSX's GNU as is a pain. It doesn't have AVX instructions. That's why there's "-Wa,-q" in the Makefile. Maybe it has something to do with that?

Also, the current Makefile includes "-march=native". If you want it to run on older CPUs, you'll probably want to change that.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.

User avatar
Bloodbane
Posts: 154
Joined: Thu Oct 03, 2013 2:17 pm

Re: Giraffe dissertation, and now open source

Post by Bloodbane » Tue Sep 08, 2015 8:46 pm

Now I just look stupid when I was worrying about the amount of mathematics :lol:.
Functional programming combines the flexibility and power of abstract mathematics with the intuitive clarity of abstract mathematics.
https://github.com/mAarnos

matthewlai
Posts: 791
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

Re: Giraffe dissertation, and now open source

Post by matthewlai » Tue Sep 08, 2015 8:49 pm

Bloodbane wrote:Now I just look stupid when I was worrying about the amount of mathematics :lol:.
:D

There is actually quite a bit of math in Giraffe, but I didn't write about it in the thesis because that's just standard neural network stuff mostly.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.

JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 12:23 am

Re: Giraffe dissertation, and now open source

Post by JoshPettus » Tue Sep 08, 2015 9:01 pm

OSX's GNU is non existent :) it's actually a symlink to clang. Unfortunately clang doesn't like OpenMP and is completely missing the omp header. On google I found a project to implement it, but it's not in the main branch yet.

matthewlai
Posts: 791
Joined: Sun Aug 03, 2014 2:48 am
Location: London, UK
Contact:

Re: Giraffe dissertation, and now open source

Post by matthewlai » Tue Sep 08, 2015 9:07 pm

JoshPettus wrote:OSX's GNU is non existent :) it's actually a symlink to clang. Unfortunately clang doesn't like OpenMP and is completely missing the omp header. On google I found a project to implement it, but it's not in the main branch yet.
/usr/bin/as is GNU as. See "as -v". It's just a very old version. Though it may actually be a good idea to replace it with a script that calls clang.

Oh yeah I forgot Clang doesn't have OpenMP. That's unfortunate. Though OpenMP is designed for the code to still be correct if all the OMP pragmas are ignored. You would have to comment out the omp include though, if it's completely missing. The search is serial anyways, and when I parallelize it it probably won't be using OpenMP. OpenMP is only used to parallelize training.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.

JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 12:23 am

Re: Giraffe dissertation, and now open source

Post by JoshPettus » Tue Sep 08, 2015 9:12 pm

Ah, you're right! forgot about the assembler. Regarding Omp, That said it's not hard to install gcc49 on macports.

Robert Pope
Posts: 508
Joined: Sat Mar 25, 2006 7:27 pm

Re: Giraffe dissertation, and now open source

Post by Robert Pope » Tue Sep 08, 2015 9:35 pm

When you talk about having the correct distribution of positions for training, is that really a necessary condition? Or is it simply to avoid wasting time learning to handle things that won't likely occur?

Post Reply