Page 2 of 4

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 8:52 pm
by matthewlai
cdani wrote:Congratulations for your work and thanks for it!!
Thanks! :D

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 8:52 pm
by matthewlai
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.

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 8:58 pm
by JoshPettus
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

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 9:03 pm
by matthewlai
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.

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 10:46 pm
by Bloodbane
Now I just look stupid when I was worrying about the amount of mathematics :lol:.

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 10:49 pm
by matthewlai
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.

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 11:01 pm
by JoshPettus
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.

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 11:07 pm
by matthewlai
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.

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 11:12 pm
by JoshPettus
Ah, you're right! forgot about the assembler. Regarding Omp, That said it's not hard to install gcc49 on macports.

Re: Giraffe dissertation, and now open source

Posted: Tue Sep 08, 2015 11:35 pm
by Robert Pope
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?