ENGINE SPEED AND STRONG

Discussion about development of draughts in the time of computer and Internet.
Post Reply
TAILLE
Posts: 968
Joined: Thu Apr 26, 2007 18:51
Location: FRANCE

Re: ENGINE SPEED AND STRONG

Post by TAILLE » Wed Feb 15, 2017 21:32

Catherine wrote: Hi Taille,

By "max EGDB" i mean the maximum EGDB that can be built. And we know that if an engine own the biggest egdb and the eval function wich will have the goal to force complicated positions to force opponent to make mistake will be the best.

By "optimals egdb moves" i mean to reach the egdb, engines used to play the best moves to reach or the win or the draw inside the EGDB.

Just an example to resume all, i suppose that you have 2 engine A and B with the same eval function like SMP, BTW... Engine A has the 10 egdb and B has the 6 EGDB, the number of draws, even with this difference will be high.
Now if adding to the 10 egdb, engine A use this new eval function, it will win several games.

This it's what i tried to say.

Catherine
Hi Catherine,

Basically I agree with you but I am still studying a completly different approach in order to try and provoque mistakes.
Gérard

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: ENGINE SPEED AND STRONG

Post by Joost Buijs » Thu Feb 16, 2017 08:14

Krzysztof Grzelak wrote:
Joost Buijs wrote:Since I have two fast computers available I play with DXP on 2 different computers, with 2 computers you can also use pondering and 8p egdb, with one computer pondering is not possible and egdb performance goes down because both programs try to read from the same disk at the same time, of course you can use 2 different disks for the egdb.
Please play the match using dxp but on one computer, not on the two computers.Then you will see the true power of your engine. Dxp done so in order to play on one computer as in chess.
This morning I was thinking about this. You have to be careful when playing on one computer only because not all engines behave nicely.

For instance in my engine I have 2 SMP modes, one I call nice-SMP and the other fast-SMP, these modes are determined on compile-time. With nice-SMP I use the Windows scheduler to start and stop the threads, with fast-SMP they are looping till there is work to do. Unfortunately nice-SMP plays a bit weaker with very fast games (about 10 Elo) because not all threads start at the same time and the dead time will be larger. With nice-SMP It happens often that one thread already finds a beta cutoff at the splitpoint while the others are still waiting to get started which is very inefficient. The point is that in fast-SMP mode I forgot to turn off the polling-loop when it is not the engines turn to move and the engine is not pondering, so it is actually stealing CPU time from the opponent. I will fix this behavior in the next version.

There are many things you have to consider when building a new engine and this is one of them, my todo list is still very large.

Joost
Last edited by Joost Buijs on Thu Feb 16, 2017 12:57, edited 1 time in total.

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

Re: ENGINE SPEED AND STRONG

Post by Rein Halbersma » Thu Feb 16, 2017 09:25

Joost Buijs wrote:
Krzysztof Grzelak wrote:
Joost Buijs wrote:Since I have two fast computers available I play with DXP on 2 different computers, with 2 computers you can also use pondering and 8p egdb, with one computer pondering is not possible and egdb performance goes down because both programs try to read from the same disk at the same time, of course you can use 2 different disks for the egdb.
Please play the match using dxp but on one computer, not on the two computers.Then you will see the true power of your engine. Dxp done so in order to play on one computer as in chess.
This morning I was thinking about this. You have to be careful when playing on one computer only because not all engines behave nicely.

For instance in my engine I have 2 SMP modes, one I call nice-SMP and the other fast-SMP, these modes are determined on compile-time. With nice-SMP I use the Windows scheduler to start and stop the threads, with fast-SMP they are looping till there is work to do. Unfortunately nice-SMP plays a bit weaker with very fast games (about 10 Elo) because not all threads start at the same time and the dead time will be larger. With nice-SPM It happens often that one thread already finds a beta cutoff at the splitpoint while the others are still waiting to get started which is very inefficient. The point is that in fast-SMP mode I forgot to turn off the polling-loop when it is not the engines turn to move and the engine is not pondering, so actually stealing CPU time from the opponent. I will fix this behavior in the next version.

There are many things you have to consider when building a new engine and this is one of them, my todo list is still very large.

Joost
Why not set up two Virtual Machines, give the VMs a fixed memory / CPU share and let each engine go wild in its own VM?

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: ENGINE SPEED AND STRONG

Post by Joost Buijs » Thu Feb 16, 2017 12:54

Rein Halbersma wrote:
Joost Buijs wrote:
Krzysztof Grzelak wrote:
Please play the match using dxp but on one computer, not on the two computers.Then you will see the true power of your engine. Dxp done so in order to play on one computer as in chess.
This morning I was thinking about this. You have to be careful when playing on one computer only because not all engines behave nicely.

For instance in my engine I have 2 SMP modes, one I call nice-SMP and the other fast-SMP, these modes are determined on compile-time. With nice-SMP I use the Windows scheduler to start and stop the threads, with fast-SMP they are looping till there is work to do. Unfortunately nice-SMP plays a bit weaker with very fast games (about 10 Elo) because not all threads start at the same time and the dead time will be larger. With nice-SPM It happens often that one thread already finds a beta cutoff at the splitpoint while the others are still waiting to get started which is very inefficient. The point is that in fast-SMP mode I forgot to turn off the polling-loop when it is not the engines turn to move and the engine is not pondering, so actually stealing CPU time from the opponent. I will fix this behavior in the next version.

There are many things you have to consider when building a new engine and this is one of them, my todo list is still very large.

Joost
Why not set up two Virtual Machines, give the VMs a fixed memory / CPU share and let each engine go wild in its own VM?
Yes, this is a possibility.

It is very easy to setup VM's under Windows with Hyper-V, VMware or VirtualBox. How good the resources will be divided among the 2 different VM's is something I don't know. And there still is the problem of both engines sharing the same EGDB on the same harddisk or you have to setup 2 virtual disks on 2 separate harddisks. It seems Ed's 8p EGDB needs 16 GB cache to keep the slowdown at a minimum, so you'll need a machine with at least 48GB of memory, not many people have this.
I have two almost identical machines one with 8 cores and one with 10 cores, besides the difference in core-count the performance per core is identical, so in my case using 2 separate machines seems logical.

Joost

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

Re: ENGINE SPEED AND STRONG

Post by Rein Halbersma » Thu Feb 16, 2017 13:13

Joost Buijs wrote:
Rein Halbersma wrote:
Joost Buijs wrote:
This morning I was thinking about this. You have to be careful when playing on one computer only because not all engines behave nicely.

For instance in my engine I have 2 SMP modes, one I call nice-SMP and the other fast-SMP, these modes are determined on compile-time. With nice-SMP I use the Windows scheduler to start and stop the threads, with fast-SMP they are looping till there is work to do. Unfortunately nice-SMP plays a bit weaker with very fast games (about 10 Elo) because not all threads start at the same time and the dead time will be larger. With nice-SPM It happens often that one thread already finds a beta cutoff at the splitpoint while the others are still waiting to get started which is very inefficient. The point is that in fast-SMP mode I forgot to turn off the polling-loop when it is not the engines turn to move and the engine is not pondering, so actually stealing CPU time from the opponent. I will fix this behavior in the next version.

There are many things you have to consider when building a new engine and this is one of them, my todo list is still very large.

Joost
Why not set up two Virtual Machines, give the VMs a fixed memory / CPU share and let each engine go wild in its own VM?
Yes, this is a possibility.

It is very easy to setup VM's under Windows with Hyper-V, VMware or VirtualBox. How good the resources will be divided among the 2 different VM's is something I don't know. And there still is the problem of both engines sharing the same EGDB on the same harddisk or you have to setup 2 virtual disks on 2 separate harddisks. It seems Ed's 8p EGDB needs 16 GB cache to keep the slowdown at a minimum, so you'll need a machine with at least 48GB of memory, not many people have this.
I have two almost identical machines one with 8 cores and one with 10 cores, besides the difference in core-count the performance per core is identical, so in my case using 2 separate machines seems logical.

Joost
I use VirtualBox. It allows you to assign a number of cores to each VM as well as a fixed portion of RAM. I only tried doing one VM at the same time, but the VM does not go "above its budget". It's a perfect way of dividing resources, other than giving Windows processes some affinity or however that may work (I only know how to do that on Linux). BTW, it is perfectly possible to give almost everything to the VM, I have been running a Linux VM with 8 threads 24 out of 32Gb at full load on my current machine, with only 8 Gb and 4 threads left for Windows. Didn't notice that at all when watching Netflix.

Today my new 64Gb machine arrives :) I will be running Linux as the main OS, with a Windows VM for Kingsrow / TurboDambase. I also have an increasingly ageing 32Gb machine (both are 6-core Xeons) that I will keep around.

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: ENGINE SPEED AND STRONG

Post by Joost Buijs » Thu Feb 16, 2017 13:39

Rein Halbersma wrote:
Joost Buijs wrote:
Rein Halbersma wrote:
Why not set up two Virtual Machines, give the VMs a fixed memory / CPU share and let each engine go wild in its own VM?
Yes, this is a possibility.

It is very easy to setup VM's under Windows with Hyper-V, VMware or VirtualBox. How good the resources will be divided among the 2 different VM's is something I don't know. And there still is the problem of both engines sharing the same EGDB on the same harddisk or you have to setup 2 virtual disks on 2 separate harddisks. It seems Ed's 8p EGDB needs 16 GB cache to keep the slowdown at a minimum, so you'll need a machine with at least 48GB of memory, not many people have this.
I have two almost identical machines one with 8 cores and one with 10 cores, besides the difference in core-count the performance per core is identical, so in my case using 2 separate machines seems logical.

Joost
I use VirtualBox. It allows you to assign a number of cores to each VM as well as a fixed portion of RAM. I only tried doing one VM at the same time, but the VM does not go "above its budget". It's a perfect way of dividing resources, other than giving Windows processes some affinity or however that may work (I only know how to do that on Linux). BTW, it is perfectly possible to give almost everything to the VM, I have been running a Linux VM with 8 threads 24 out of 32Gb at full load on my current machine, with only 8 Gb and 4 threads left for Windows. Didn't notice that at all when watching Netflix.

Today my new 64Gb machine arrives :) I will be running Linux as the main OS, with a Windows VM for Kingsrow / TurboDambase. I also have an increasingly ageing 32Gb machine (both are 6-core Xeons) that I will keep around.
I never tried VirtualBox only Hyper-V (which is also built into Windows 10) and VMware. Hyper-V is very good but is has one drawback namely that it doesn't virtualize the USB ports, you need 3th party extensions for that.

My main machine also has 64 GB of memory and the other one has 32 GB, the CPU in my main machine and the motherboard support 128 GB max. So it is possible to extend in in the future if needed for ML. When you need more memory you are forced by Intel to use Xeons.

Joost

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

Re: ENGINE SPEED AND STRONG

Post by Rein Halbersma » Thu Feb 16, 2017 14:39

Joost Buijs wrote:
Rein Halbersma wrote:
Joost Buijs wrote:
Yes, this is a possibility.

It is very easy to setup VM's under Windows with Hyper-V, VMware or VirtualBox. How good the resources will be divided among the 2 different VM's is something I don't know. And there still is the problem of both engines sharing the same EGDB on the same harddisk or you have to setup 2 virtual disks on 2 separate harddisks. It seems Ed's 8p EGDB needs 16 GB cache to keep the slowdown at a minimum, so you'll need a machine with at least 48GB of memory, not many people have this.
I have two almost identical machines one with 8 cores and one with 10 cores, besides the difference in core-count the performance per core is identical, so in my case using 2 separate machines seems logical.

Joost
I use VirtualBox. It allows you to assign a number of cores to each VM as well as a fixed portion of RAM. I only tried doing one VM at the same time, but the VM does not go "above its budget". It's a perfect way of dividing resources, other than giving Windows processes some affinity or however that may work (I only know how to do that on Linux). BTW, it is perfectly possible to give almost everything to the VM, I have been running a Linux VM with 8 threads 24 out of 32Gb at full load on my current machine, with only 8 Gb and 4 threads left for Windows. Didn't notice that at all when watching Netflix.

Today my new 64Gb machine arrives :) I will be running Linux as the main OS, with a Windows VM for Kingsrow / TurboDambase. I also have an increasingly ageing 32Gb machine (both are 6-core Xeons) that I will keep around.
I never tried VirtualBox only Hyper-V (which is also built into Windows 10) and VMware. Hyper-V is very good but is has one drawback namely that it doesn't virtualize the USB ports, you need 3th party extensions for that.

My main machine also has 64 GB of memory and the other one has 32 GB, the CPU in my main machine and the motherboard support 128 GB max. So it is possible to extend in in the future if needed for ML. When you need more memory you are forced by Intel to use Xeons.

Joost
Mine has a Xeon e5-1650v4, which is pretty good value for money. I still have 4 RAM slots open so some room for more expansion. I also have a GTX 1050 Ti video card with 4Gb which can be used for ML.

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: ENGINE SPEED AND STRONG

Post by Joost Buijs » Thu Feb 16, 2017 16:25

Hi,

Just added Ed's GAMEREQ_FISHER to DXP, now it is possible to run a game in a few seconds. 6 secs. per game is usable, when I make the times very small the GUI and the console window start taking their toll, minimizing the windows help but than it is not possible to follow the games.

Kingsrow is doing somewhat better with these short times, I guess my engine is not very well suited for these short times and my Fisher time-control is not optimal yet. At least it gives me the opportunity to check modifications to the engine 10 times faster. I really have to start working on a self-play mode.

Edit:

By carefully tuning of Probcut and LMR I could get the playing level up to what it is in the old situation. Hopefully it will have a positive influence on games with longer time controls as well, I couldn't see this before because there were far to many draws.

Joost

Catherine
Posts: 129
Joined: Tue Aug 14, 2012 22:24
Real name: Catherine Bourneuf

Re: ENGINE SPEED AND STRONG

Post by Catherine » Thu Feb 16, 2017 20:56

Joost Buijs wrote:Hi,

Just added Ed's GAMEREQ_FISHER to DXP, now it is possible to run a game in a few seconds. 6 secs. per game is usable, when I make the times very small the GUI and the console window start taking their toll, minimizing the windows help but than it is not possible to follow the games.

Kingsrow is doing somewhat better with these short times, I guess my engine is not very well suited for these short times and my Fisher time-control is not optimal yet. At least it gives me the opportunity to check modifications to the engine 10 times faster. I really have to start working on a self-play mode.

Edit:

By carefully tuning of Probcut and LMR I could get the playing level up to what it is in the old situation. Hopefully it will have a positive influence on games with longer time controls as well, I couldn't see this before because there were far to many draws.

Joost
Hi Joost,

It seem that, you discovered one by one all the weakness of your engine, this is effectivly good to make it stronger.
You done a good remark, Kingsrow is very strong, almost undisputed in rapid games.
We runned a match against Scan with 30s/75 moves, Kingsrow won almost all the games but in long games Scan have the upper, same with your engine but like you said you improved it to blitz games, the news matchs will be hots.

Wich that bring this question: why a program can be strong in long game and weak in blitz.
Thank
Catherine.

Fabien Letouzey
Posts: 299
Joined: Tue Jul 07, 2015 07:48
Real name: Fabien Letouzey

Re: ENGINE SPEED AND STRONG

Post by Fabien Letouzey » Fri Feb 17, 2017 06:49

Hi Catherine,
Catherine wrote:We runned a match against Scan with 30s/75 moves, Kingsrow won almost all the games but in long games Scan have the upper, same with your engine but like you said you improved it to blitz games, the news matchs will be hots.
I am not sure this test is valid, and strongly doubt that Scan suddenly becomes terrible in bullet games. Games faster than 1 minute are not officially allowed in DXP and Scan doesn't handle them; it would play every move instantly I guess (believing it's 0 minute). Ed made changes in his private Scan version to adapt to his testing conditions. You might even be able to check by yourself: compare 1 minute with 59 seconds. Obviously it shouldn't make any measurable difference, but I guess it will.

Fabien.

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: ENGINE SPEED AND STRONG

Post by Joost Buijs » Fri Feb 17, 2017 07:04

Catherine wrote:
Joost Buijs wrote:Hi,

Just added Ed's GAMEREQ_FISHER to DXP, now it is possible to run a game in a few seconds. 6 secs. per game is usable, when I make the times very small the GUI and the console window start taking their toll, minimizing the windows help but than it is not possible to follow the games.

Kingsrow is doing somewhat better with these short times, I guess my engine is not very well suited for these short times and my Fisher time-control is not optimal yet. At least it gives me the opportunity to check modifications to the engine 10 times faster. I really have to start working on a self-play mode.

Edit:

By carefully tuning of Probcut and LMR I could get the playing level up to what it is in the old situation. Hopefully it will have a positive influence on games with longer time controls as well, I couldn't see this before because there were far to many draws.

Joost
Hi Joost,

It seem that, you discovered one by one all the weakness of your engine, this is effectivly good to make it stronger.
You done a good remark, Kingsrow is very strong, almost undisputed in rapid games.
We runned a match against Scan with 30s/75 moves, Kingsrow won almost all the games but in long games Scan have the upper, same with your engine but like you said you improved it to blitz games, the news matchs will be hots.

Wich that bring this question: why a program can be strong in long game and weak in blitz.
Thank
Catherine.
Yes, that is a good question. With chess we see the same thing, I think you need a minimum tactical depth, with very short time-controls aggressive pruning is usually the best to enable you to reach a high depth very quickly, while with longer time-controls less aggressive pruning works better because there will be less holes in the search. Theoretically this seems unsound but the effect is clearly noticeable in practice.

I was able to tune the pruning in such a way that it is much better now at very fast bullet/blitz and that also means that it will do better on slow computers like laptops. I don't know what it does with longer games but at first glance it does not seem to hurt very much.

Kingsrow is very strong indeed at bullet/blitz games and it is fast too, on my machine it does 40 mnps which is faster as the non-bmi version of my engine.

Today I can work for many hours on my engine and I hope to upload the new version this weekend.

Joost
Last edited by Joost Buijs on Fri Feb 17, 2017 07:19, edited 1 time in total.

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: ENGINE SPEED AND STRONG

Post by Joost Buijs » Fri Feb 17, 2017 07:09

Fabien Letouzey wrote:Hi Catherine,
Catherine wrote:We runned a match against Scan with 30s/75 moves, Kingsrow won almost all the games but in long games Scan have the upper, same with your engine but like you said you improved it to blitz games, the news matchs will be hots.
I am not sure this test is valid, and strongly doubt that Scan suddenly becomes terrible in bullet games. Games faster than 1 minute are not officially allowed in DXP and Scan doesn't handle them; it would play every move instantly I guess (believing it's 0 minute). Ed made changes in his private Scan version to adapt to his testing conditions. You might even be able to check by yourself: compare 1 minute with 59 seconds. Obviously it shouldn't make any measurable difference, but I guess it will.

Fabien.
You have a point here, but I would expect that it doesn't play at all because GameReq_Fisher uses a different header tag and the position is at a different offset in the GameReq struct.

Joost

Fabien Letouzey
Posts: 299
Joined: Tue Jul 07, 2015 07:48
Real name: Fabien Letouzey

Re: ENGINE SPEED AND STRONG

Post by Fabien Letouzey » Fri Feb 17, 2017 07:26

Joost Buijs wrote:You have a point here, but I would expect that it doesn't play at all because GameReq_Fisher uses a different header tag and the position is at a different offset in the GameReq struct.
I'm completely lost; where did Catherine mention Fischer or "position"?

Joost Buijs
Posts: 471
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: ENGINE SPEED AND STRONG

Post by Joost Buijs » Fri Feb 17, 2017 07:36

Fabien Letouzey wrote:
Joost Buijs wrote:You have a point here, but I would expect that it doesn't play at all because GameReq_Fisher uses a different header tag and the position is at a different offset in the GameReq struct.
I'm completely lost; where did Catherine mention Fischer or "position"?
Well, I understood that Catherine uses the Kingsrow GUI to play the games against Scan and the standard DXP mode doesn't allow you to enter games with a duration of less than 1 minute, the Fisher DXP mode does, but maybe I'm completely wrong and she or he uses a different GUI or protocol, or is it possible to enter partial minutes in the Kingsrow GUI in standard DXP mode as well? Actually I never tried.

Joost

Fabien Letouzey
Posts: 299
Joined: Tue Jul 07, 2015 07:48
Real name: Fabien Letouzey

Re: ENGINE SPEED AND STRONG

Post by Fabien Letouzey » Fri Feb 17, 2017 07:44

Joost Buijs wrote:Well, I understood that Catherine uses the Kingsrow GUI to play the games against Scan and the standard DXP mode doesn't allow you to enter games with a duration of less than 1 minute, the Fisher DXP mode does, but maybe I'm completely wrong and she or he uses a different GUI or protocol.
I see, thanks. I assumed the same about the GUI, but that it used another DXP extension by Ed that uses syntax like "0.5" minute instead of Fischer. Catherine specifically mentioned 75 moves. I didn't even expect the Fischer extension to be publicly available in the GUI as, presumably, very few programs would be compatible with it.

Post Reply