Pair Matching Algorithm

I am working on a rails application that requires constant user matching. In principle, I need an algorithm that will take a list of users as its list and return a list of pairs that are best suited. Users are considered good matches by criteria that have more common interests or distances between them. In general, I should be able to tune in what is considered a “good match,” but I just need a direction to lead the algorithm that will take a set of users and return a set of pairs.

If this helps, I have a method in the user model that takes another user as a parameter and returns an estimate of how good it is. I need help to use this in mass matching.

I plan for users to enter the table, and then the cron job going through the list so often to find the best match pairs between all. Does anyone have any ideas?

Many thanks!

+3
source share
1 answer

Jack Edmond 's algorithm finds the maximum weight match in the overall (non-bipartite) graph.

Vladimir Kolmogorov has a document and implementation in C ++.


: , , -, , ? . ..

+6

Source: https://habr.com/ru/post/1781633/


All Articles