This post has been edited by thatgoogleguy: 18 July 2011 - 08:39 AM
PHP Match Making Algorithm
Page 1 of 114 Replies - 1120 Views - Last Post: 02 August 2011 - 09:18 AM
#1
PHP Match Making Algorithm
Posted 18 July 2011 - 08:30 AM
Replies To: PHP Match Making Algorithm
#2
Re: PHP Match Making Algorithm
Posted 18 July 2011 - 08:44 AM
#3
Re: PHP Match Making Algorithm
Posted 18 July 2011 - 11:18 AM
#4
Re: PHP Match Making Algorithm
Posted 18 July 2011 - 01:43 PM
#5
Re: PHP Match Making Algorithm
Posted 18 July 2011 - 04:32 PM
1. Allow the user to specify some basics (i.e. gender, age range, location) - and require them to specify some part of that.
2. Query the table and pull all the user data for people that match the basics.
3. Parse through each result and generate a score for compatibility. ie. If you have some data that's ranked out of 10, for example, an exact match to a question is +10. For every point n away from an exact match, you add 10-n to the score. Hence, if my answer to a question was an 8 (Like, "On a scale of 1 to 10, how much do you like to drink beer?") and your answer was a 5, you would add 7 to the total compatibility score. Similarly, if your answer had been an 8 too, you would add 10 to the compatibility score.
4. Sort your results by highest compatibility score.
Now, if you have large data sets, like thousands and thousands of users, this would be extremely slow. There are a lot of things you could do to correct for that, like building tolerances into your query so you're only pulling things that are 1 or two points away from the users answers to things. You could also probably do some analysis to optimize your queries once you have some data and then build in some probability models to increase speed (ie. 90% of people who answer 8 on this question also answer 5 on this other question).
#6
Re: PHP Match Making Algorithm
Posted 01 August 2011 - 03:19 PM
#7
Re: PHP Match Making Algorithm
Posted 01 August 2011 - 05:53 PM
#8
Re: PHP Match Making Algorithm
Posted 01 August 2011 - 06:16 PM
#9
Re: PHP Match Making Algorithm
Posted 01 August 2011 - 06:24 PM
If someone rates beer a possible 7 out of 10 and wine a 9 out of 10 that gives you a total of 16 out of 20. That's 80% when it comes to drinks. If another scored 9 for beer and 6 for wine then you got 75%. They're fairly compatible there.
#10
Re: PHP Match Making Algorithm
Posted 01 August 2011 - 07:19 PM
#11
Re: PHP Match Making Algorithm
Posted 01 August 2011 - 07:23 PM
#12
Re: PHP Match Making Algorithm
Posted 01 August 2011 - 07:34 PM
#13
Re: PHP Match Making Algorithm
Posted 01 August 2011 - 10:16 PM
#14
Re: PHP Match Making Algorithm
Posted 02 August 2011 - 09:12 AM
#15
Re: PHP Match Making Algorithm
Posted 02 August 2011 - 09:18 AM
Quote
Those algorithms are more advanced though. A good definition of an algorithm I like is "a finite sequence of steps that produces a specific result." The algorithm for this shouldn't require the 3000 and 4000 level CS classes.
|
|

New Topic/Question
Reply



MultiQuote












|