Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Foosball result prediction

In our office, we regularly enjoy some rounds of foosball / table football after work. I have put together a small java program that generates random 2vs2 lineups from the available players and stores the match results in a database afterwards.

The current prediction of the outcome uses a simple average of all previous match results from the 4 involved players. This gives a very rough estimation, but I'd like to replace it with something more sophisticated, taking into account things like:

  • players may be good playing as attacker but bad as defender (or vice versa)
  • players do well against a specific opponent / bad against others
  • some teams work well together, others don't
  • skills change over time

What would be the best algorithm to predict the game outcome as accurately as possible?

Someone suggested using a neural network for this, which sounds quite interesting... but I do not have enough knowledge on the topic to say if that could work, and I also suspect it might take too many games to be reasonably trained.

EDIT:
Had to take a longer break from this due to some project deadlines. To make the question more specific:

Given the following mysql table containing all matches played so far:

table match_result

match_id      int pk
match_start   datetime
duration      int (match length in seconds)
blue_defense  int fk to table player
blue_attack   int fk to table player
red_defense   int fk to table player
red_attack    int fk to table player
score_blue    int
score_red     int

How would you write a function predictResult(blueDef, blueAtk, redDef, redAtk) {...}
to estimate the outcome as closely as possible, executing any sql, doing calculations or using external libraries?

like image 865
Wolf Avatar asked Nov 04 '08 13:11

Wolf


People also ask

How do you predict on Superpicks?

Play For Free To successfully join a Predictor contest, you need to enter what you think the scores will be for the 6 matches on offer. If you get the scores 100% correct, you stand the chance to win N50 million. Pro tip: You need to predict what you think the score will be at the end of 90 minutes.


3 Answers

Use the TrueSkill algorithm, it is very good at this. I've implemented it for foosball and chess and it works very well. Coworkers have told me that it's almost too good at this.

For complete details on how it works as well as a link to my implementation, see my "Computing Your Skill" blog post.

like image 186
Jeff Moser Avatar answered Oct 18 '22 16:10

Jeff Moser


Why use a neuralnet? Use statistics, probably the correlation between each player would be good measure.

like image 2
leppie Avatar answered Oct 18 '22 17:10

leppie


Just to start let's gather some information: For a given player we need:

  1. the position they played
  2. the final score

A good attacker will rack up points. A good defender will prevents points from being scored.

The real info will be from a good attacker playing against a good defender.

like image 1
Robert Avatar answered Oct 18 '22 18:10

Robert