I have implemented new hash table loading/searching configurations, and introduced user-configurable
Full Width and
Normal search modes.
Hash Tables: Explicit or Implicit
Previously, all incarnations of the program featured
Implicit hashing. If a hash position matched, the implicit assumption was so did the position. But, roughly 1 out of 100 billion cubes will generate an identical 64-bit hash number, due to the nature of the hashing function, not to impune the nature of random numbers which would suggest that 18,446,744,073,709,551,615 nodes should be perused before a duplicate match would be encountered. And so, whenever one of those random cubes would be encountered during the search, you would see a move sequence being reported as a "solve" that had no chance to solve the scrambled cube.
The solution was to also store the entire cube (48 bytes per cube for my bitboard move generator) in the hash table as well. For each matching hash code, a cube comparison is made (very fast since each cube is 6 different 64-bit numbers, if all 6 match the cubes ARE identical). If the cubes do not match, the hash table result is ignore and the search for a match continues. This is what I call the
Explicit Hash Table version. The down side to using the
EHT is that 48 additional bytes, times all of the 24 rotated cube states, times all of node counts per depth, will put even the
04-TFS-EHT at 5.4 GB of RAM.
The good news is, if you have the RAM, you'll always get a known, good solution, and the verification is fast. But, if you don't have the RAM, you can always use the new, verification-in-place version of the
Implicit Hash Table.
As before, the
IHT does not store each cube in the
TFS databases in RAM. But, the new versions of
OO_4x4x4 can resolve hash-match cube-disparities. Whenever a matching hash table entry is found, the stored solution is applied to the cube generated during the search. If the hash table solution does indeed solve the cube, the result is displayed. If the solution does not work, it must be a hash-match disparity, and the hash table data is ignored and the search continues.
The only down side to this is that these hash tables take much longer to generate when the program starts up. That's because the hash tables exclude duplicates, and this process must now evoke the move generator while a great deal of move generation is already happening. The lower RAM requirement makes it worth it for those who do not have enough memory to load the corresponding
EHT.
Move Generation: Normal or Full Width
As a result of looking at the
rlfb rlfb rlfb scrambles on 4 different brute force cube solving apps (Bruce's program and the 03-TFS, 04-TFS, and 05-TFS versions of OO_4x4x4), the discovery was made that the total solution count for any given cube is a function of
move generator bias. While it was debated as to which solutions "should count" and which were "obvious duplicates," what remained unresolved was the answer to the question:
"Can you know if a solving program is working correctly just by observing the reported solution count for a given scrambled cube?"
The answer is:
No.
This will no doubt spawn arguments such as, "Well if you examine each solution and look for transposing parallel plane rotations made in succession..." but that only serves to prove my point. Examining each solution is not the same as merely enumerating all reported solutions.
The only valid solution count for a given scrambled state must be done via Full Width Searching, which does not exclude transposing moves (but which does exclude moves such as R R or F F', or U2 U', etc.) Any other reported solution count must accept the fact that it incorporated
Move Generator Bias.
As shown above, typing
search full width at the scramble prompt now directs OO_4x4x4 to use its 36 * 33^n-1 move generation mode.
To resume the reduced tree move generation mode, type
search normal at the scramble prompt.
So now there are 6 different versions of OO_4x4x4, each using the same set of source code and only
#define directives to determine what code to execute. Each version can be run in Full Width search or Normal search mode as well.
03-TFS-e = 3-Turns-From-Solved using Explicit Hash Table probing.
03-TFS-i = 3-Turns-From-Solved using Implicit Hash Table probing.
04-TFS-e = 4-Turns-From-Solved using Explicit Hash Table probing.
04-TFS-i = 4-Turns-From-Solved using Implicit Hash Table probing.
05-TFS-e = 5-Turns-From-Solved using Explicit Hash Table probing.
05-TFS-i = 5-Turns-From-Solved using Implicit Hash Table probing.
Since RAM requirements and performance options vary widely (since 05-TFS-i solves the rlfb-12 move scramble in normal search mode in 8 seconds while 04-TFS-e solves the same scramble in 03:28) I will be putting up a web page to help add to the confusion