Questions for simulating the football match results.

Started by
10 comments, last by Wuntvor 18 years, 4 months ago
I am about to set up a web-game of football, but now I am troubled with the simluations of the match results. I have two questions: 1. Which AI algorithms should I choose for the simluating operations? 2. Considering the in-game datas need to be updated weekly (transfers, injuries etc), so the database becomes a lot bigger after days of running/playing, this will affect the running speed of the game. How could I optimize my programme to prevent this kind of events occur. Thanks
Advertisement
Quote:
1. Which AI algorithms should I choose for the simluating operations?


I assume we're talking about a "Football manager"-kind-of-a-game? If so, you should probably not even consider simulating the entire matches with AI, but instead just look at some statistics. I'll suggest you to pick up a good book on statistics and probability, if you're not already a master on the subject :)

First of all I'll suggest you to analyze data from real football matches (from the level you expect the game to run at - i.e. there's usually more goals in a women amateur league than in the UEFA cup :P). Find out how many goals there should be (statistically), how many injuries, how many red cards, etc etc. With these (hopefully normal distributed) data sets at hand, you have something you can adjust your random match result generation code against. How much influence the various properties of each team should have, is entirely up to the tweaking.
And yes, there's going to be lots of tweaking to get it right :)
(the more complex you'll make the match result code, the more tweaking (and problems) it will require... keep it as simple as possible while still having some degree of realism)

Quote:
2. Considering the in-game datas need to be updated weekly (transfers, injuries etc), so the database becomes a lot bigger after days of running/playing, this will affect the running speed of the game. How could I optimize my programme to prevent this kind of events occur.


I don't think it will be a problem for any modern database system (mysql, etc). As long as you don't rely on real-time access to the data :)

Good luck.

-- Rasmus Neckelmann
1. To get you started... you'll have some data for each player within the team. After considering health, fitness, injuries, you'll get an overall attack/defence score for the team. And then have fun with the probabilities as suggested above :)

2. Make sure you spend some time on a good design. Identify data that is relevant for the future and data that can be discarded.
Surely it can't even be in this realm of simplicity for Football Manager, the whole match is simulated.

Dave
You could do it this simply and nobody could tell! But do modern manager games let you watch the game being played?
Quote:Original post by Dave
Surely it can't even be in this realm of simplicity for Football Manager,

Dave


I wouldn't exactly say it was simple, but yes, this is the way it's done.

Generally the match replays are forced to fit into the predicted score. E.g. if it's 2-1, you set up a couple of goals for one side, and a single goal for another. Add in a few penalties, corners and tackles (again taken from the match prediction) and you have your match highlights.

[Edited by - OldDev on November 28, 2005 8:41:11 AM]
You could do it more complex. Instead of feeding the statistics in a learned scheme that returns the result of a game, you can feed the statistics into a learning scheme that will return you the result of a play. This would allow in-match managing decisions.
I think I played such a game once in my life, and that was like what... 10 years ago? But I can't remember if they showed some sort of game being played. Since he was talking about a web-based game I didn't think edinzp would want to show the game. On the other hand, I've played a Quake clone within the browser, so I guess if you wanted to, you could do it.

I suggest going with OldDev's approach. Since a manager surely doesn't interfere that much during the actual game.
Many of the simpler games produce results only and very simplified highlights. But football manager allows you yo watch every move in the match.
So which is desired here?

As far as just a data-based statistical approach goes, you can make this pretty complex. Ie 2 teams have a rivalry which increases the chance of nasty fouls.
Or two players have a rivalry. These things can build up over time so for instance team X has won the last 15 matches against team Y - giving them extra advanage than the team-sheets would suggest.

This topic is closed to new replies.

Advertisement