Quote:
Originally Posted by SteveGPage
Can you share the algorithm that you used to do the match predictions? Thanks!
Best regards,
Steve
|
For the strength of team T, find all the matches played by team T (set B), find all the teams they played against or with (set C), and all the matches they played (set D), then find the average of their score minus opponents score (set E). Subtract the team T's average match score minus opponents score.
I have refined it several times over the last year, but that is how it works more or less. It also assumes that each team has an equal chance of competing against each other, which was not the case, as rookie teams always played with better teams boosting their score, and in a few cases the same alliance played together, It still fared very good however.
Let me try explaining another way: It takes into account the scores of your opponents and allies.
This is the exact SQL query used to find the strength for each team:
Code:
SELECT
ROUND(AVG(IF(b.teamnum=c.teamnum ,2,-1)*IF(d.alliance="red",e.redscore-e.bluescore,e.bluescore-e.redscore)*IF(b.alliance=c.alliance,1,-1))*100) AS score2
FROM team_match b JOIN team_match c JOIN team_match d JOIN matches e
ON (b.matchid=c.matchid)
AND (d.teamnum=c.teamnum AND d.matchid!=b.matchid)
AND (d.matchid=e.matchid)
GROUP BY q.teamnum
This is in pages/strength.act.strength_2.php .
This is how I get the team strengths. Match predicting is a new area for me, I implemented it just a few month ago.
For matches, I found that the sum of the teams strengths on the target alliance, minus the sum of the opponent's alliance, works well enough.
I can calculate the chance a team will win with a
cumulative logistic distribution, who's parent function is f(x) = 1/(1+e^(-x)).
My most recent tests show it is only 80% to 85% accurate, based on how I add the strengths together (add the square roots, etc). I don't really care too much, it isn't the most important part of the program.