Page 1 of 1

end of game kneeling logic and spiking logic

PostPosted: Thu Aug 19, 2021 12:24 pm
by KW77
Image

In real life, the Panthers should have just kneeled down and ran the clock after the 3rd down conversion with 90s left, as Tennessee used all timeouts. Instead CAR continues to run another play for no reason, fumble and eventually lose.

Can the logic be improved next year?

Re: end of game kneeling logic

PostPosted: Thu Aug 19, 2021 7:42 pm
by brooks_piggott
Yea, that's odd... the code calculates the time remaining in the game and 40 seconds for each remaining play and if they can kneel out the clock they do. I'm not sure where the calc went wrong in this scenario. I'll have to see if I can force these scenarios to happen to see what the logic is doing.

Re: end of game kneeling logic

PostPosted: Sat Aug 21, 2021 6:34 pm
by KW77
Brooks_Piggott wrote:Yea, that's odd... the code calculates the time remaining in the game and 40 seconds for each remaining play and if they can kneel out the clock they do. I'm not sure where the calc went wrong in this scenario. I'll have to see if I can force these scenarios to happen to see what the logic is doing.

would "aggressive offense" have to do with anything? Logically it shouldn't, but wonder if that's what's causing it

Re: end of game kneeling logic

PostPosted: Mon Aug 23, 2021 10:07 pm
by brooks_piggott
Was this 2nd quarter or 4th quarter? Can you post a link to the full boxscore?

Re: end of game kneeling logic

PostPosted: Fri Aug 27, 2021 3:53 pm
by KW77

Re: end of game kneeling logic

PostPosted: Sun Sep 19, 2021 10:16 am
by KW77
https://championsimleague.com/football/html/Logs/PBP.html?id=2139
https://championsimleague.com/football/html/Logs/PBP.html?id=2139

Similar to the previous issue, the ball spiking logic needs some work as well. Scroll down to the last 2 minutes of this game. The score is tied at 27. The Panthers spike the ball with 38 seconds left on 3rd down, only to kick a very long field goal, which misses and gives the ball back to Detroit. They get the ball back with time to run a play and then kick the FG for the win. We need some logic in place for a team to simply hold onto the ball in this situation.

Re: end of game kneeling logic and spiking logic

PostPosted: Mon Sep 20, 2021 9:52 pm
by brooks_piggott
Game code has about a 20% chance there of spiking the ball. So 8 out of 10 times they'll try for another play. In this case the conservative route was chosen and they went for the FG.