jonesguy14 / footballcoach

Android App for playing/simulating/recruiting as a college football coach
Other
34 stars 8 forks source link

Change AI recruiting #27

Closed jonesguy14 closed 8 years ago

jonesguy14 commented 8 years ago

Right now they can only recruit at or below their level. Allow schools to recruit above their level too.

destilla commented 8 years ago

Am I correct in assuming recruitPlayersFreshman() is only used by the AI teams? It looks like if a user team needs to recruit players they don't select, a walk-on that's hard coded to be 2 stars is generated until positionNeeds = 0.

jonesguy14 commented 8 years ago

Yep, recruitPlayersFreshman is just used for the AI teams, it recruits freshman based on the teams prestige. For user teams, recruitPlayersWalkOns is used to just fill the position needs with bad players (walk ons).

destilla commented 8 years ago

Did you intend for the chance that they recruit a player at 1 star lower than they should to be a wave pattern (as opposed to having the ? I was thinking you wanted it to be kind of randomish to reflect how sometimes in CFB teams get better or worse players.

jonesguy14 commented 8 years ago

I'm not exactly sure what you mean but right now, how recruiting works is like this:

Let's say its Alabama who has a prestige of 95. This means that 25% of their recruits will be 4 stars while 75% of their recruits will be 5 stars (of course it varies year to year but on average it will be 25% and 75%).

If it was say a team with exactly 80 prestige, then all their recruits would be 4 stars. The exact code is in recruitPlayersFreshman() but you may already know that.

int chance = 20 - (teamPrestige - 20*( teamPrestige/20 )); //between 0 and 20

        for( int i = 0; i < qbNeeds; ++i ) {
            //make QBs
            if ( 100*Math.random() < 5*chance ) {
                teamQBs.add( new PlayerQB(league.getRandName(), 1, stars-1, this) );
            } else {
                teamQBs.add( new PlayerQB(league.getRandName(), 1, stars, this) );
            }
        }

I'm definitely open to changing this though, smaller schools do sometimes land that 5 star recruit so there should be a chance for lower prestige schools to overachieve when recruiting.

destilla commented 8 years ago

Sorry my sentence was unclear and I was really unsure of how to phrase it. Maybe a better way to say it would have been as you approach the next star level (20 = 2 star, 40 = 3 star, 60 = 4 star, 80+ = 5 star), your chance of getting the stars-1 player decreases.

So take 40 prestige for example. A prestige of 40 results in a chance of 20, meaning that the stars-1 line will be hit 99% of the time, because in 0-100, only 100 is not <100.

However, 39 prestige, the chance is 1, so the odds of hitting the stars-1 line is 5%.

38, chance is 2, odds are 10%.

37, chance is 3, odds are 15%, etc.

As I typed this out I started understanding what you were going for. I was confused at first when I made an excel sheet and saw that chance started going down, then would jump back up to 20 at 40 prestige, starts creeping back down, jumps up to 20 at 60 prestige, etc.

jonesguy14 commented 8 years ago

Yeah exactly. I just got done with Redshirting (haven't committed changes yet though), and I may change this recruiting a bit too, like add a 15% chance that they overachieve to stars+1, and a 5% chance that they overachieve to stars+2. Thoughts? I think this would balance out the game a bit too, since the lower schools may land a star QB or similar.

destilla commented 8 years ago

I think that's a great start to see if the AI can start to hold their own. I was asking about this because I was trying to get ideas about how we might give the AI more of a fighting chance.

A player will always have the mental upperhand; even on a team with lower prestige, you can redshirt (or you will be able to), adjust long term plans (play a Fr that's got similar Overall to a Sr if his potential is decent, that way you don't lose much in the immediate year and start developing a player that will eventually be much better), and change strategies to your match up.

The result is that a player ends up with a tactical advantage that the AI can never have, and, to compete, the AI will need to either learn how to do these things (which sounds like a complex amount of coding to make the AI smart enough to be situation specific) or give them a straight up numbers advantage (or maybe both). The more control we give the user, the more the AI is at a disadvantage unless similar controls exist for the AI and it can use them properly.

I think your proposal is great idea to balance things out a bit right now, and then we can see what that looks like in terms of many many many seasons. A few users have reported 100+ year leagues, and I'd be willing to bet right now it's the same 10-20 teams competing for bowl spots and the same 10-12 competing for the semis each year.

One idea I had to verify it's having an effect was to find a way was to export the rankings 1-60 to a csv file each season, then run a bunch of seasons, dump the csv into excel, and see what the movement (if any) looked like.

jonesguy14 commented 8 years ago

Yeah you are right about the player always having the upper hand, its hard to make it challenging without the CPU just straight up cheating. I definitely don't want the game simulation code to be changed to put some arbitrary disadvantage against the player, so other ways like increasing the quality of cpu recruits helps a bit. I closed this for now but we will keep an eye on it to see if there are other things that can be done.

destilla commented 8 years ago

One thought would be something like having the AI do beneficial roster swap-outs. Like the freshman/senior scenario I pointed out above. Maybe something to change AI strats too.

I think right now, like you said, the biggest thing is the recruiting, so lets see what it looks like first.

destilla commented 8 years ago

So, I've been in meetings since 8 AM my time and have been playing with the new update (new recruiting, red shirting, scouting, etc) and so far things seem far more balanced from the users perspective.

I'm not really sure how much each change has effected balance independently, but I can say that randomly losing studs to the NFL has impacted my ability to plan out each year reliably, which means sometimes I'm scrambling to fill needs at the expense of other positions, impacting team results overall.

Checking my league history, from 2016 to 2026 only one team has won the championship more than once (granted they've won 4 times), no one has won it twice in a row, and there is some diversity as to who is getting there.

Is it too balanced? That might be something to look into, but right now I only have a sample of 10 years of actually trying to compete/win vs the new AI. So far it looks good though.

jonesguy14 commented 8 years ago

Glad to hear that it feels more balanced. Some people on the subreddit said that scouting still takes up a bit too much cash, but idk if I feel the same. I want it to be hard! But we'll keep an eye on the recruiting budget and how it should or should not change, or other changes like X amount of free scouting.