sje wrote:Some changes I could make to CookieCat:
1) Change the
mtperft (multi-threaded perft) command to use transposition assistance for a big speed increase.
2) Change the transposition table to use an additional 64 bits of hash code for safety and a slight slowdown.
3) Add a command line argument cracker to activate a multi-threaded perft operation without a need for a console interface.
4) For a command line perft, have the program output only a single line which contains the ASCII decimal result count.
Any other support needed for a distributed perft client can be done by separate wrapper software.
A manual invocation example:
Code: Select all
./CookieCat -dp "r1bqkbnr/1ppp1ppp/p1n5/4p3/B3P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 1 4" 7
22668836317
Do the above some 90+ million times with different ply 7 FEN strings, apply some multiplication and addition, and presto! you get perft(14).
Here is what I have in mind - very similar to what you describe:
1. A server that parcels out work from the 9,417,683 unique 6 ply positions.
2. Clients that get this assignment and return the perft(8) answer to the server.
I considered using 7 ply positions instead - but that would require sending out almost 100 million work assignments - and I fear we lose some efficiency because perft(7) goes much faster - perhaps making this more I/O bound. So 6 has the effect of taking pressure off the server and constantly opening and closing connections.
I did some analysis and perft(8) based on the komodo implementation takes about 90 seconds in the opening, but could take a couple of hours in a complex position. I have only sampled a few positions. That seems like a reasonable chunk of work to parcel out to the clients. Also, 9 mlliion positions is easier to work with than 90 million and most hosting companies are stingy about bandwidth and disk space. If I put these positions in a sql database it's going to use a lot of disk space, just a raw text file with the fen's for the 9 million positions is about half a gig - not a lot but 90 million would already be several gig.
So all things considered I believe the 6 ply positions are the easiest to work with and the least resource intensive for the server.
Using the 90 million positions has some advantages too. The clients would be getting much smaller work packets (assignments that can be completed in seconds), and users running the clients could stop their clients without losing work. With this we would not need to consider having a restart mechanism. With the 9 million ply 6 positions we might want to consider giving the client the ability to stop and restart some other time - taking up where it left off. I don't want to do that as it complicates the programming, but it may be enough to "fwrite" the hash table to disk and restart from scratch as a simple restart mechanism.
The mechanism the server will use is to assign one of the N positions at random when a client makes a request for help. We won't track what has been assigned when making assignments, but we will track what has been completed. In other words when a client gets a work assignment we won't assume that it will complete. My experience with the DAT (Distributed Auto Tester) reveals that there are many stops and starts and trying to track what has been assigned under the assumption it will complete is huge amount of work requiring a lot of guesswork (how long to wait, etc.) In the end it's work for almost no gain.
The client will be graphical and run on windows or inux and will report in real time the progress. It will basically show the progress in terms of percentage of work to complete, project completion date based on current load and other statistics including the progress of the current test being run by the client.
I would like the perft engines to be modular, if someone produces some super fast client we should be able to just start using it. I don't want to complicate things, but the perft engine should be reported and tracked by the server - just in case it's determined that one is buggy. What I had planned is sending out each work assignment twice, and I would want to ensure that each one goes to a different perft client.
This is going to require huge CPU resources - I don't know if we can keep people interested for a year or two - however long it takes. If we get enough volunteers it should not take more than a few months - but it remains to be seen ....
Steven, please send me an email - if you are willing I need to pick your brain and get your help since you have already done this. I could have this up and running in a few minutes as I already have a client and server setup from the DAT project but it needs to be done right before it's started. My email is
dailey.don@gmail.com - it's in my profile.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.