Computer Chess Club Archives


Search

Terms

Messages

Subject: Round Robin formula needed ! Help !!

Author: Matthias Gemuh

Date: 08:07:39 12/26/05



nEng = number of engines
int nTeams[2*nEng], nPairing[nEng][nEng], k, x, y, nNr=0;

    for (int t = 0; t < nEng; t++) {
        for (int i = 0; i < nEng; i++) {
            x = nTeams[i]; y = nTeams[i+nEng];
            if (x == y) continue;
            if (nPairing[x][y] == 0) nPairing[x][y] = nPairing[y][x] = nNr++;
        }
        k = nTeams[0]; for (int j = 0; j < nEng; j++) nTeams[j-1] = nTeams[j];
nTeams[nEng-1] = k;
    }


I figured out this algo above, but it is not perfect.
Please, give me the perfect algorithm.

Thanks,
Matthias.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.