Weird little coder challenge to help me make a board game

Hi all,

I hope this help request is appropriate.
I’m making a board game and find myself in need of something a clever coder might be able to produce just as a quick sudoku-like exercise. So please ignore me unless you might enjoy such an exercise to help out a stranger. This isn’t for work or school, just a free time project.

I need a 10 x 10 grid of numbers (integers 0-9) such that

  1. Each integer appears once in each row, and once in each column (similar to sudoku)
  2. In the rows, each number appears before (left of) each other number 50% the time (5 times).

In other words, in 5 of the rows the number 1 will appear before the number 2 and in the other 5 rows, number 2 will appear before number 1.
The same 50/50 split of 5 rows will be true of every other number couple.

I don’t know how many solutions are possible, but the goal is to find one, if it exists.

Thank you thank you thank you, and sincere apologies if I broke protocol by flailing for help like this. :slight_smile:

I don’t understand what you want to do
A program that can solve the problem from a partially filled grid?
A program that can create a partially filled grid to make someone else play?
Or a program that would fill the grid from empty following those requirements?

The last one. A program that fills the grid from empty meeting those requirements.
And because I’m actually using the result rather than the program, all I require is any single solution grid.

If you’re curious what I’m using it for, abstracted out: Imagine a (up to) 10-player board game. In each round, some number of players get to act, in a random order. I’m creating ten tiles (the rows of the grid above) that when one is drawn, effectively randomizes who acts in what order, and makes sure that no one player has a consistent turn advantage over any other.

ps thanks for asking