1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33:09 +00:00

Better document bitbase loop

Thanks to Lucas to spot the weak comment and
to Jundery to suggest a better one.

No functional change.
This commit is contained in:
Marco Costalba 2013-03-19 19:08:00 +01:00
parent 52f3e717fa
commit 077e32efc9

View file

@ -89,7 +89,8 @@ void Bitbases::init_kpk() {
for (idx = 0; idx < IndexMax; idx++) for (idx = 0; idx < IndexMax; idx++)
db[idx].classify_leaf(idx); db[idx].classify_leaf(idx);
// Iterate until all positions are classified (15 cycles needed) // Iterate through the positions until no more of the unknown positions can be
// changed to either wins or draws (15 cycles needed).
while (repeat) while (repeat)
for (repeat = idx = 0; idx < IndexMax; idx++) for (repeat = idx = 0; idx < IndexMax; idx++)
if (db[idx] == UNKNOWN && db[idx].classify(db) != UNKNOWN) if (db[idx] == UNKNOWN && db[idx].classify(db) != UNKNOWN)