Visualisation of results produced by the Group Formation Algorithm

What it does

Forming teams for a few hundred campers becomes challenging when the goal is more than simply creating groups of equal size. Participants have different levels of skills such as leadership, Bible knowledge, creativity, acting, and musical ability, while factors such as country, gender, and individual grouping requirements also need to be considered.

The project approaches group formation as a mixed-integer optimisation problem. Participant data is prepared using pandas, while the rules for team formation are translated into mathematical constraints and optimisation objectives. Gurobi is then used to find an assignment that satisfies the required constraints while producing teams that are as balanced as possible across the selected criteria.

The model also supports relationship constraints. Some participants may need to be placed together, such as a parent and child or a first-time camper who needs someone familiar, while others may need to be separated to encourage interaction with new people. This allows practical and social requirements to be incorporated directly into the optimisation model.

Why I built it

Team formation for the annual camp was traditionally performed manually, requiring organisers to spend significant time comparing participants and repeatedly adjusting teams to achieve a reasonable balance.

The project explores whether mathematical optimisation can make this process faster, more consistent, and easier to reason about by translating the organisers’ definition of a balanced team into explicit constraints and objectives.


What I built

  • Designed and formulated the group formation problem as a mixed-integer optimisation model
  • Translated real-world requirements into mathematical constraints and optimisation objectives
  • Implemented the optimisation model in Python using Gurobi
  • Built the data-processing pipeline for participant attributes, skills, and grouping constraints using pandas
  • Modelled must-be-together and must-be-separated relationships between participants
  • Evaluated the generated teams against the defined balance and fairness criteria
  • Documented the design, implementation, evaluation, and results as part of my bachelor’s thesis

Technical challenges

  • Defining what a "fair" team means mathematically. Skills, demographics, team sizes, and relationship constraints all have to be considered without allowing one criterion to dominate the others.
  • Translating human requirements into mathematical constraints. Rules such as keeping a parent and child together or separating certain participants need to be represented precisely enough for an optimisation solver to understand them.
  • Managing conflicting constraints. Individually reasonable requirements can interact in ways that make an assignment difficult or impossible, requiring careful modelling and validation.
  • Keeping the optimisation problem computationally manageable as the number of participants, teams, skills, and constraints increases.

Results

  • Developed a working optimisation-based algorithm for automatically assigning campers to balanced teams
  • Reduced a largely manual group formation process to a reproducible optimisation problem
  • Supported skill balancing alongside practical must-be-together and must-be-separated constraints
  • Used the algorithm to generate team allocations for the annual church camp
  • Completed and submitted the project as my bachelor’s thesis

More projects

All projects
  • The church camp website home page shown on a laptop
    Personal Live

    Church Camp Website

    Full stack web application

    A full stack web application where campers sign in and pay their camp fees online, with payments handled through the Nets Easy API.

    • React
    • JavaScript
    • Supabase
    • Playwright
    • Nets Easy API
    View project
  • Custom-built autonomous Connect Four robot with a motorised carriage and disc dispenser
    Academic Completed

    Autonomous Connect Four Robot

    Robotics, embedded systems & mechanical design

    Designed and built a physical Connect Four robot that detects a human player's moves, chooses its own response, and autonomously positions and dispenses game pieces.

    • C++
    • Arduino
    • Fusion 360
    • 3D
    View project
  • The Sukkermap interactive school map interface
    Academic Completed

    Sukkermap

    Map navigation website

    An interactive indoor map that helps students at a Danish gymnasium find their way around the school, built as a co-developer.

    • JavaScript
    • HTML & CSS
    • p5.js
    View project