Search found 33 matches

by rtitle
Sun Oct 06, 2013 5:31 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: help for a linux develop environment
Replies: 23
Views: 3108

Re: help for a linux develop environment

On Linux, if developing C++ code (which I do for my day job), I use vi for editing, gcc for compiling, and gdb for debugging. Old-fashioned, but it works for me. It's possible to use Eclipse for C++ development if you prefer an IDE with a graphical interface. My chess engine (strictly a spare-time p...
by rtitle
Thu Oct 03, 2013 11:12 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: interesting SMP bug
Replies: 23
Views: 5126

Re: interesting SMP bug

For this reason, I manage to squeeze my TT entries into 8 bytes as follows: - The 64-bit hash is divided into a 31-bit hash index (2 billion TT entries - I have a machine with > 16G memory) and 32 of the remaining 33 bits go into the TT entry itself to detect hash collisions. - The "best move" (reco...
by rtitle
Thu Oct 03, 2013 8:20 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: interesting SMP bug
Replies: 23
Views: 5126

Re: interesting SMP bug

If you're coding in C++ and you want atomic reads/writes of any primitive type from 1 byte to 8 bytes, you can and in fact *must* use the std::atomic< > template. For example: std::atomic<unsigned char> uc; // declare 1 byte that is read & written atomically std::atomic<long long> ll; // declare 8 b...
by rtitle
Tue Oct 01, 2013 7:07 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Porting/Programming for OS X and Darwin.
Replies: 10
Views: 1304

Re: Porting/Programming for OS X and Darwin.

You can obtain gcc for the Mac, but it's correct that clang (based on LLVM) is what Apple provides and supports as its default C/C++ compiler (also ObjectiveC, but your chess engine is probably not written in that language). Also, Apple's XCode development environment is nice. It uses clang as its c...
by rtitle
Tue Oct 01, 2013 10:54 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Porting/Programming for OS X and Darwin.
Replies: 10
Views: 1304

Re: Porting/Programming for OS X and Darwin.

In the engine I am developing, the only OS-dependent code is the multithreading support. My engine started out Windows-only, and on Windows it uses CreateThread to start a thread for analysis of a sub-tree and WaitForMultipleObjects to wait for a child thread to complete its sub-tree search. When I ...
by rtitle
Sat Sep 28, 2013 12:11 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: interesting SMP bug
Replies: 23
Views: 5126

Re: interesting SMP bug

Thanks for the links to those 2 papers. The Hyatt & Cozzie paper concludes that occasional wrong answer due to hash collisions is tolerable (and does experiments to show that). That matches my own intuition. TT hash collisions can happen even in a single-threaded implementation. You can detect some ...
by rtitle
Fri Sep 27, 2013 11:09 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: interesting SMP bug
Replies: 23
Views: 5126

Re: interesting SMP bug

There is a broader question related to this that I've been wondering about as I write my (multithreaded) chess engine: (1) What needs to be per-thread, what needs to be global?, and (2) For that which needs to be global, how does one protect it? For (1), obviously the position being searched needs t...
by rtitle
Wed Sep 25, 2013 5:44 pm
Forum: Computer Chess Club: General Topics
Topic: Big new ideas in chess programming
Replies: 57
Views: 15809

Re: Big new ideas in chess programming

re: "Sorry, I meant Monte-Carlo based approaches, like those used in Go." Thanks for the clarification. I don't know much about Monte-Carlo approaches, or about Go engines, so I can't comment in detail. Generally I don't like randomness though. I don't even like transposition tables in chess engines...
by rtitle
Wed Sep 25, 2013 11:06 am
Forum: Computer Chess Club: General Topics
Topic: Big new ideas in chess programming
Replies: 57
Views: 15809

Re: Big new ideas in chess programming

OK. I will concede the point on open source and apologize for derailing the discussion in that direction. I still have an intuition that the current "standard approach" for building chess engines is not the end of the line. I'd define the "standard approach" as: - Iterative deepening minimax search ...
by rtitle
Tue Sep 24, 2013 4:56 pm
Forum: Computer Chess Club: General Topics
Topic: Big new ideas in chess programming
Replies: 57
Views: 15809

Re: Big new ideas in chess programming

OK. I will concede the point that open source in and of itself does not guarantee success. There are examples of unsuccessful open source projects. You gave a good one: gnuchess was never a top program. However, I still claim open source is in general a superior development model. Look at some succe...