During my function MakeMove I increment "Nodes" or 'QNodes" depending on which function called makemove.
After each ply of search in my Iterative Deepening search I store the nodes in an array index by ply.
:TotalNodes[Ply] := Nodes + Qnodes.
At the end of the search I calc for each ply EBF[Ply] := TotalNodes[Ply] - TotalNodes[Ply - 1] / TotalNodes[Ply-1]
I then average the last 3 (plys} EBF.
Does this sound right ?
I only ask because the result I get seems to be too good to be true.
EBF
Moderators: hgm, Rebel, chrisw
-
- Posts: 3196
- Joined: Fri May 26, 2006 3:00 am
- Location: WY, USA
- Full name: Michael Sherwin
Re: EBF
"TotalNodes[Ply] - TotalNodes[Ply - 1] / TotalNodes[Ply-1]"lauriet wrote: ↑Wed Apr 15, 2020 6:50 am During my function MakeMove I increment "Nodes" or 'QNodes" depending on which function called makemove.
After each ply of search in my Iterative Deepening search I store the nodes in an array index by ply.
:TotalNodes[Ply] := Nodes + Qnodes.
At the end of the search I calc for each ply EBF[Ply] := TotalNodes[Ply] - TotalNodes[Ply - 1] / TotalNodes[Ply-1]
I then average the last 3 (plys} EBF.
Does this sound right ?
I only ask because the result I get seems to be too good to be true.
In every language that I know of division takes precedence over subtraction. Therefore the quoted code reduces to:
TotalNodes[Ply] - 1;
I can't imagine that was your intent.
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
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
-
- Posts: 2488
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: EBF
You should always average over an even number of plies to take care of the odd-even-effect: https://www.chessprogramming.org/Odd-Ev ... _Deepening
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 12541
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: EBF
Worst EBF is pure mini-max. In the mid game, each new ply will take about 36 times as long as the previous ply on average
If you have perfectly implemented alpha-beta, it would reduce to something near 6. Of course, that assumes perfect move ordering.
Null move and LMR are also big wins, but the reduction will be not only a function of the quality of your implementation but everything about your program (how good is the eval, how good is the move ordering, how good is the hash table, how good is the ...)
pvs search also reduces branching factor, though I don't think it is called a pruning technique.
Razoring can be a big boost (the big speedup for Rybka came from brutal razoring)
Every pruning technique reduces branching factor (on average or it would not be pruning).
Stockfish is somewhere around 1.5 I think, though I have not measured it lately,
If you have perfectly implemented alpha-beta, it would reduce to something near 6. Of course, that assumes perfect move ordering.
Null move and LMR are also big wins, but the reduction will be not only a function of the quality of your implementation but everything about your program (how good is the eval, how good is the move ordering, how good is the hash table, how good is the ...)
pvs search also reduces branching factor, though I don't think it is called a pruning technique.
Razoring can be a big boost (the big speedup for Rybka came from brutal razoring)
Every pruning technique reduces branching factor (on average or it would not be pruning).
Stockfish is somewhere around 1.5 I think, though I have not measured it lately,
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 12541
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: EBF
You cannot directly connect Elo to branching factor.
That is because it only works fabulously if it is implemented fabulously.
There was a version of ExChess which (for quite a while) had the smallest branching factor of any program.
But ExChess (while strong) was not a top ten program.
It is not just how much you prune, but what you prune.
The concept of pruning is to speed up the search by spending less time on the bad moves.
So what happens if you are pruning the good moves along with the bad moves (or worse yet, pruning the good moves and examining the bad moves)?
Obviously, the Elo would go down instead of up
"The Gambler" by Kenny Rogers sums it up nicely:
"You got to know when to hold 'em, know when to fold 'em, know what to throw away, know what to keep."
That is because it only works fabulously if it is implemented fabulously.
There was a version of ExChess which (for quite a while) had the smallest branching factor of any program.
But ExChess (while strong) was not a top ten program.
It is not just how much you prune, but what you prune.
The concept of pruning is to speed up the search by spending less time on the bad moves.
So what happens if you are pruning the good moves along with the bad moves (or worse yet, pruning the good moves and examining the bad moves)?
Obviously, the Elo would go down instead of up
"The Gambler" by Kenny Rogers sums it up nicely:
"You got to know when to hold 'em, know when to fold 'em, know what to throw away, know what to keep."
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 199
- Joined: Sun Nov 03, 2013 9:32 am
Re: EBF
Hey Dann,
Now Im worried, if stockfish is about 1.5.
My program would be way weaker but my EBF in the deeper plies can be anything from < 1 to
about 2 or 3.
Typically the early plies have an EBF of 5 or 6 and then the later plies reduce from that.
If you look at the earlier posts you can see how I calc it.
Ive change it to average the previous 4 plies starting from MaxPly - 1 (since the last ply is not completed typically)
Maybe, as you suggested, I am killing off good moves instead of bad moves......
Now if you could just tell me how to tell the difference I will be 'on my way'
Now Im worried, if stockfish is about 1.5.
My program would be way weaker but my EBF in the deeper plies can be anything from < 1 to
about 2 or 3.
Typically the early plies have an EBF of 5 or 6 and then the later plies reduce from that.
If you look at the earlier posts you can see how I calc it.
Ive change it to average the previous 4 plies starting from MaxPly - 1 (since the last ply is not completed typically)
Maybe, as you suggested, I am killing off good moves instead of bad moves......
Now if you could just tell me how to tell the difference I will be 'on my way'
-
- Posts: 12541
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: EBF
I should mention about ExChess - Dan Homan is a great innovator. He did not invent Lazy SMP but he is the one that got it going. He explained what he did and he showed how well it worked. We owe him a debt of gratitude for that.
Don't expect 4000 Elo when your program is young. In fact, if it starts at SF level, we will all look at it with a stank-eye and wonder if something sneaky is going on.
Know this, it takes a very good programmer to write a simple chess program that works, So that is something to be proud of.
As you progress you can take great enjoyment in every step, and those who already walked in that path will smile with you. But beware, chess programming is a strange passion that can put you into a closet and make you program around the clock. But with Corona 19, maybe now is the perfect time to be a chess programmer. sure beats staring at the wall for 18 hours.
Don't expect 4000 Elo when your program is young. In fact, if it starts at SF level, we will all look at it with a stank-eye and wonder if something sneaky is going on.
Know this, it takes a very good programmer to write a simple chess program that works, So that is something to be proud of.
As you progress you can take great enjoyment in every step, and those who already walked in that path will smile with you. But beware, chess programming is a strange passion that can put you into a closet and make you program around the clock. But with Corona 19, maybe now is the perfect time to be a chess programmer. sure beats staring at the wall for 18 hours.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.