Large tablebases
Posted: Thu Apr 21, 2011 7:35 am
It seems that 7-piece tablebases are being discussed again. I forget whether I mentioned it specifically before, but it seems to me that these can be built in about 1-2 years on a 32/48-core machine with 256GB of RAM (and still a non-negligible portion of the time will be disk I/O). With a bit more work, perhaps 128GB of RAM would suffice. With 512GB/1TB of RAM, the method could be a good factor (2 or 3?) faster (using out-counting rather than the grandfather method). See this post for more about methods to build them. These are not insane RAM amounts from everyone's standpoint; the head of my research group was recently impressed by how many more problems he could solve with 256GB of RAM rather than some lesser amount, and was getting time on a 1TB machine. Extrapolating from 6-piece data, a typical build should take about 8-12 hours, with pawn-full ones being more time-consuming as you need to load info about promotions (special bitbases [pieces on the 8th rank, for instance] could be made for this) -- but there is no implementation of this that I know of.
Building them all via a distribution network is another possibility, where each user spends a few days (or weeks, depending on how optimised the code is) to build a given 7-piece TB, with streaming I/O from (each) hard drive at ~100MB/s being the limitation for most of the computation. Making them Internet-available is again a "solved" problem for some high-end users, as at work I can get nearly 8MB/s in up/download speed. Users building pawnfull endgames would need a suitable set of the pawnless ones to handle promotions, though DTC and bitbases should ameliorate the large disk space needed for this. Another worry here is in the debugging phase of any software development, as it is really annoying to track bugs that take multiple days to appear. Given the size of the project, even some OS bugs might be uncovered (such as dealing with large files) -- it is also difficult to debug remotely on someone else's computer, though if the code itself were "peer-reviewed" perhaps any flaws would more readily come to light. This method has been feasible in practise for (at least) the last 5 years, but few seem sufficiently motivated to attack such a project with the dedication needed to see it through (the most known exception being the currently-private work of Konoval and Bourzutschky). With the increases in readily available HD space over the last few years, perhaps more will become interested, but it is still a formidable task.
The DTC format should be about 50-75TB for the whole set (thus about 3-4 months to download at 8MB/s, less than the time for the rest of the project), and the storage therein is (if nothing else) a reasonable cost compared to the rest of the project, though setting up an always-available RAID for them would be quite a hassle (as opposed to having 30-odd 2TB USB drives sitting on your bookshelf, to be attached when necessary). Bitbases should reduce this by a factor of around 10, so maybe you could have four 2TB drives containing the whole lot. Another option would first be to make "extended 6-piece" TBs; for instance, the "RobboBases" have "BlockedPawn" objects, but this could be generalised to other formations where opposing pawns were on the same file. Another useful tool might be a generic builder program which worked with specific files for pawns (the "RobboBases" already do this it seems, but only for the first pawn), though some conditions about promotions would be needed. For instance, something like KR+fgh vs KR+gh has 9 units, but [perhaps making assumptions about captures] there are only 15 possibilities with facing pawns on each of the gh-files, which reduces the problem by a good factor. Some of the functionality here exists in Freezer, I suppose.
So the "constants" are: total disk space around 50-75TB (with [one-sided?] DTC, and maybe DTZ for pawnfull), and bitbases in maybe 8TB. Internet connectivity at minimally something like 1MB/s (and preferably 10x that) is necessary at some stage in any event, and is crucial for a number of users to possess this if building via a distribution network.
A comparison between one-person RAM builds versus many-person disk builds:
*) Hardware cost: The one-person (RAM) method requires a 32/48-core machine with 256GB of RAM, which costs about $10-15K, and perhaps half that again for electricity. The many-person (distributed) method exploits already-sunk costs, and with electricity tries to split it up enough that no one is over-burdened (of course, the RAM system could get "donations" or whatever, and work the same way). There would be a cost of around $3-5K for hard drive storage of all the data for everyone who wants all the data in any event. For bitbases it would be closer to $500. Simply selling a set of four 2TB external HDs with the bitbases pre-installed might be a viable option -- though formatting/writing to each 2TB disk is already nontrivial (taking 6 hours at 100MB/s for each [with parallelisation possible, I guess], though this speed is at least currently an overestimate for a USB drive), and the "secretarial costs" of this might add up over time.
*) Timeline: The one-person RAM build should take about 50 cpu-years, so 1-2 years on the specified machine. It is much harder to guess about the distributed method, as it is not even clear when it is exactly "finished" -- when one person has all the files, or when all the tablebases have been generated by someone, or what? Again extrapolating from 6-piece numbers, my guess is that it would take around 10-20 harddrive-years to generate everything, given suitable code (Nalimov would be much slower than this). With a gung-ho group of 5-10 people with good Internet connections and optimal central planning, this is again around 1-2 years.
*) Software development: This is by far the most crucial step in any of this, as having a lousy format for the tablebases (or dodgy code) could easily make the whole thing a no-go. So whatever path any project takes, it will be ultimately be directed by whomever is willing to put in the effort herein. I don't want to underestimate the amount of effort necessary to ensure sound working of either system.
Building them all via a distribution network is another possibility, where each user spends a few days (or weeks, depending on how optimised the code is) to build a given 7-piece TB, with streaming I/O from (each) hard drive at ~100MB/s being the limitation for most of the computation. Making them Internet-available is again a "solved" problem for some high-end users, as at work I can get nearly 8MB/s in up/download speed. Users building pawnfull endgames would need a suitable set of the pawnless ones to handle promotions, though DTC and bitbases should ameliorate the large disk space needed for this. Another worry here is in the debugging phase of any software development, as it is really annoying to track bugs that take multiple days to appear. Given the size of the project, even some OS bugs might be uncovered (such as dealing with large files) -- it is also difficult to debug remotely on someone else's computer, though if the code itself were "peer-reviewed" perhaps any flaws would more readily come to light. This method has been feasible in practise for (at least) the last 5 years, but few seem sufficiently motivated to attack such a project with the dedication needed to see it through (the most known exception being the currently-private work of Konoval and Bourzutschky). With the increases in readily available HD space over the last few years, perhaps more will become interested, but it is still a formidable task.
The DTC format should be about 50-75TB for the whole set (thus about 3-4 months to download at 8MB/s, less than the time for the rest of the project), and the storage therein is (if nothing else) a reasonable cost compared to the rest of the project, though setting up an always-available RAID for them would be quite a hassle (as opposed to having 30-odd 2TB USB drives sitting on your bookshelf, to be attached when necessary). Bitbases should reduce this by a factor of around 10, so maybe you could have four 2TB drives containing the whole lot. Another option would first be to make "extended 6-piece" TBs; for instance, the "RobboBases" have "BlockedPawn" objects, but this could be generalised to other formations where opposing pawns were on the same file. Another useful tool might be a generic builder program which worked with specific files for pawns (the "RobboBases" already do this it seems, but only for the first pawn), though some conditions about promotions would be needed. For instance, something like KR+fgh vs KR+gh has 9 units, but [perhaps making assumptions about captures] there are only 15 possibilities with facing pawns on each of the gh-files, which reduces the problem by a good factor. Some of the functionality here exists in Freezer, I suppose.
So the "constants" are: total disk space around 50-75TB (with [one-sided?] DTC, and maybe DTZ for pawnfull), and bitbases in maybe 8TB. Internet connectivity at minimally something like 1MB/s (and preferably 10x that) is necessary at some stage in any event, and is crucial for a number of users to possess this if building via a distribution network.
A comparison between one-person RAM builds versus many-person disk builds:
*) Hardware cost: The one-person (RAM) method requires a 32/48-core machine with 256GB of RAM, which costs about $10-15K, and perhaps half that again for electricity. The many-person (distributed) method exploits already-sunk costs, and with electricity tries to split it up enough that no one is over-burdened (of course, the RAM system could get "donations" or whatever, and work the same way). There would be a cost of around $3-5K for hard drive storage of all the data for everyone who wants all the data in any event. For bitbases it would be closer to $500. Simply selling a set of four 2TB external HDs with the bitbases pre-installed might be a viable option -- though formatting/writing to each 2TB disk is already nontrivial (taking 6 hours at 100MB/s for each [with parallelisation possible, I guess], though this speed is at least currently an overestimate for a USB drive), and the "secretarial costs" of this might add up over time.
*) Timeline: The one-person RAM build should take about 50 cpu-years, so 1-2 years on the specified machine. It is much harder to guess about the distributed method, as it is not even clear when it is exactly "finished" -- when one person has all the files, or when all the tablebases have been generated by someone, or what? Again extrapolating from 6-piece numbers, my guess is that it would take around 10-20 harddrive-years to generate everything, given suitable code (Nalimov would be much slower than this). With a gung-ho group of 5-10 people with good Internet connections and optimal central planning, this is again around 1-2 years.
*) Software development: This is by far the most crucial step in any of this, as having a lousy format for the tablebases (or dodgy code) could easily make the whole thing a no-go. So whatever path any project takes, it will be ultimately be directed by whomever is willing to put in the effort herein. I don't want to underestimate the amount of effort necessary to ensure sound working of either system.