Truus DXP-Server

Discussion about development of draughts in the time of computer and Internet.
Post Reply
Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Post by Ed Gilbert » Sat Apr 11, 2009 01:04

Hi Gerard,

It is very easy to make a mistake setting up a position. That is a good reason to use a FEN setup and paste it directly into your user interface, to avoid mistakes. Recently I started doing some work on the kingsrow user interface, which I had been putting off for a long time. For me this is not very interesting -- working on the engine is much more fun. But I needed to make some improvements. I had functions to copy and paste pdn from and to the Windows clipboard, but not to files, so I started by adding file functions. As I was doing this it seemed to me that the pdn standard has some unnecessary tags. For example, the Result is given in the header, and then also at the end of the move list. Why is that necessary? In English checkers literature, it is sometimes customary to use an asterisk (*) in a list of game moves to mean a strong move, but in pdn that means a game result (unknown). I am tempted to ignore asterisks when I find them in a list of moves and only take the game result from the header [Result "*"].

Also, why does a FEN setup position also have to have a [SetUp "1"] tag? It seems to me if a game has a [FEN "..."] tag in the header then that is sufficient to say what the start position is. I think I am going to omit writing those SetUp tags, they don't seem necessary.

-- Ed

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

Post by TAILLE » Sat Apr 11, 2009 10:13

Ed Gilbert wrote:Hi Gerard,

It is very easy to make a mistake setting up a position. That is a good reason to use a FEN setup and paste it directly into your user interface, to avoid mistakes. Recently I started doing some work on the kingsrow user interface, which I had been putting off for a long time. For me this is not very interesting -- working on the engine is much more fun. But I needed to make some improvements. I had functions to copy and paste pdn from and to the Windows clipboard, but not to files, so I started by adding file functions. As I was doing this it seemed to me that the pdn standard has some unnecessary tags. For example, the Result is given in the header, and then also at the end of the move list. Why is that necessary? In English checkers literature, it is sometimes customary to use an asterisk (*) in a list of game moves to mean a strong move, but in pdn that means a game result (unknown). I am tempted to ignore asterisks when I find them in a list of moves and only take the game result from the header [Result "*"].

Also, why does a FEN setup position also have to have a [SetUp "1"] tag? It seems to me if a game has a [FEN "..."] tag in the header then that is sufficient to say what the start position is. I think I am going to omit writing those SetUp tags, they don't seem necessary.

-- Ed
Yes Ed. you are right. I have not developped the pdn interface because it is not a fun work, but I know it would make things easier for me in various occasions.

By the way Ed. do you confirm your participation to the next french open championship ? Do you have an email address I can use easily ?

Gérard

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

Post by Ed Gilbert » Sat Apr 11, 2009 14:02

Gerard, yes I will be in Paris with my family from Friday to Monday on the weekend of the tournament, and I am looking forward to attending. Thank you for offering me a ride to the tournament site. I will be bringing kingsrow on a laptop computer. I will soon create an alternate email account so we can exchange emails.

-- Ed

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

Post by TAILLE » Sat Apr 11, 2009 14:21

Ed Gilbert wrote:Gerard, yes I will be in Paris with my family from Friday to Monday on the weekend of the tournament, and I am looking forward to attending. Thank you for offering me a ride to the tournament site. I will be bringing kingsrow on a laptop computer. I will soon create an alternate email account so we can exchange emails.

-- Ed
Excellent Ed. It will be a pleasure for to travel with you to the tournament site.
I am waiting for your email information
Gérard

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

Post by TAILLE » Sat Apr 11, 2009 14:27

Ed Gilbert wrote:I will be bringing kingsrow on a laptop computer
-- Ed
What will be your laptop configuration ?
As you know I use also a laptop, with a core 2 duo T7500 2,2Ghz and 4Go RAM.
Will you be able to use your powerful 8,9,10 partial endgame databases ?

Gérard

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

Post by Ed Gilbert » Sat Apr 11, 2009 14:45

Gerard, my laptop has a 2.0GHz core 2 processor and 4gb of ram, very similar to your setup. I will use the partial 8 and 9pc dbs. I do not have any 10pc dbs. BTW, the full 8pc db build is going well. 58% of the positions are solved and verified. Estimated to finish in July.

-- Ed

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

Post by BertTuyt » Sat Apr 11, 2009 16:14

Ed,Gerard,
if works permits and im not abroad I will also most likely participate in the tournament.

I will take my new PC with me the i7 2.93 Ghz (and with 12 GByte Memory).

This weekend I will start DB-work, so i hope i am able to get the 7p Databases to work.

I will also have a look at the HyperThreading possibility.
For the "outside world" the i7 has 8 virtual cores and 4 real cores.
I will do some tests if these virtual cores make sense.

Gerard, do you also plan to do a match against Truus?
Would be interested to get your results.
Both Ed and I defeated Truus, Ed with a better margin, but thats in line with the KingsRow-Damage match results which was won by Ed.

Bert

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

Post by TAILLE » Sat Apr 11, 2009 19:05

BertTuyt wrote:Ed,Gerard,
if works permits and im not abroad I will also most likely participate in the tournament.

I will take my new PC with me the i7 2.93 Ghz (and with 12 GByte Memory).

This weekend I will start DB-work, so i hope i am able to get the 7p Databases to work.

I will also have a look at the HyperThreading possibility.
For the "outside world" the i7 has 8 virtual cores and 4 real cores.
I will do some tests if these virtual cores make sense.

Gerard, do you also plan to do a match against Truus?
Would be interested to get your results.
Both Ed and I defeated Truus, Ed with a better margin, but thats in line with the KingsRow-Damage match results which was won by Ed.

Bert
I really hope to see you for this french open tournament. Your program is very strong and it would be an interesting challenge for Damy to play against Damage.

For the time being I am not ready for such a match against TRUUS or any other program for two main reasons :
1) I still did not program the corresponding interface (and in addition it is not a very fun work to do)
2) Each time I play a game against a human or again a program (I use Flits) I collect sufficient information to improve Damy.

As soon as I see that I am not able to improve Damy after a single game, I will feel more motivated to program the interface to play against another program!

In fact I have a lot of other works to do.
1) I am reprogramming all my evaluation function with a new approach
2) I intend to generate the 8 endgame database but I need to do some evolution for that
3) I am also testing a very new algorithm for exploring the tree. Though I will not be able (lack of time) to implement all the functionnalties I have in mind I will try to use it for the next french open tournament hoping to learn more about it and improve Damy for the future.

Gérard

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

Post by Ed Gilbert » Sun Apr 12, 2009 00:53

Gerard, I have also played a large number of games with kr against Flits. I think Flits is the best commercial program available. It is stronger than truus, and the user interface is much better. I basically learned about 10x10 draughts strategy almost exclusively by watching kr play against flits, and to a lesser extent, truus.

Flits is not without some faults. Have you noticed that it sometimes makes terrible blunders in simple endgames? I have seen this a number of times. It looks like some kind of search instability.

I understand what you mean about still having a lot of work to do, and learning something from each game. That is still the situation with kingsrow too, and probably all draughts programs. They are never done! There is an infinite number of things to improve and ideas to try. But I hope that you do not try to wait until you think there is nothing more to improve before you add DamExchange to Damy, because you can learn from those matches also. When kingsrow was weaker I used to see patterns in its losses, and then it was easy to make the corrections. Dam Exchange was helpful, first against Dam2.2, and then later in 3 long matches against Damage, I was able to identify and correct some weaknesses. I also use DXP to verify my changes, using a baseline version of kingsrow vs. the new one. This requires a lot of games, and I use 4 old computers and typically test with over 600 games, but I think it is a good way to evaluate program changes.

You are reprogramming all your eval functions -- that sounds very radical! Is this too secret, or can you give a hint about it, for those of us that are curious?

-- Ed

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

Post by BertTuyt » Sun Apr 12, 2009 11:25

With a little help from my friends...................

Thanks to Ed and Rein, who analysed some remaining games, herewith the final result of the match Damage-Truus.

Nr Games: 158
Damage Win: 23
Damage Lose: 5
Draw: 130
Unknown: 0

And as Ed has explained already, the learning is in the 5 games Lost.

Keep you posted................

Bert

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

Post by TAILLE » Sun Apr 12, 2009 19:57

Ed Gilbert wrote: You are reprogramming all your eval functions -- that sounds very radical! Is this too secret, or can you give a hint about it, for those of us that are curious?
-- Ed
We always considered the eval function as the secret part of our programm and that sounds rather logical. I have several reasons for changing my eval function and most of them are secret reasons. Let me give you at least a hint.

diag 1
Image

In the above diagramm, seing only the right part of a position, you can see that the structure W34,35,40,45 put an interesting pressure on black position due to the existence of b25,23. It was then logical for me to consider that it is an advantage for white to have such structure.

Now, what about the following one where the man b40 is still on square 44 ?

diag 2.
Image

In my previous eval function I considered that this diagram was not as good as the previous one because the structure W34,35,40,45 was recognize as a possiblity but was not yet in place.

In my view the eval function was then an help to take into account the tactical pressure put by the structure W34,35,40,45 when it is in place.

Forget now the tactical evaluation and concentrate yourself only on the strategy. The second diagram is now better because it not only offers the possibility 44-40 but it also offers some other developments without 44-40 (for example 34-30).

Conclusion : taking the tactical aspect of the game diag1 is the best one due to the structure W34,35,40,45 already in place; but taking now the strategical aspect of the game diag2 is now the best one because it allows white to reach diag1 or to choose another development.

What is the good tunning for the eval function ?

My view is that it depends on your algorithm for exploring the tree (in particular the extension politics and the queeing exploration) and it depends also on the powerfulness of your machine.
With a very powerful machine and an adequate algorithm you may be able to say that allmost all the tactical part of the game can be taken by the algorithm and the eval function can then be concentrated around the strategical evaluation.

This is one of my reasons for changing my evaluation function. I take for sure that the technology will give us more and more CPU available (I noted that we can reach today 10M nodes per second with 4 cores). As a consequence my view is that the eval function have to be a more strategical function and less tactical one.

For the time being I keep for me my other reasons !

Gérard

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

Post by BertTuyt » Mon Apr 13, 2009 11:40

Gerard, interesting thoughts.

I think I can agree with you , to some extend.
I believe that for example in the late middle-game, a heavy evaluation function is even contra-productive.

In these positions , where all kinds of patterns make less sense (maybe only breakthrough is important), the subtile score-differences due to all the evaluation elements, will basically reduce the search depth and reduce the Nodes/Seconds.

Thats also the reason, at least that is my opinion, that both KingsRow and Damage won the match against Truus. Not that our evaluation function is better. Stef was a very strong Draughts player, and I trust him in translating his draughts knowledge towards computer-language.

But his program was optimized and developed in the 1990-2000 timeframe, and search depth was limited.

In the games won by Damage i see similar patterns, the position score is more or less neutral, limited man on both sides (7 - [img]images/smilies/icon_cool.gif[/img], but Damage outsearches Truus with 4 - 5 ply (or more).

In this phase the evaluation function is of little help , and the only way to understand these positions is deep search.

By the way that is also the reason Damage loses against Kingsrow, late middle game, nothing spectacular, and then suddenly the score explodes (for Damage in the wrong direction).

So you might be right, when speed further increases and large databases come available, the evaluation should guide you trough the opening and middle game, and then go for the "kill" in the late endgame.

Maybe still some elements might be useful, locked wings (left - right), outposts, but it could be that this eval is much "thinner".

Bert

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

Post by Ed Gilbert » Mon Apr 13, 2009 13:46

TAILLE wrote:What is the good tunning for the eval function ?

My view is that it depends on your algorithm for exploring the tree (in particular the extension politics and the queeing exploration) and it depends also on the powerfulness of your machine.
With a very powerful machine and an adequate algorithm you may be able to say that allmost all the tactical part of the game can be taken by the algorithm and the eval function can then be concentrated around the strategical evaluation.
Gerard, I agree with you that the eval should have terms that affect long term stategic goals, not short term tactics. Let the search take care of the tactics. I do not think it depends on the speed of the computer. I think this is the correct approach regardless. I test my eval changes using old, slow machines, at very short search times, and the results I get from these matches seem to hold up at longer time controls.

Truus does tactical pattern recognition in a very big and time consuming way. You can read about it in Keetman's paper, "Learning Tactical Patterns in Draughts". I have tried some things like this in 8x8 checkers and I could never get them to be worthwhile. It always seemed like the sacrifice in speed and search depth was too much price to pay for some earlier recognition of shots and combinations.

-- Ed

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

Post by Ed Gilbert » Mon Apr 13, 2009 14:13

BertTuyt wrote:Thats also the reason, at least that is my opinion, that both KingsRow and Damage won the match against Truus. Not that our evaluation function is better. Stef was a very strong Draughts player, and I trust him in translating his draughts knowledge towards computer-language.

But his program was optimized and developed in the 1990-2000 timeframe, and search depth was limited.
Bert, I cannot agree about Truus' evaluation. I have watched a lot of kingsrow vs. truus games, and it is remarkable how different the evaluation scores are. It is common for truus to think it has a great position, with scores around 0.3 or even higher, and at the same time kingsrow thinks that it has the better position! IMO truus overweights some things out of proportion to their positional value. As another indication of this, I sometimes see truus briefly showing a score as high as 0.4 after only 6 or 7 moves from the start of the game, and then the big score will disappear on the next search. That cannot be good.

-- Ed

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

Post by BertTuyt » Mon Apr 13, 2009 14:17

Ed,Gerard,

see below position (derived from the game Boomstra - Zweerink, after the theoretical continuation 45 ..... 14-19 46 24-20 11-17 47 39-33 17-21 48 15-10 4x24 49 29x20) , in this position Black has to play. Im not sure if evolution function help here.
Anyway for Damage it is a draw ( 19-24), although there is some discussion if 19-23 is a win for Black.

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

Bert

Post Reply