[Simulation Engine] simeng.txt research

Resources for NBA Live 07.

[Simulation Engine] simeng.txt research

Postby Chris_23 on Mon Nov 27, 2006 1:38 pm

Alright I started researching into ways to get the simulated stats not realistic in specific individual scale (like trying to get Nash to lead in assists), but in varied individual scale (aka getting leaders averages match that of real leagues).

I started up with a suggestion I received in my dynasty thread about a Primacy fix Mark did. I can assure you that it is indeed one of the ways to increase points for guards and leaders and should be used. I tweaked it a bit myself and added fatigue capping (so that every player would get fatigued at least a bit in game), but overall you can use Mark's version for the time being.

Anyways, about simeng.txt. I was surprised when I did not see nearly any threads about the Simulation Engine. I studied how it works to find a way to get it working and am still long ways before actually releasing anything, but I'll share some information here you can use.

Firstly, the way NBA Live 07 simulates games is not through play by play. It is, in fact, directly through using data in simeng.txt using in-game algorithms for the result. simeng.txt has -nothing- to do with players individual averages.

This means that you cannot increase Steve Nash assists per game by tweaking simeng.txt. You can, however, increase Phoenix Suns assists per game. How many of those are by Steve Nash depends purely upon his minutes per game, his passing and offensive awareness, and the amount of other good passers in the team (who would share the Phoenix Suns total assists).

Also, the simengine matrixes (the integer and float number, aka {45, 0.30}) are about teams perfomance. I did not find a specific stat they depend on, however it had something to do with field goal percentages. The lower integer values were lower shooting perfomances and higher values were better shooting teams (but it is not only about shooting percentage, since I could not single out one value, just a vague value and it's clear that shooting is involved).

The higher values, like the 99 integer value, probably means a really good shooting perfomance (not 99% mind you, it's scaled between two hardcored values I imagine, or is dependant on another matrix in simeng.txt).

Values behind integer signify how many assists will the team score in game. You can scale it depending on how well does the team do. higher integer means more team assists in game, lower values mean less team assists. Good average was around 0.66f (the f means float value). Yes, you can fix the simulated assists issue by sharing out all assists in such manner, but it's in fact a curve (thus why a float value) and not linear. Setting all values the same won't bring the desired result (and would in fact make it so that there's no exceptional game in assists by any team ever)

What the game does is it calculates first the points flow (without calculating who makes the shot, it's not a play by play calculation to save speed), depending on team perfomance, it changes lineups (depending on simeng.txt values). Then it gets a result.

After that it basically generates stats for players. Assists are calculated, blocks, rebounds, fouls, steals, turnovers, shots etc. They are not taken into account before the result itself is clear in every quarter. simeng.txt seems to take the value and apply it to the -whole- team, and then based on player ratings and randomizer value the assists and other stats are shared across the team.

This means that you can't make Steve Nash score more just by tweaking simeng.txt. You -can- however make Suns assist more, but to make Nash do it more means having to lessen the passing and offensive awareness on other players in his team (unless you want the Suns average way too many assists per game).

I am going to research into this more but I hope the firsthand information clears something up to those wishing to edit the file. After that I'll compile a dynasty focused patch that includes edited fatigue/primacy fix along with simengine.txt. Don't hope for something amazing from it, I won't bother tweaking rosters and player ratings so that players do exactly what they do in the league, but will try to get assists, blocks, steals and so on leaders average similarly to what leaders average in the league. The rest is dependant on ratings and not simeng.txt.

Anyways, just a heads up here, hopefully this information was useful for someone.
User avatar
Chris_23
 
Posts: 617
Joined: Tue Jan 11, 2005 10:32 am
Location: Somewhere

Postby Patr1ck on Mon Nov 27, 2006 3:18 pm

Here's some more info. I will use the word rating, but as Chris 23 poitned out, they do not have anything directly to do with a players rating. I believe they are more of a "chance" followed by a probabilty value. In the simeng.txt, say you have this value for assists {30, 0.50f}. In my theory, if the game calculates a 30% chance of an assist, then the team has a .5 probability of getting an assist. The probability is relative to ratings, it is not a percentage. Again, this is just a theory.

You can actually add new float values. For instance, the values for assists go from 10 to 60 by 5, 10, 15, 25, etc. Then 60 goes to 70, to 80, and then to 99. You can actually add any number you want inbetween. I added 65, 75, 85, 90 and 95 along with float some increasing float values and got alot better results. What this does is make the curve bigger, so you can make broader changes. You can do the same for all the values.

The most important thing is the overall ratio of each . If you just increase every value, all the assists will go up for evey player and team. Thats why when I did this, the best team was averaging just uner 40 assists. By adding up the values, and keeping the sum of all the values the same after making your changes, you will get better ratios for each team's assists/game. By sticking to this, the best team was averaging just above 30 assists, while the worst team was averaging about 10, and most of the other teams were inbetween 30 and 15 assists/game.

That maybe too much of a change. I think if we can get the league leaders with around 9+ assists/game while keeping the team stats realistic, I'd be happy, not sure about the rest of the people. I would like to get the point leaders into the high twenties or maybe even into the low thirties.
Patr1ck
Administrator
Administrator
 
Posts: 13335
Joined: Thu May 19, 2005 5:54 pm
Location: Pasadena, California, US

Postby NastyNacho1 on Mon Nov 27, 2006 3:37 pm

I honestly have no gripes with the Sim Eng this year after using my 5 Min AIACT mod and my Roster and Team.dbf Tweaks i find great results when putting all PGs on 0 Primacy and putting players like Garnett and Lebron on 99 Primacy and keeping all other players under 50 Primacy

My one gripe is that while playing CPU the CPU does not recognize that I am using 5 minutes instead of 12 minute quarters and therefore not making subs realistic I am using the patch for US and Subs on 100 for both User and CPU but no luck I do believe the AI in 2006 would adjust its Sub algorithms according to the Minutes set

Overall wothout NLSC this game would be a disaster I do give them credit for the ease of mods almost all involve placing files in to the folder SGSM and thats it
Big Ups to the NLSC (Y)
Image
User avatar
NastyNacho1
 
Posts: 410
Joined: Wed Oct 11, 2006 5:49 am
Location: Dark Side of the Moon

Postby Chris_23 on Mon Nov 27, 2006 3:45 pm

Here's some more info. I will use the word rating, but as Chris 23 poitned out, they do not have anything directly to do with a players rating. I believe they are more of a "chance" followed by a probabilty value. In the simeng.txt, say you have this value for assists {30, 0.50f}. In my theory, if the game calculates a 30% chance of an assist, then the team has a .5 probability of getting an assist. The probability is relative to ratings, it is not a percentage. Again, this is just a theory.


No, read again what I explained. Once a team meets the 30 condition, it gets 0.5f of assist hardcoded totals as team assists. And this condition needs to be met only -once- per whole game. I tested it out so that only one condition was met by a team per three months or so, and each time it was met they got a full amount of assists.

The system is as follows:

There are hardcoded conditions and algorithms that use simeng.txt for final results. We have no control over the algorithm, but as I explained in the original post it is a three step process.

First it takes into account a team, it's lineup and bench (all at once), and calculates the score of the game. At that point there are no blocks, assists, steals and any of that sort given out. It does however calculate certain unknown factors where shooting plays a large part in. These values are seemingly hardcoded.

This generates a result which will be averaged on the custom curve created by simeng.txt. Team perfomance is ranked from 1 to 100 in all categories, using those hardcoded values.

Then, based on assists, steals, blocks, rebounds etc curves, team ends up with a certain amount of those things.

These values are then separated between players based on their ratings.

It is -not- a percentage. It is overall perfomance rating (lower FG teams tend to be in the lower parts of assist curves compared to higher FG teams, but since it's not linear it's obvious there's more taken into account than just FG). It exists to make it so that not all teams would end up with same assists per game, and having it only depend on player passing and offensive abilities would make it so that Knicks has an amazing assist-player without results to back it up.

The float value is used as I mentioned before, because of the curve. You can have two values, {1, 0.0f} and {99, 1.0f} to get a linear result, but since we don't exactly know the algorithm, it is hard to determine the exact result.

And no 0.05f is not .5 probability. It's merely a multiplier of hardcoded total. It's used alot in simulation engines actually: engines are usually built with having constant numbers being in output, and tweaking them if necessary later on. This means that for testing purposes it's better to test five values with 100, than five values with other random numbers. Later on a multiplier is used to tweak the result.

That maybe too much of a change. I think if we can get the league leaders with around 9+ assists/game while keeping the team stats realistic, I'd be happy, not sure about the rest of the people. I would like to get the point leaders into the high twenties or maybe even into the low thirties.


I managed to achieve that without much problem, had around five players with 9+ with the exception of Gilbert Arenas with 12 assists. Seemingly the primacy I updated of him with him being one of the few great pointguards in the team had such a result. It is quite alright though.

In fact, fixing assists numbers and primacy had many guards in MVP race as well. Which was a refreshing sight to say the least. I believe it's possible to update points as well, but haven't tested it yet, it's mainly about sharing the points and game time that affects the result.
User avatar
Chris_23
 
Posts: 617
Joined: Tue Jan 11, 2005 10:32 am
Location: Somewhere

Postby bigh0rt on Mon Nov 27, 2006 3:56 pm

Both of you keep up the good shit. (Y)

Chris_23, dive into the aiact files at all??
User avatar
bigh0rt
NLSC Team Member
NLSC Team Member
 
Posts: 9032
Joined: Thu Nov 10, 2005 5:06 pm
Location: New York

Postby Patr1ck on Mon Nov 27, 2006 4:47 pm

Like I said it was just a theory. You sound like you are more in-tune with how the changes in the engine will affect the outcome of the stats. Pm me if you want to compare results or anything.
Patr1ck
Administrator
Administrator
 
Posts: 13335
Joined: Thu May 19, 2005 5:54 pm
Location: Pasadena, California, US

Postby Andrew on Mon Nov 27, 2006 5:07 pm

Stickied for convenience. :)
User avatar
Andrew
Retro Basketball Gamer
Administrator
 
Posts: 114932
Joined: Thu Aug 22, 2002 8:51 pm
Location: Australia

Postby Chris_23 on Tue Nov 28, 2006 11:27 am

Thanks Andrew :)

Anyways, here's the first patch. simeng.txt has only part of a role to play. I finally figured out how NBA Live 07 calculates stats, and it basically does it in the following process:

1) Engine takes into account team overall ratings and chemistry in a matchup, then generates the score based on FG of the teams (and probably few other minor team ratings). It also uses depth chart to know how many minutes players played in game.

2) Engine calculates team statistics for the game depending on their perfomance. The result of certain statistic (like assists, steals etc) are given to the whole team. Nor are the stats related (computer just gives bunch of assists for the team not having any idea if assists actually had something to do with the points scored)

3) Then the engine separates statistics between players based on their player ratings (like assists higher for great passers, points great for good shooters, and offensive ratings).

simeng.txt has only a small role to be played in all this. Real problem of simulating games is how the computers distribute gaming minutes and primacy in the game.

For example if you have a great offensive passer in game, and get three other great passers into the team, what happens is that non of them scores high assists in individual perfomance (while team performs well).

I am still trying to look into fatigue more and perhaps will find a way to improve minutes per game for star players. Will take some time again though, we'll see.

The first testing patch is here, with instructions:
http://www.nbaliveforums.com/sutra704705.php#704705
User avatar
Chris_23
 
Posts: 617
Joined: Tue Jan 11, 2005 10:32 am
Location: Somewhere

Postby Chris_23 on Tue Nov 28, 2006 1:38 pm

Two other things I found out today about simulating. Fatigue has NOTHING to do with how many minutes a player plays on court. It seems that how many minutes a player plays depends on their player rotation.

Does anyone know if it's possible to edit somewhere how AI handles player rotation?
User avatar
Chris_23
 
Posts: 617
Joined: Tue Jan 11, 2005 10:32 am
Location: Somewhere

Postby Patr1ck on Tue Nov 28, 2006 3:47 pm

(computer just gives bunch of assists for the team not having any idea if assists actually had something to do with the points scored)


True that! I made a typo and all of a sudden the top player averaged 150 assists per game!!

In the "NBA Live 07\tuning" folder, there are BIN files. lineups.bin and suborder.bin might be what your looking for. Although they aren't anything like text files.
Patr1ck
Administrator
Administrator
 
Posts: 13335
Joined: Thu May 19, 2005 5:54 pm
Location: Pasadena, California, US

Postby Chris_23 on Tue Nov 28, 2006 11:38 pm

I know, they are binary files and seemingly affect lineups and substitution orders and the like but I have yet to see anything I can grab onto in those files, they are a mess even with Hex. Good part is that these are small files, which means they basically have their only little purpose and that's about it, but it may be impossible to tweak them.

So yeah, currently the only way to reduce how many minutes a player plays simulated is to tweak down backup players overalls. A nasty way, but then again it makes sense in the -large- scale of things. While surely LeBron would play 40+, it's merely an individual instance. Many teams have good bench players constantly in game since they can provide good minutes.

Oh well, I'll try and check out few more files, or maybe find something in teams.dbf.
User avatar
Chris_23
 
Posts: 617
Joined: Tue Jan 11, 2005 10:32 am
Location: Somewhere

Postby Ricardo on Thu Jul 31, 2008 12:35 am

I have read the posts from chris_23 and pdub something like 4-5 times but I'm not sure whether the problem is that my math isn't good enough to understand what I have to do or if they just don't mention.

As the download link shown here doesn't work, could someone tell me what numbers I should change in mey simengine.txt file in order to increase the overall number of assists in a dinasty?

like mentioned above, it would be pretty sweet to have some PGs in the run for MVP (right now my dynasty has 4 PF and a SG in the run, bummer)
User avatar
Ricardo
 
Posts: 30
Joined: Tue Jul 24, 2007 8:35 am
Location: Rio de Janeiro, Brazil

Re: [Simulation Engine] simeng.txt research

Postby Mandich on Tue Jan 27, 2009 5:13 pm

Alright guys, I know the numbers how to increase your assist averages, if anybody wants to know, yell. Right now CP3 is averaging 11 assists per game for me.

Also- if anybody could tell me how could I increase point averages. Right now my top scorer averages only 26 PPG
User avatar
Mandich
Muffin Button
 
Posts: 2222
Joined: Sun Mar 02, 2008 9:22 pm
Location: Croatia

Re: [Simulation Engine] simeng.txt research

Postby Andrew on Tue Jan 27, 2009 7:57 pm

Sounds like useful info to me. :)
User avatar
Andrew
Retro Basketball Gamer
Administrator
 
Posts: 114932
Joined: Thu Aug 22, 2002 8:51 pm
Location: Australia


Return to NBA Live 07 Tutorials & FAQs

Who is online

Users browsing this forum: No registered users and 1 guest