How to seat everyone in science and not turn the office into a hotbed of hatred
Sooner or later in the life of most teams he comes - moving. You are led into a clean, empty room, which will become a place where you will spend most of your life. If you are a designer, then the first thing you will think about is how to hang up the pictures and put the flowers in order to make the room sparkle with new colors. If you are an experienced office samurai, then with a trained eye, determine the best place and first claim it. If you are the head of the department, then you will probably have a headache about the seating of all employees. But if at the same time you are leading a team of data scientists, then the Python
Of course, everything determines your management style. If you prefer authoritarian decisions, you can simply point out with an imperious finger where everyone should go. And it doesn’t matter if someone resists to sit facing the wall or to each other. However, since the abolition of serfdom in 1861, such a style has steadily lost popularity in our country. And if you are still concerned about the comfort of employees, then it is worth collecting and somehow taking into account their preferences. But here the devil creeps up, the one who is in the details: how to assemble, how to take into account, who to give preference to, etc.
In view of the many years of experience in organizing competitions for schoolchildren, where equality of conditions is one of the main priorities, I was determined to create transparent and understandable mechanisms in which more experienced or faster employees do not get any advantages.
You will not please everyone, or still ...?
We make the premise that employees may have seating preferences and want to minimize potential discontent. That is, it is necessary to organize a system of distribution of seats so that some employees, acting in an optimal way for themselves, do not enter into a clear conflict with others. The strategy of "who first got up and slippers" obviously does not lead to this goal. If one determines a certain order of choice (for example, on the basis of merit), then the task is still not solved - a person who chooses before, but who is relatively indifferent, may accidentally take the place chosen by others. Not to mention that such an order is a controversial thing in itself.
We chose the type of voting in which everyone’s vote depends on how the others voted: if a person more or less doesn’t care which of the two places to sit, then the optimal strategy is to pretend where there are fewer competitors.
Our path to perfect seating
The first step was to determine where you can generally sit down. Here the task was for everyone, because everyone was interested in making as many convenient places as possible - after all, in this case the competition is decreasing. We made a map and carried out explanatory work “among the population”, promoting each place as ideal.
In an ideal world, it would be necessary for everyone to give preference points to each of the places, but it is difficult for a person to evaluate to hundredths how one place differs from another.
Therefore, everyone was asked to choose priority lists, the number of which is not limited at all: which places he would like to take in the first place, which ones in the second, and which in the third.
It should be noted that the logic of preferences among employees was very different: someone wanted to be closer to the window, someone wanted to look out the window, someone was important for their proximity to the air conditioner and even the color of the walls. It is difficult to take into account preferences themselves, here you can only give people the opportunity to choose a place.
Next, it was necessary to determine the metric of the success of the arrangement. The more uncomfortable a person sits, the more such a model should be fined. I decided to make a square penalty to avoid glaring inconvenience.
It turned out like this: if a person was put in place from his TOP-1 list, then a fine of 2; if from the list of TOP-2 - a fine of 4, TOP-3 - 8, TOP-4 - 16 and so on. I do not claim that this metric is optimal, but it looks reasonable.
I wrote a simple Python program- Priorities from colleagues are introduced into it, and it calculates the placement options with a minimum penalty. The algorithm was announced to colleagues in advance (how naive I was!). The lists were all published openly, in order to be able to agree if desired.
However, after seeing the calculations, some employees realized that you can try to pick up your "application" to get the desired place. Datasientists are such datasientists! :)
As a result, a second round of elections was organized, when it was possible to make changes to their priorities closed. Thus, all were again in equal conditions - everyone could select and make changes.
Having collected applications from the second round, I ran the program already for the final time. Fufh! It seems everyone is happy.
Instead of PS
It is worth noting that there were not taken into account the wishes regarding the proximity of employees to each other. But in this paradigm, it is also quite simple to implement them by creating wish lists (who wants to sit next to whom and which places are nearby, according to these employees), and then fine the model for not fulfilling these wishes.
Of course, the option is always possible when two arrangements have the same penalty.
In this case, I have already decided to rely on a coin - optimization is powerless further :).
Nikolay Knyazev, Head of the Jet Infosystems Machine Learning Group
Code on GitHub