Skip to content

Bradley C. Buchanan

Menu
  • Software Engineer
  • Manager
  • Game Designer
  • Vita
Menu

Good Enough Golfers

2018-02-172018-02-09

Four gentlemen golfers on the tee of a golf course

Twenty golfers wish to play in foursomes for 5 days. Is it possible for each golfer to play no more than once with any other golfer?

Find out for yourself.

This is known in mathematics as the Social Golfer Problem. Over Thanksgiving 2017, my dad posed a very similar problem: 28 students in discussion groups of size 4, rotated five times so that no two students are grouped together twice – with additional constraints restricting certain students from ever being grouped together. Puzzling over the problem together led us into the world of combinatorics.

It turns out the Social Golfer Problem (and the closely related Kirkman’s Schoolgirl Problem) are solved, but full generalizations of them are hard – even for computers. I went looking for an existing solution and couldn’t find one I was happy with. Dad assured me that it didn’t need to be perfect, just good enough for a teacher trying to organize a group. So I built my own:

Good-Enough Golfers is a near-solver for this class of scheduling problems. It attempts to schedule g x p players into g groups of size p for w weeks such that players meet a minimum number of times. Real solutions to this problem can be extremely slow, but GEG’s approximations are fast and often good enough for real-world purposes.

It’s also free and open-source.

2 thoughts on “Good Enough Golfers”

  1. Henrich Wilckens, Braunschweig, Germany says:
    2018-04-02 at 10:57 am

    Fantastic help for training weeks! Thank you so much! But: In real life there is an additional constraint: A single handicapper does not want to play with a beginner. Question: Could you put up a further constraint relating to handicaps, e.g. forming three handicap categories and asking the programme, to combine only golfers in the same handicap category or one under or above. So the first category of golfers would not play with the golfers of the third category. Second constraint (on one day only): No mixed flights Third constraint (on one day only): Couples play together, where possible. Thank you for your ideas

  2. Brad says:
    2018-04-06 at 8:42 am

    To be honest, I know nothing about golf so I wasn’t considering constraints like this – I was just trying to solve a more general version of the problem.

    The “couples play together” constraint is an interesting one. The other two could be created ad-hoc in the existing tool with pairwise blacklisting, but a feature to encourage players to be paired (or similarly, letting a “player” fill multiple seats) would be a new feature.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Work

  • ZSH git prompt workaround

    1 year ago
  • Back to School with Discord’s Whiteboard

    2 years ago
  • Discord Activities are on Mobile

    2 years ago
  • Good Enough Golfers update

    3 years ago
  • Leaving Code.org

    5 years ago

Play

  • Altered: Trial By Frost Prerelease

    4 months ago
  • Marginalia 2023-12-31

    1 year ago
  • IFComp 29 is open

    2 years ago
  • Discord Activities are on Mobile

    2 years ago
  • Esther’s: IFDB Awards

    2 years ago
RSS Feed

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2025 Bradley C. Buchanan | Powered by Minimalist Blog WordPress Theme