acutally the i want to be clear, the swap idea is
sort=1;
for(a=0; a<top; a++) // loop through moves
{
if(sort==1)
sort=order(moves, a, top)
rest of search
}
int order(int moves[], int bottom, int top)
{
/*
if i have moves 1 2 3 4 5 at moves[0] through moves[4]
I start looking for moves at bottom ( on first pass 0 on secon pass 1
and when i find it i swap so if best move is 4 next pass i have
4 2 3 1 5
but bottom places me at 2 for the first move i now look at on second pass
*/
int place=-1;
int score=-1000;
for(a=bottom; a<top; a++)
{
// now i go through whole list starting at bottom and score moves
if(moves[a]==capture)
if(capturesscore(moves[a])>score)
{
place=a;
score=capturesscore(moves[a])
// place always becomes the highest scoring move in moves from bottom to top
}
if(killerscore(moves[a])>score)
{
score=killerscore(moves[a]]);
place=a;
}
}// end for bottom to top for loop
if(score>-1000)// we found a move
{
swap(place, bottom);
return 1;
}
return 0; // once 0 is returned we no longer call order and assume list is fully sorted
}// end function order
thats not exactly how i do it and there may be more effecient ways to do it but its the idea.
it garantees two things, one a smooth transition from one move ordering scheme to the other
and two, no moves are played twice
Mike
Killer moves heuristic not working in my engine.
Moderator: Ras
-
- Posts: 626
- Joined: Sun May 13, 2007 9:55 pm
- Location: Bay Area, CA USA
- Full name: Mike Adams
-
- Posts: 290
- Joined: Mon Mar 13, 2006 5:23 pm
- Location: Québec
- Full name: Mathieu Pagé
Re: Killer moves heuristic not working in my engine.
Hi Mike (and others),adams161 wrote:one interesting stat to keep when debugging killer moves, is when you play a kilerr move have 2 counters, one is the number of times you play a killer move in search the other is the number of times this played killer move produces a beta cuttoff.
I.e if you might play 500 killer moves and get 100 beta cuttofs ( just making up the numbers ). if you see something funny, like your playing not X killer moves but some huge amount, thats a problem. if you are not getting any cuttoffs at all, thats a problem.
Mike
I just tried to extract the killer move success rate of my engine like you suggested. I get a sucess rate (killers that caused cutoff / killer tried) of about 45%. This seems low to me, even if I don't know what to expect.
What is an acceptable success rate?
Mathieu Pagé
mathieu@mathieupage.com
mathieu@mathieupage.com
-
- Posts: 626
- Joined: Sun May 13, 2007 9:55 pm
- Location: Bay Area, CA USA
- Full name: Mike Adams
Re: Killer moves heuristic not working in my engine.
you're not ordering captures as killers are you? you indicated you played captures before killers so not sure what would happen in your engine if killers could also be captures.
Mike
Mike
-
- Posts: 290
- Joined: Mon Mar 13, 2006 5:23 pm
- Location: Québec
- Full name: Mathieu Pagé
Re: Killer moves heuristic not working in my engine.
Hi Mike,
No, killers can't be captures or promotions, I test for this before I add a move to the killer list.
I'm begining to think that I have a serious bug in my engine making move that were good at a positions no longer good at an other. Now, I'm thinking about a way to "dump" the search to a file so I can examine what's going on at every nodes.
Thanks for your help,
No, killers can't be captures or promotions, I test for this before I add a move to the killer list.
I'm begining to think that I have a serious bug in my engine making move that were good at a positions no longer good at an other. Now, I'm thinking about a way to "dump" the search to a file so I can examine what's going on at every nodes.
Thanks for your help,
Mathieu Pagé
mathieu@mathieupage.com
mathieu@mathieupage.com
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: Killer moves heuristic not working in my engine.
Is killer tried counted for all nodes or only for nodes that fail high?mathmoi wrote:Hi Mike (and others),adams161 wrote:one interesting stat to keep when debugging killer moves, is when you play a kilerr move have 2 counters, one is the number of times you play a killer move in search the other is the number of times this played killer move produces a beta cuttoff.
I.e if you might play 500 killer moves and get 100 beta cuttofs ( just making up the numbers ). if you see something funny, like your playing not X killer moves but some huge amount, thats a problem. if you are not getting any cuttoffs at all, thats a problem.
Mike
I just tried to extract the killer move success rate of my engine like you suggested. I get a sucess rate (killers that caused cutoff / killer tried) of about 45%. This seems low to me, even if I don't know what to expect.
What is an acceptable success rate?
-
- Posts: 290
- Joined: Mon Mar 13, 2006 5:23 pm
- Location: Québec
- Full name: Mathieu Pagé
Re: Killer moves heuristic not working in my engine.
It's counted for all nodes. Are you telling me I should only count them for nodes that actually fail high in order to ignore All-nodes?jwes wrote:Is killer tried counted for all nodes or only for nodes that fail high?mathmoi wrote:Hi Mike (and others),adams161 wrote:one interesting stat to keep when debugging killer moves, is when you play a kilerr move have 2 counters, one is the number of times you play a killer move in search the other is the number of times this played killer move produces a beta cuttoff.
I.e if you might play 500 killer moves and get 100 beta cuttofs ( just making up the numbers ). if you see something funny, like your playing not X killer moves but some huge amount, thats a problem. if you are not getting any cuttoffs at all, thats a problem.
Mike
I just tried to extract the killer move success rate of my engine like you suggested. I get a sucess rate (killers that caused cutoff / killer tried) of about 45%. This seems low to me, even if I don't know what to expect.
What is an acceptable success rate?
Mathieu Pagé
mathieu@mathieupage.com
mathieu@mathieupage.com
-
- Posts: 2251
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: Killer moves heuristic not working in my engine.
I think 45% killer_cuts of killer_tried is quite fine, since one tries killers even at nodes, which turn out to be All-nodes (most often already expected), where no move fails high at all. If you pass expected node type as parameter of a zero window scout search of a PVS, you may also trymathmoi wrote:It's counted for all nodes. Are you telling me I should only count them for nodes that actually fail high in order to ignore All-nodes?jwes wrote:Is killer tried counted for all nodes or only for nodes that fail high?mathmoi wrote:Hi Mike (and others),
I just tried to extract the killer move success rate of my engine like you suggested. I get a sucess rate (killers that caused cutoff / killer tried) of about 45%. This seems low to me, even if I don't know what to expect.
What is an acceptable success rate?
killer_cuts[node_type] / killer_tried[node_type], with node_type {all, cut}
for a different image ...