Miguel,
I've received several reports of Houdini not finding Gaviota tablebases when not all EGTB files are present. I've traced it down to the tb_availability() function not returning the correct value.
Three simple test cases:
1) EGTB folder contains only kqkr.gtb.cp4
=> tb_availability returns 1 instead of the correct 4.
2) EGTB folder contains kqkr.gtb.cp4 and kbk.gtb.cp4
=> tb_availability returns 3 instead of the correct 5.
3) EGTB folder contains kqkr.gtb.cp4, kbk.gtb.cp4 and kqpkq.gtb.cp4
=> tb_availability returns 7 instead of the correct 21.
Can you look into this problem?
Thanks,
Robert
For Miguel B: Gaviota tb_availability() sometimes incorrect
Moderator: Ras
-
- Posts: 1471
- Joined: Tue Mar 16, 2010 12:00 am
-
- Posts: 1471
- Joined: Tue Mar 16, 2010 12:00 am
Re: For Miguel B: Gaviota tb_availability() sometimes incorr
It appears the problem is in zipinfo_init:
should probably be:
Robert
Code: Select all
for (j = 0, z = 0, x = 3; x < 8; x++) {
if (partial[x]) z |= 1 << j++;
if (complet[x]) z |= 1 << j++;
}
Code: Select all
for (j = 0, z = 0, x = 3; x < 8; x++) {
if (partial[x]) z |= 1 << j;
j++;
if (complet[x]) z |= 1 << j;
j++;
}
-
- Posts: 6401
- Joined: Thu Mar 09, 2006 8:30 pm
- Location: Chicago, Illinois, USA
Re: For Miguel B: Gaviota tb_availability() sometimes incorr
I will take a look at it tonight.Houdini wrote:It appears the problem is in zipinfo_init:
should probably be:Code: Select all
for (j = 0, z = 0, x = 3; x < 8; x++) { if (partial[x]) z |= 1 << j++; if (complet[x]) z |= 1 << j++; }
RobertCode: Select all
for (j = 0, z = 0, x = 3; x < 8; x++) { if (partial[x]) z |= 1 << j; j++; if (complet[x]) z |= 1 << j; j++; }
Miguel
-
- Posts: 6401
- Joined: Thu Mar 09, 2006 8:30 pm
- Location: Chicago, Illinois, USA
Re: For Miguel B: Gaviota tb_availability() sometimes incorr
You are absolutely correct. Thanks!michiguel wrote:I will take a look at it tonight.Houdini wrote:It appears the problem is in zipinfo_init:
should probably be:Code: Select all
for (j = 0, z = 0, x = 3; x < 8; x++) { if (partial[x]) z |= 1 << j++; if (complet[x]) z |= 1 << j++; }
RobertCode: Select all
for (j = 0, z = 0, x = 3; x < 8; x++) { if (partial[x]) z |= 1 << j; j++; if (complet[x]) z |= 1 << j; j++; }
Miguel
Bug fixed and modified sources pushed to git hub.
https://github.com/michiguel/Gaviota-Tablebases
Miguel