I am currently working on my evaluation function and wanted to copy the approach used by Scan and other programs. I use regions of the size 4x4 and need a good index function.
Currently, I use a base 5 index function which seems utterly wasteful.
(PseudoCode)
Code: Select all
for(uint32_t i=0;i<8;++i){
uint32_t maske =1<<(i+shift);
if((maske&(bp&k))==maske){
index+=factor*4;
}else if((maske&(wp&k))==maske){
index+=factor*3;
}else if((maske&(bp))==maske){
index+=factor*2;
}else if((maske&(wp))==maske){
index+=factor*1;
}else{
index+=factor*0;
}
factor*=5;
}
}
What index function are u using and could you explain why your index function works