LuckPicker

Tool

Seating Chart Randomizer

Fill a grid of seats at random, with keep-apart rules for the pairs that cause trouble.

Seating Chart Randomizer

0 people into 20 seats

Fill a grid of seats at random, while keeping named pairs out of each other's neighbourhood. Set the room dimensions, paste the people, list the pairs who cause trouble, and generate.

In most seating problems the constraints do nearly all the work and the randomness fills the gaps. That is the opposite of the usual balance on this site, and it changes what the tool has to be good at: not the quality of the draw, but the honesty of the search.

Adjacency here means touching, including diagonally — a keep-apart pair will not be placed in neighbouring seats in any direction.

How the Seating Chart Randomizer works — and why it's fair

People are padded with empty seats to fill the grid, shuffled uniformly, and laid out row by row. The arrangement is then checked against every keep-apart rule: for each pair, the tool computes both seats' row and column and rejects the arrangement if they differ by no more than one in both dimensions. That is eight-way adjacency, which is what people mean by 'sitting near'.

The search is randomised restart over up to three thousand shuffles. That works well for a realistic classroom — a handful of rules over twenty seats is satisfied by most arrangements, so a valid one appears almost immediately — and it degrades honestly rather than gracefully as constraints tighten: a rule set that needs a thousand attempts is one that is nearly infeasible, and one that needs three thousand and one gets a refusal.

Refusing is the correct behaviour and the reason this is not a solver. A constraint solver would find an arrangement in a case where random restart gives up, and it would also produce the same arrangement every time, which is exactly what a seating randomiser must not do. The trade is deliberate: random restart is genuinely random when it succeeds, and honest when it fails.

Empty seats are placed as part of the shuffle rather than pushed to the end. That means a class of eighteen in a twenty-seat room gets two gaps somewhere in the grid rather than two gaps in the back corner, which produces a more usable layout and, incidentally, gives keep-apart pairs more room to satisfy.

The tool cannot pin anyone. Every seat is randomised, so a student who must sit at the front for a hearing or sight reason cannot be fixed there — which is a genuine limitation for classroom use and is why the classroom seating plan page recommends fixing those seats by hand first and randomising the rest.

The grid is rendered as an actual grid with the front of the room at the top, because a seating plan that has to be mentally transposed is a seating plan nobody uses twice.

When the Seating Chart Randomizer is fair — and when it is not

What it does guarantee

  • Every arrangement satisfying all your keep-apart rules is reachable, since each attempt starts from a fresh uniform shuffle.
  • Keep-apart is enforced in all eight directions, including diagonals, not just left and right.
  • Empty seats are distributed by the shuffle rather than swept to the end of the grid.

What it does not

  • There is no way to pin a person to a seat, which rules out fixed-position needs like sight lines or hearing.
  • Random restart gives up after three thousand attempts. A feasible but very tight rule set may be refused.
  • It has no notion of who should sit near whom — only of who should not.

Two worked examples

18 people, 4×5 grid, two keep-apart pairs

  • 20 seats, so two are left empty and distributed anywhere in the grid.
  • Most shuffles satisfy two pairs immediately; a valid arrangement typically appears on the first or second attempt.
  • Each keep-apart pair is checked against all eight neighbouring seats.

20 people, 4×5 grid, six keep-apart pairs

  • No empty seats, so every position is occupied and the rules are much harder to satisfy.
  • Attempts run into the hundreds, and some rule sets are refused after 3,000.
  • Adding a row — 5×5 with five gaps — usually makes the same rule set solvable at once.

Rooms where the rules matter more than the draw

Exam and test seating is the cleanest fit, because the whole point is that no student can predict where they will sit and specific pairs must be separated. Neither of those is served by a fixed plan, and both are served by a randomised one with rules.

Wedding and event tables run the same operation with different vocabulary: the keep-apart list is short, non-negotiable, and known to exactly one person. Randomising the rest turns a two-hour job into a two-minute one.

Workshops and training rooms use it to break up the groups people arrive in, which is the actual reason for randomising there. Colleagues who came together will sit together unless something prevents it, and a random plan with a few keep-apart rules does that without anyone having to say why.

For rotating an existing seating plan so nobody keeps their seat, the random seat rotation tool solves that different problem with a derangement. For splitting people into groups rather than seating them, the team generator and group role assigner are the right tools.

Frequently asked questions

Does keep-apart include diagonal neighbours?

Yes. Adjacency is checked in all eight directions, because sitting diagonally behind someone is sitting near them.

Can I fix a particular person in a particular seat?

No, and that is a real limitation. For sight-line or hearing needs, assign those seats by hand and randomise the remainder separately.

Why did it fail when a valid plan clearly exists?

Because it uses randomised restart rather than a solver. After three thousand shuffles it refuses rather than searching exhaustively — which is the price of the result being genuinely random when it succeeds.

Where do the empty seats go?

Anywhere. They are shuffled in with the people rather than pushed to the back, which produces a more usable layout and helps satisfy keep-apart rules.

Which end is the front of the room?

The top row. The grid renders in the orientation you would stand in, so it does not need transposing in your head.

Can I say two people must sit together?

No, only apart. A must-sit-together rule is better handled by treating the pair as one unit and placing them manually.

How many keep-apart rules can it take?

As many as you list, but each one makes the search harder. Past about one rule per three seats you should expect refusals.

Does it remember last week's plan?

No. Every generation is independent, so someone can end up in the same seat two weeks running.

What if I have more people than seats?

The tool says so and will not generate. Add rows or seats per row until the grid is big enough.

← Back to all tools