Optimizing brackets for a tournament

送分小仙女□ 提交于 2019-12-11 01:03:37

问题


I'm building a system that will create a tournament based on a list of contenders.

Contenders have properties that might make them not able to be placed in brackets with eachother, such as gender, weight, skill level, etc.

In some cases this gets pretty complex:

  • contender may go up one weight class, but never down
  • Genders may be mixed under a certain age.

What would be a good way to get these people into optimal brackets (for instance, sizes of 4, 8, 16)? Is there a known algorithm for this without trying all permutations?


回答1:


This is called a constraint satisfaction problem (CSP). One of the simplest and in many cases most effective way of solving it is by brute-force search with backtracking.

There are some good heuristic guidelines to follow though when assigning values.

The minimum remaining value (MRV) heuristic says that when deciding which spot in the bracket to assign next, pick the one with the fewest people that could possibly be assigned to it.

The least constraining value (LCV) heuristic says that when assigning a person to a spot, you should pick the person that would rule out the fewest choices.

AIMA has an excellent chapter on CSPs: http://aima.cs.berkeley.edu/newchap05.pdf



来源:https://stackoverflow.com/questions/9759690/optimizing-brackets-for-a-tournament

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!