Post by Danchat on Feb 22, 2022 22:56:05 GMT -6
Reignman said:
What kind of variables are involved in this simulation?A lot! I'll go more into depth later, as this thread just covers the basics.
How does it know when to go for 2 or call a timeout?
Going for 2 is based on game theory, so when leading by 1, 5, 12, or 19 points, and so on. Every team will always attempt the extra 2 in these situations, which isn't 100% realistic.
Taking timeouts is tricky, at least when the offense is taking them. Basically, if the clock has to run and they've got the ball, they'll take a timeout. This can lead to teams blowing all 3 of their timeouts in the first 3 plays within 2:00, but the alternative is teams screwing up the final seconds of the game and not being able to precisely call them at the right time. Timeouts will also be taken if the offense is trying to run out the clock at the end of the 4th quarter, which was pretty simple to program.
If you have suggestions on how to improve the code, I'm all ears!
How does it know how much time to take off the clock for each play?
There is a base 'play length' value for every type of play, takes more with plays that go for more yards, and then a random number of seconds is added for the sake of randomness.
I didn't go through and tally up his yards, but did Joe get the extra 9 yards here when he scored from the 32 lol? And did the defense get a late hit penalty for tackling him 9 yards deep xD?
It was a 32 yard TD and it was scored as that, the way I report it tells you that it was going to be a 41 yard run if he hadn't reached the endzone. That is something I will patch up later, but I like being able to see how many yards the play was going to go if it hadn't ended in a TD.
Oooo time to bust the simulator. How good would a 200 rated player be? Oh wait, you'd have to disable that pesky min/max check thing . In Madden I can get the PLAY file to accept ratings above 99, but they still simulate like 99, which is unfortunate when you just want to mess around xD.
I've coded the player rating conversions to max out at a certain rate, so you're not going to be able to break the app that way!
However, you can test the "running leads to winning" philosophy all you like by setting the RunPassRatio to 100. This won't result in 100% of run plays being called, but it'll be crazy. Or you could try having 100% of the targets go to Justin Jefferson... the possibilities are endless!