Truus DXP-Server

Discussion about development of draughts in the time of computer and Internet.
Post Reply
User avatar
FeikeBoomstra
Posts: 306
Joined: Mon Dec 19, 2005 16:48
Location: Emmen

Post by FeikeBoomstra » Thu Mar 26, 2009 23:16

OK, I just wait, looking forward to your next posts

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Post by BertTuyt » Sat Mar 28, 2009 12:44

TDXPS, episode V

As also Feike pointed out, many games have cheat-codes, or backdoors.
For programmers this option is very useful, because it gives flexibility for testing.

So therefore the logical question, does Truus have this hidden option. Or are there "traces" in the program which could give a clue.

To find out, an useful tool is Resource Hacker (you can download this application from the Internet). It finds resources (like menu, dialogs, icons, in an executable).

Searching for dialogs within Truus, one will find all the wellknown dialogs , with one exception. There is also a Dialog (non visible in the program) , number 107 with the Text "Voer Commando in", translated, Enter Command !. See below the output.

Code: Select all

107 DIALOG 0, 0, 182, 50
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
LANGUAGE LANG_DUTCH, 0x1
FONT 8, "MS Sans Serif"
{
   CONTROL "OK", 1, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 129, 7, 50, 14 
   CONTROL "Cancel", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 129, 24, 50, 14 
   CONTROL "Voer Commando In", -1, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 13, 9, 61, 8 
   CONTROL "", 1001, EDIT, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 13, 21, 96, 12 
}

So at least there was a Backdoor activated in the past. Next question is are there more traces in the program itself.

For this one should try to find calls to DialogBoxParam with the ID 107 (hex 6B).

("The DialogBoxParam function creates a modal dialog box from a dialog box template resource.").

This quest will lead to the second "trace" , yes there is still code available in the program, which activates this Dialog, incl. processing.

So apparently, it was (or is possible?) to enter commands in Truus (as was possible with the previous DOS-versions), which are then processed by the "Engine".

This yields basically the assumption that in Truus the GUI and Engine are separate units, which communicate which each other through commands/messages, which are stored in a command-buffer.

All interesting, but the remaining challenge is to activate the "hidden/unused" code, which appears not be be that difficult.

To be continued ..........................

Bert

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Post by BertTuyt » Sun Mar 29, 2009 10:25

TDXPS, episode VI

Do we need this backdoor for the TDXPS, basically not.
But to understand all the commands possible within Truus, is is useful to activate this test facility.

Activation is relatively easy. Within a Windows program there is a "standard" jump-table (based on a computed goto) for all the menu-items. This table contains all the addresses of functions related to the menu commands.

If we replace the address of a menu-item we (for example) don't use often (such as Bepaal Scherpte), and change this into the "Enter Command Function" , the job is already done.
In the end, one only need to change/patch 2 bytes.

If someone is interested to experiment with this backdoor, and want to get some additional Truus options, drop my an email , and I will provide the necessary information.

In the next episode, based on all known so far, I will explain the principles of the TDXPS.

To be continued...........

Bert

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Post by BertTuyt » Fri Apr 10, 2009 15:16

Also Damage played a 158-game match against Truus.

Both programs were running on a Quad Intel Q6600 (2.4 GHZ).
Time settings: 65 moves in 10 Minutes.
Both programs used 6p endgame Databases
The Damage search-engine was based on 1-core (so not the multi-core implementation).

The Match results Damage-Truus

Damage Win: 18
Damage Loose: 5
Draw: 127
Unknown: 8

I will start analysing the 8 remaining positions.
If this yield no results, I will post the diagrams, so Ed might help with his databases.

Bert

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Post by BertTuyt » Fri Apr 10, 2009 15:34

Herewith the first diagram : from Game 2.

White is Damage and White is to play.
As the Black man on 24 will be captured (via 47x15) , the remaining position should be easily recognized with the 7p database.

[img]http://fmjd.org/dias2/save/12393702677.png[/img]

Bert

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Post by BertTuyt » Fri Apr 10, 2009 17:31

Herewith the second diagram : from Game 14.

White is Damage and White is to play.
I hope the 8p database will solve the mystery.

[img]http://fmjd.org/dias2/save/12393774516.png[/img]

Bert

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Post by BertTuyt » Fri Apr 10, 2009 17:52

Herewith the third diagram : from Game 86.

White is Damage and White is to play.
I hope the 8p database will help in yielding the final outcome.

[img]http://fmjd.org/dias2/save/12393787114.png[/img]

Bert

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Post by BertTuyt » Fri Apr 10, 2009 18:28

Herewith the 4th diagram : from Game 101.

Black is Damage and Black is to play.
I hope the 9p database will provide more insights.

[img]http://fmjd.org/dias2/save/12393808533.png[/img]

Bert

Rein Halbersma
Posts: 1722
Joined: Wed Apr 14, 2004 16:04
Contact:

Post by Rein Halbersma » Fri Apr 10, 2009 20:44

BertTuyt wrote:Also Damage played a 158-game match against Truus.

Both programs were running on a Quad Intel Q6600 (2.4 GHZ).
Time settings: 65 moves in 10 Minutes.
Both programs used 6p endgame Databases
The Damage search-engine was based on 1-core (so not the multi-core implementation).

The Match results Damage-Truus

Damage Win: 18
Damage Loose: 5
Draw: 127
Unknown: 8

I will start analysing the 8 remaining positions.
If this yield no results, I will post the diagrams, so Ed might help with his databases.

Bert
Bert, game 2 = draw, game 14 = large white advantage but inconclusive, game 86 = white win, game 101 = draw

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Post by BertTuyt » Fri Apr 10, 2009 20:51

Herewith the 5th (and last) diagram : from Game 130.

White is Damage and White is to play.

[img]http://fmjd.org/dias2/save/12393894602.png[/img]

Bert

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Post by BertTuyt » Fri Apr 10, 2009 20:56

So with help from Rein, here the most recent Match Summary Damage-Truus

Damage-Truus

Damage Win: 21
Damage Loose: 5
Draw: 130
Unknown: 2

So not s good as KingsRow, but this was expected based on the match KingsRow-Damage, but i guess a convincing victory.

Maybe good thats someone calculates the elo-differences based on these 3 matches:
KingsRow - Damage
KingsRow - Truus
Damage - Truus

Hope others will follow soon ...

Bert

Rein Halbersma
Posts: 1722
Joined: Wed Apr 14, 2004 16:04
Contact:

Post by Rein Halbersma » Fri Apr 10, 2009 21:04

BertTuyt wrote:So with help from Rein, here the most recent Match Summary Damage-Truus

Damage-Truus

Damage Win: 21
Damage Loose: 5
Draw: 130
Unknown: 2

So not s good as KingsRow, but this was expected based on the match KingsRow-Damage, but i guess a convincing victory.

Maybe good thats someone calculates the elo-differences based on these 3 matches:
KingsRow - Damage
KingsRow - Truus
Damage - Truus

Hope others will follow soon ...

Bert
Hi Bert,

The last diagram is very likely a win for white. It's a -500 score, compared to a -200 score for the other inconclusive diagram. I have never seen Kingsrow draw from such a big score. But Ed has much larger databases now than the ones I got last year, so perhaps he can give the final result.

If you like to compute ratings, perhaps you find this link interesting:
http://remi.coulom.free.fr/Bayesian-Elo/

Rein

Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Post by Ed Gilbert » Fri Apr 10, 2009 21:19

Bert,

Congrats on the good results for damage. It's also nice to see the truus dxp server being put to some good use.

Here is kr's analysis of the games you posted. I am using the same kr/dbs as Rein but my computer is faster and has a lot more ram so I had no trouble getting conclusive results.

[Event "Game 2"]
[White "Damage"]
[Black "Truus"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "W:W16,44,K47,49,50:BK3,24,K48."]
1. 47x15 1/2-1/2

[Event "Game 14"]
[White "Damage"]
[Black "Truus"]
[Result "1-0"]
[SetUp "1"]
[FEN "W:WK1,26,K49,50:BK2,3,25,30."]
1. 26-21 1-0

[Event "Game 86"]
[White "Damage"]
[Black "Truus"]
[Result "1-0"]
[SetUp "1"]
[FEN "W:W8,27,33,39,47:B5,K19,36."]
1. 8-2 1-0

[Event "Game 101"]
[White "Truus"]
[Black "Damage"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "B:WK23,29,33,39:B6,25,26,35,K50."]
35-40 1/2-1/2

[Event "Game 130"]
[White "Damage"]
[Black "Truus"]
[Result "1-0"]
[SetUp "1"]
[FEN "W:WK1,23,K32,35,47:B4,15,K17,31."]
1. 23-19 1-0


-- Ed

TAILLE
Posts: 968
Joined: Thu Apr 26, 2007 18:51
Location: FRANCE

Post by TAILLE » Fri Apr 10, 2009 23:55

Hi Ed,
Ed Gilbert wrote:Bert,

Congrats on the good results for damage. It's also nice to see the truus dxp server being put to some good use.

Here is kr's analysis of the games you posted. I am using the same kr/dbs as Rein but my computer is faster and has a lot more ram so I had no trouble getting conclusive results.

[Event "Game 2"]
[White "Damage"]
[Black "Truus"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "W:W16,44,K47,49,50:BK3,24,K48."]
1. 47x15 1/2-1/2
-- Ed
For Damy 1.47x15 is a winning move. Are you sure of your result ?

Gérard

TAILLE
Posts: 968
Joined: Thu Apr 26, 2007 18:51
Location: FRANCE

Post by TAILLE » Sat Apr 11, 2009 00:12

TAILLE wrote:Hi Ed,

For Damy 1.47x15 is a winning move. Are you sure of your result ?

Gérard
Oups.
Sorry I put on the board a wrong position. Ed. result is of course correct!
Gérard

Post Reply