Sign in to follow this  
edinzp

Questions for simulating the football match results.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Many of the simpler games produce results only and very simplified highlights. But football manager allows you yo watch every move in the match.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
I think you should use stats and then calculate wich team has the odds to win+the motivation of the team and the team with better stats and a better motivation should win yea you cant even come close to fm 2006

Share this post


Link to post
Share on other sites
Obviously, in a perfect world, you'd simulate the whole match like FM 2006. However, this is really really out of league for a web game like yours, so you'll have to come up with something simpler. One problem with the "take the result and build the game scenes around it"-approach is that it becomes rather meaningless, at least as soon as the player realizes this. In the end, it'd still be down to a game of numbers, as all you could do with your decisions would be to optimize your number. It is hard to get around, but it has totally destroyed more than one manager game for me.

What might be worth a try would be using text for description of the matches. You could have chances, and depending of the skill of the player with the ball and other players interacting with him, his skills would actually mean something. For example, say we had randomly decided that Player A who has the ball is tackled by player Y, then you could now compare the attributes of these players and determine the odds of each player winning and go from there. It might still become quite complex, depending on how much variation you want in the game, but I think it might be more interesting. I think there is actually a (german) web football manager which does it like this, but I can't remember the name right now.

I think this is a pretty good compromise between the two, because it still offers the possibility of actually creating meaningful situations without having to simulate all of it. It is still pretty complicated, though, so depending on how complex you want the game to be, it might be too much.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this