Rybka 1.0 Beta Node Count Patch

Discussion of chess software programming and technical issues.

Moderator: Ras

rfadden

Rybka 1.0 Beta Node Count Patch

Post by rfadden »

I posted the question on the Rybka Forum asking Vasic Rajlish if there was any objection to me posting this Patch for Rybka 1.0 Beta.

There are no objections and much time has passed so I'll post the information now.

---------

The Patch is given here as a text file which contains a simple encoding used by a Patch program to alter bytes in a .exe file.

The program that applies the patch is freeware that is available for download. This PC utility is called "DZA Patcher v1.3"

This program reads from a text file which contains a catenated set of strings that look like this:

"40939D/8B/0D*"

Translated to English this means at Virtual Address 40939D (hex), store the Byte 8B (hex) and for verification note that this byte contains the original value of 0D (hex). The final "*" ends this little record and the patch file that I include is simply a set of these records all together in one long string, stored with no <cr> carriage return characters in a text file.

The following is from a file where I attempted to document how to get and then use DZA Patcher to apply this Patch to Rybka 1.0 Beta.exe

The Patch changes Rybka 1.0 to remove the Node Count Obfuscation which has been in this program all along. After applying the patch to your own version of this program then you can run this chess engine and watch the actual Depth, Nodes, and NPS of this historic engine.

===============

Google search for and download the program called "DZA Patcher v1.3"

I currently see this tool available for Download at "http://programmerstools.org/node/282"

Author: +DzA
Version: 1.3
File: dzapatcher1.3.zip (55.63 KB)

Description:
If you were looking for a tool which can PATCH almost any kind of encrypted/compressed PE file, without using crap "loaders" or other kinds of memory patchers, without needing to spend so much time to do a direct patch in the exe using compressor/encryptor loader redirectioning methods, well you were looking for +DzA's Patcher. With this patcher you can even patch files which were encrypted with multiple layers.

The program is also available at:
"http://www.softpedia.com/get/Programmin ... cher.shtml"


Run DZA Patcher and you see a window with numerous buttons and at the top right you see a button with three dots "...". Press that button and a dialog box will pop up to prompt you for the file that you intend to patch. (Make sure you have previously created a duplicate copy of "Rybka v1.0 Beta.w32.exe")

So naturally select the program "Rybka v1.0 Beta.w32.exe", and click "open" on the dialog box. DZA Patcher will then show you the file that you have selected in a text box at the top of it's main interactive window.

Having saved these codes that specify the patches within a file such as "RybkaPatch9.txt" the next task is to specify that this file is to be used.

Within the box in DZA Patcher labeled "Patch editor" there is a button labeled "Load List." Press this button and another dialog box will pop up that allows you to select the text file which contains the encoding of the patches that you want to apply. So select "RybkaPatch9.txt" and select "Open".

At that time the program will display the full list of patches that are to be applied within its own scrolling region of the Patch editor box.

To complete the patching operation simply click on the button labeled "Patch application" which is near the top right of the window.

A Pop-up window then displays "DZA Patcher: Your file was patched without errors;) so just click on "OK" and the program will then exit.

At this time it is a good idea to rename the .exe file that was just patched so you know clearly which .exe has been modified. Note that the file size does change so you can tell that the file has been modified.

I typically rename this patched exe to something such as "Rybka v1.0 Patch9.exe"


The original file:
"Rybka v1.0 Beta.w32.exe" is 2,456 KB, and
"Rybka v1.0 Patch9.exe" is 2,460 KB.

After applying the patch then just run the program in the usual fashion. If you use Arena for example, then simply "Add a new Engine" the way you would for any other engine and specify the "Rybka v1.0 Patch9.exe" file as the program (use any program name that you want).

So then as you run this version of Rybka 1.0 Beta you will for the first time start seeing the accurate Depth, Node Count, and Nodes Per Second calculation. Also if you use the UCI command "go depth 12" for example this will work correctly, whereas the original Rybka 1.0 beta (and other versions of Rybka) will change this depth to 14 and then incorrectly report depth to seemingly be consistent. (Later versions of Rybka play a slightly different game with the Depth limit that is entered.)

Note that your GUI may be sending the command to limit depth during search and the main point is that the Patched version of Rybka will for the first time actually do what you specify.

On my Athlon XP 2400+ I am seeing between 700,000 to 1,200,000 Nodes Per Second.

Note that this counting of Nodes and Nodes per second is a straightforward counting of the number of times the Make_Move function is called. Some computer chess experts have suggested that counting the calls to Make_Move is a valid way to count nodes during search.

Note that Null Moves are not counted with this technique.

====================

Here's the string that you put into a text file and then feed to DZA Patcher:
I name this file: "RybkaPatch9.txt"

====================

Code: Select all

40939D/8B/8D*40939E/F2/34*40939F/90/D0*4096DD/00/02*409700/00/02*40A774/E8/C3*40A775/D7/CC*40A776/02/CC*40A777/01/CC*40A778/00/CC*40A779/C3/CC*40C040/01/05*40C045/00/FE*40C6BB/83/A1*40C6BC/C4/6C*40C6BD/08/7A*40C6BE/E9/66*40C6BF/86/00*40C6C0/FB/83*40C6C1/FF/E8*40C6C2/FF/01*40C716/4B/2F*40C717/E3/FB*40C718/00/FF*40C719/00/FF*40C723/3E/22*40C724/E3/FB*40C725/00/FF*40C726/00/FF*40D611/01/05*40D798/8B/8D*40D799/F2/34*40D79A/90/D0*40D7CB/00/FE*40D8D5/01/05*40D900/8B/8D*40D901/F2/34*40D902/90/D0*40D927/00/FE*41AA50/A1/00*41AA51/6C/00*41AA52/7A/00*41AA53/66/00*41AA54/00/00*41AA55/83/00*41AA56/E8/00*41AA57/01/00*41AA58/85/00*41AA59/C0/00*41AA5A/A3/00*41AA5B/6C/00*41AA5C/7A/00*41AA5D/66/00*41AA5E/00/00*41AA5F/0F/00*41AA60/8E/00*41AA61/6E/00*41AA62/1C/00*41AA63/FF/00*41AA64/FF/00*41AA65/C3/00*661FFF/32/2D*661FFE/33/32*661FFD/20/33*661FFC/68/20*661FFB/63/61*661FF9/61/65*661FF8/50/42*$