PVS extension up

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Spock

Re: PVS extension up

Post by Spock »

Go little Hamsters ! :)
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: PVS extension up

Post by Michael Sherwin »

Hi Alessandro,

You're not going to change those nice, cuddly, lovable little hamsters into some mean, vicious, android dismanaling demons, are you? :D

Your friend,
Romi

+15 -1 =5
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
ed

Re: PVS extension up

Post by ed »

Uri Blass wrote:I do not see how you get 8

1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.0-0

1.e4 e5 is a pair(count++)
1..e5 and 2.Nf3 is a pair (count++)
2.Nf3 and 2..Nc6 is a pair (count++)
Nc6 3.Bb5 is a pair(count++)

You extend by one ply in the 5th ply of the pv.

Uri
You understand the principle right.

In Rebel / ProDeo I don't store root moves in the Hash Table, so in my case the extension takes place on the 6th ply.

After an extension counter is zeroed and the whole circus can start again, it happens only a few times in the late ending that eventually 2 plies are extended.

Ed
ed

Re: PVS extension up

Post by ed »

Tony wrote:That was basicly what I meant. I didn't see what having a hashmove had to do with it. Just counting the amount of pv nodes in a row should do it so I was wondering if this hash move count added something.

Tony
Misunderstandings all over, let me rephrase.

Definition of PV node = Best Move From Hash Table.

You can do it as you suggested, just count every PV node and when 4, 6, 8 extend. I use the principle of "pairs", count is incremented only if the current move = PV and the previous move (at depth-1) is also a PV node.

Why?

Because I found out it works, this after zillions of other tries.

Of course (at the start of the idea) I tried just counting PV nodes, but got too many extensions (see example 2 below) and it worked counter productive, the key is to use "pairs".

There are maybe better formula's but at the time I already was pleased I finally found something working and did not study further.

Let's consider 2 lines and count:

Code: Select all


1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.0-0 
     PV  PV    PV     PV   PV   PV  PV     PV
       pair   pair  pair  pair -> extend 3..a6

1.e4 e5 2.Nf3 Nc6 3.Bc4 a6 4. 0-0 b5 5.Bb3
     PV   PV  PV   NPV  NPV   PV NPV   PV
        pair   pair      -> only 2 pairs here, no extension is sight, not in the widest vista.

The code one more time:

 int count=0;
  int margin=0x100;
  if (node[depth]=PVS && node[depth-1]=PVS && alpha > pvs_score+margin)
   { count++;
     if (count=4) { extend(); count=0; }
Hope it's more clear now....

Ed
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: PVS extension up

Post by Michael Sherwin »

Since sofar, this is just quick testing to get the feel of the PVS extention, I stopped the normal 100 game match at 50. The result at tc 1+1 was a virtual tie with my last 4+4 test (a new record) that does not have the extension. This is fantastic, but requires explanation. My current series of betas is code named 'Ninja Girl' and has the feedback loop code between the search and eval functions that uses history table info to tune the eval which better drives the search which better tunes the eval, etc. The NG series plays better at 2+2 than it does at 1+1 and better at 4+4 than it does at 2+2. So a 1+1 result tying a 4+4 record result is very good!

RomiChessNG4 vs Hamsters 0.2 at 1+1 tc, Romi +29 -9 =12.

Just to show the difference that the PVS extention is making, I am repeating the match, with out the extension.

So far, Romi +3 -2 =4

Will report the final outcome.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: PVS extension up

Post by Michael Sherwin »

Well this is just too painful to watch. :cry: So, I must terminate this 1+1 match with out the PVS extension, early.

results:

With the PVS extention, Romi +29 -9 =12, 70% :D

With out PVS extention, Romi +8 -9 =12, 48% - yuk, peuwy, I think that I am getting sick! :mrgreen:

Just a liiiiiiiiiiiitle bit of a difference, I would say! :lol:

Some more test results to come. But, not untill tomorrow!
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Tony

Re: PVS extension up

Post by Tony »

ed wrote:
Tony wrote:That was basicly what I meant. I didn't see what having a hashmove had to do with it. Just counting the amount of pv nodes in a row should do it so I was wondering if this hash move count added something.

Tony
Misunderstandings all over, let me rephrase.

Definition of PV node = Best Move From Hash Table.

You can do it as you suggested, just count every PV node and when 4, 6, 8 extend. I use the principle of "pairs", count is incremented only if the current move = PV and the previous move (at depth-1) is also a PV node.

Why?

Because I found out it works, this after zillions of other tries.

Of course (at the start of the idea) I tried just counting PV nodes, but got too many extensions (see example 2 below) and it worked counter productive, the key is to use "pairs".

There are maybe better formula's but at the time I already was pleased I finally found something working and did not study further.

Let's consider 2 lines and count:

Code: Select all


1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.0-0 
     PV  PV    PV     PV   PV   PV  PV     PV
       pair   pair  pair  pair -> extend 3..a6

1.e4 e5 2.Nf3 Nc6 3.Bc4 a6 4. 0-0 b5 5.Bb3
     PV   PV  PV   NPV  NPV   PV NPV   PV
        pair   pair      -> only 2 pairs here, no extension is sight, not in the widest vista.

The code one more time:

 int count=0;
  int margin=0x100;
  if (node[depth]=PVS && node[depth-1]=PVS && alpha > pvs_score+margin)
   { count++;
     if (count=4) { extend(); count=0; }
Hope it's more clear now....

Ed
OK, yes I misunderstood what you meant with pvs node. ( the pairs was clear)

So you don't want to extend in new pv nodes, only when going through existing ones. ( Meaning the new pv line will be extended 1 iteration later)

Tony
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: PVS extension up

Post by Michael Sherwin »

Michael Sherwin wrote:Well this is just too painful to watch. :cry: So, I must terminate this 1+1 match with out the PVS extension, early.

results:

With the PVS extention, Romi +29 -9 =12, 70% :D

With out PVS extention, Romi +8 -9 =12, 48% - yuk, peuwy, I think that I am getting sick! :mrgreen:

Just a liiiiiiiiiiiitle bit of a difference, I would say! :lol:

Some more test results to come. But, not untill tomorrow!
Okay, I relented and finished the match, but I turned the monitor off and did not watch! I took a knapp!

With the PVS extention, Romi +29 -9 =12, 70%
With out PVS extention Romi +18 -18 =14, 50%

Next I will try doing it Ed's way for comparison.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
ed

Re: PVS extension up

Post by ed »

Tony wrote:
ed wrote:
Tony wrote:That was basicly what I meant. I didn't see what having a hashmove had to do with it. Just counting the amount of pv nodes in a row should do it so I was wondering if this hash move count added something.

Tony
Misunderstandings all over, let me rephrase.

Definition of PV node = Best Move From Hash Table.

You can do it as you suggested, just count every PV node and when 4, 6, 8 extend. I use the principle of "pairs", count is incremented only if the current move = PV and the previous move (at depth-1) is also a PV node.

Why?

Because I found out it works, this after zillions of other tries.

Of course (at the start of the idea) I tried just counting PV nodes, but got too many extensions (see example 2 below) and it worked counter productive, the key is to use "pairs".

There are maybe better formula's but at the time I already was pleased I finally found something working and did not study further.

Let's consider 2 lines and count:

Code: Select all


1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.0-0 
     PV  PV    PV     PV   PV   PV  PV     PV
       pair   pair  pair  pair -> extend 3..a6

1.e4 e5 2.Nf3 Nc6 3.Bc4 a6 4. 0-0 b5 5.Bb3
     PV   PV  PV   NPV  NPV   PV NPV   PV
        pair   pair      -> only 2 pairs here, no extension is sight, not in the widest vista.

The code one more time:

 int count=0;
  int margin=0x100;
  if (node[depth]=PVS && node[depth-1]=PVS && alpha > pvs_score+margin)
   { count++;
     if (count=4) { extend(); count=0; }
Hope it's more clear now....

Ed
OK, yes I misunderstood what you meant with pvs node. ( the pairs was clear)

So you don't want to extend in new pv nodes, only when going through existing ones. ( Meaning the new pv line will be extended 1 iteration later)

Tony
Yep. I like to keep things are simple as possible.

Ed
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: PVS extension up

Post by Michael Sherwin »

I have played with overlapping pairs counting (I am not finished) and sofar no benifit against other programs.

However, I have finished a full 100 game match vs Hamsters 0.2 at 1+1 time limit using a scheme similar to what I have already posted. The result was Romi, +60 -29 =11 for a new 1+1 record! The 1+1 record previous to the current NG series was 63.5/100 and the 4+4 record of the NG series is 64.5/100.

The key point to be made sofar is that the 1+1 performance of the NG series fell to about 50% (that is why I went to 4+4 testing), so 65.5/100 at 1+1 is a 115 ELO performance increase! :D

I am planning a few more test and if I can show an even better performance I will post the results.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through