Found the issue. Rather obvious actually... Since lists are mutable I change newPairings and bestPairings when doing pairings.pop() . My easyfix was to change newPairings = self.calculateTotalPenalty(newPairings)
to
newPairings = self.calculateTotalPenalty(newPairings).copy()
Annoying little bug.
I am trying to develop a swiss tournament pairing algorithm and I am essentially using a backtracking algorithm that gives a value for each terminal position based on how well it has matched the players. It seems to mostly be working but it will for some reason allow an empty pairing list with a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.