In our office, we regularly conduct several rounds of football / foosball after work. I put together a small java program that generates 2vs2 random lists from available players and then saves the matching results in a database.
The current score prediction uses the simple average of all previous match results from the 4 players involved. This gives a very rough estimate, but I would like to replace it with something more complex, taking into account such things as:
- players can play well as attackers, but poorly as a defender (or vice versa)
- players succeed against a specific opponent / bad against others.
- some teams work well together, others don't
- skills change over time
What will be the best algorithm for predicting the outcome of the game as accurately as possible?
Someone suggested using a neural network for this, which sounds pretty interesting ... but I donβt have enough knowledge on this topic to say if this can work, and I also suspect that too many games may be required for reasonable preparation.
EDIT:
Had to take a longer break in this due to some project deadlines. To clarify the question:
Given the following mysql table containing all the matches that have been 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 the predResult function (blueDef, blueAtk, redDef, redAtk) {...}
evaluate results as close as possible, execute any sql, do calculations or use external libraries?
source share