The new user interface is in preview!

Want to check it out? Click here! (If you don't like it, you can still switch back)

League Forums

Main - General MFN Discussion

Re: AI Offseason Overhaul Thread

By Infinity on Trial
9/19/2019 6:53 pm
jdavidbakr wrote:
Infinity on Trial wrote:
There seem to be two key points in this thread that have consensus agreement:

    AI should retain its players.
    AI should not go over projected salary cap.


What say you, JDB?


This is actually what has always been -attempted- with the AI logic. The problem comes as someone mentioned that I've not been able to come up with a set of rules that seems to work.

Players make requests based on other salaries in the league + a base distribution of salaries based on position. The AI will offer players the salary that they request, and should not make requests that take them over the cap. (If the AI is indeed signing to go over the cap then that's behavior that broke at some point, because that was always intended to be a requirement for AI signings). The AI will also try to retain all of its players unless they are asking more than the AI can fit under his cap. The problem that I've found is that all of this, when you are a human, has a great degree of intuition that I've not found a way to programmatically simulate.

In general, the FA algorithm is below. Note that this is different than the roster size check algorithm which will cut players to get the cap low enough to fill a minimum roster size, but as the players get cut we run the FA algorithm. This is also the FA algorithm, except for step #1, that will be run if a human controlled team is below the minimum roster count.

1. Check to see if any players are in their last year of a multi-year contract and have a future value of greater than 50, and if we have the cap room to make the offer, then offer them the contract.
2. Check how many more players we need to get to minimum roster size and set our max offer to be equal to the remaining cap room divided by that.
3. If our max offer is less than the minimum salary offer, we do nothing more.
4. Count the number of players in each position, and compare this against the recommended players at each position to assign each position a weight ("position" here is actually a position group, i.e. OL as opposed to C, G, T, etc)
5. Also as a weight is the importance of each player (i.e. we may not pursue a FB even if we have no FB unless there is a very good FB available).
6. Using #4 and #5, each position is given a weight, and that is applied to the available free agents by multiplying the position weight with the future value to determine who is priority to sign.
7. Whoever is at the top of this list gets an offer, and this is repeated until we run out of cap room or have the maximum roster size.

I find the biggest issue is #5 in this list, as the algorithm is very complicated already. Probably just needs to be rewritten and simplified. Some of the ability to simplify this calculation is riding on an update to the website itself that will make it easier to manage the calculations.


First, thank you for your response.

We all may quibble over the minutia of points 1 through 7, but I think this whole problem can be boiled down to one simple thing. You say the AI "should not make requests that take them over the cap." This is clearly broken. Why is this broken? If you can solve that, the rest doesn't matter. At least, it doesn't matter enough for us to be outraged because it won't be ruining the game anymore.

I would agree, however, that the long overdue re-calibration of default ratings would be an improvement, and age should absolutely be a factor in how the AI weights a player's value.

Re: AI Offseason Overhaul Thread

By Infinity on Trial
9/19/2019 10:07 pm
For example:

Anarchy is a spin away from a mass dump of cap casualties. There are 15 AI teams in the league. Every one of them is -$15M to -$22M in cap space. That's because they all spent extravagantly during the early FA period.

Case in point: https://anarchy.myfootballnow.com/team/32



Without looking into it further, here are a couple of guesses:

AI is offering multiple contracts without consideration for the cap impact if all of the offers are accepted.

AI is offering FA contracts without consideration for the space needed for draft picks.
Last edited at 9/19/2019 10:09 pm

Re: AI Offseason Overhaul Thread

By raymattison21
9/20/2019 5:06 am
Infinity on Trial wrote:
For example:

Anarchy is a spin away from a mass dump of cap casualties. There are 15 AI teams in the league. Every one of them is -$15M to -$22M in cap space. That's because they all spent extravagantly during the early FA period.

Case in point: https://anarchy.myfootballnow.com/team/32



Without looking into it further, here are a couple of guesses:

AI is offering multiple contracts without consideration for the cap impact if all of the offers are accepted.

AI is offering FA contracts without consideration for the space needed for draft picks.


Those all look like extensions to players already on the team with contracts still with 1 year left on them?

For some reason I thought you could go like 20% over the cap, but maybe I am wrong. I wonder who they will cut. Some of the guys they just extended contracts to, but they are at 48 guys so I bet the logic was filling out the roster distribution .

What funny is in my transaction screen I don't see any FA3 like your snapshot has...it is different than mine ?

Still, couldn't they just signed no bonus FAs to fill out the roster . ...not these extended contracts

Re: AI Offseason Overhaul Thread

By parsh
9/20/2019 5:21 am
AI signing ..

Last edited at 9/20/2019 5:22 am

Re: AI Offseason Overhaul Thread

By Infinity on Trial
9/20/2019 9:01 am
raymattison21 wrote:
Those all look like extensions to players already on the team with contracts still with 1 year left on them?


You're right. Teams are extending players during the early FA period (instead of waiting until late in the season), giving them much more than they would cost on the open market, without respect for age and based off flawed default ratings.

Adding up the cost of the draft picks, it is obvious that the team is using all available cap space without calculating the space needed for the picks.

A possible quick fix: Don't let the AI extend players until the regular season starts.

Re: AI Offseason Overhaul Thread

By xnflcoach
9/21/2019 10:05 am
For what it's worth, in my probably not so humble opinion, programming time would be better utilized continuing to work on the game engine and taking a good look at talent distribution and the whole speed thing (which makes no sense to me at all). I would think you have to get those things more under control before you worry so much about proper AI roster management.
Last edited at 9/21/2019 10:06 am

Re: AI Offseason Overhaul Thread

By bgedgerly
9/21/2019 11:31 am
xnflcoach wrote:
For what it's worth, in my probably not so humble opinion, programming time would be better utilized continuing to work on the game engine and taking a good look at talent distribution and the whole speed thing (which makes no sense to me at all). I would think you have to get those things more under control before you worry so much about proper AI roster management.


Talent distribution, speed being the be-all, end-all attribute, and/or any other actual 'gameplay' dynamics, don't kill leagues. AI roster management kills leagues.

Game performance and attribute META are largely user-dependent. AI roster management destroying a good league and chasing off owners is completely uncontrollable, and at this moment, unstoppable. This is the only issue that should be focused on at the moment, with everything else being tertiary.

And that's coming from someone who absolutely despises this code.

Re: AI Offseason Overhaul Thread

By CrazyRazor
9/21/2019 11:33 am
bgedgerly wrote:
xnflcoach wrote:
For what it's worth, in my probably not so humble opinion, programming time would be better utilized continuing to work on the game engine and taking a good look at talent distribution and the whole speed thing (which makes no sense to me at all). I would think you have to get those things more under control before you worry so much about proper AI roster management.


Talent distribution, speed being the be-all, end-all attribute, and/or any other actual 'gameplay' dynamics, don't kill leagues. AI roster management kills leagues.

Game performance and attribute META are largely user-dependent. AI roster management destroying a good league and chasing off owners is completely uncontrollable, and at this moment, unstoppable. This is the only issue that should be focused on at the moment, with everything else being tertiary.

And that's coming from someone who absolutely despises this code.


If I could love this rebuttal, I would a thousand times.

Re: AI Offseason Overhaul Thread

By jdavidbakr - Site Admin
9/21/2019 2:40 pm
Infinity on Trial wrote:
raymattison21 wrote:
Those all look like extensions to players already on the team with contracts still with 1 year left on them?


You're right. Teams are extending players during the early FA period (instead of waiting until late in the season), giving them much more than they would cost on the open market, without respect for age and based off flawed default ratings.

Adding up the cost of the draft picks, it is obvious that the team is using all available cap space without calculating the space needed for the picks.

A possible quick fix: Don't let the AI extend players until the regular season starts.


This sounds reasonable. The AI used to do all the renegotiation right off the top because in older generations of code, that would typically result in a lot of cap being freed up. Not so much any more.

This is a tough one to roll out safely, though ... since MFN-1 is full. But, since it only really impacts leagues that are about to roll into their next season, the danger seems limited in scope ... so I am going to risk a hotfix. Very curious to know if this has any impact - positive or negative - as leagues go through FA. Basically, I'm disabling AI renegotiation until regular season midweek 1.

Re: AI Offseason Overhaul Thread

By bgedgerly
9/21/2019 4:34 pm
jdavidbakr wrote:
Infinity on Trial wrote:
raymattison21 wrote:
Those all look like extensions to players already on the team with contracts still with 1 year left on them?


You're right. Teams are extending players during the early FA period (instead of waiting until late in the season), giving them much more than they would cost on the open market, without respect for age and based off flawed default ratings.

Adding up the cost of the draft picks, it is obvious that the team is using all available cap space without calculating the space needed for the picks.

A possible quick fix: Don't let the AI extend players until the regular season starts.


This sounds reasonable. The AI used to do all the renegotiation right off the top because in older generations of code, that would typically result in a lot of cap being freed up. Not so much any more.

This is a tough one to roll out safely, though ... since MFN-1 is full. But, since it only really impacts leagues that are about to roll into their next season, the danger seems limited in scope ... so I am going to risk a hotfix. Very curious to know if this has any impact - positive or negative - as leagues go through FA. Basically, I'm disabling AI renegotiation until regular season midweek 1.


It won't fix everything, but that's a massive step in the right direction. Thanks JDB.