Suggested Settings for Endurance Races against the AI

Discussion in 'General Discussion' started by dungbeetle, Dec 4, 2018.

  1. dungbeetle

    dungbeetle Well-Known Member

    Joined:
    Feb 15, 2016
    Ratings:
    +66 / 0 / -0
    I have found that endurance racing against the AI can be a bit of a lottery when pit stops are involved. Left to their own devices, the AI will sometimes make shorter, longer and/or more or less pit stops than you, which can lead to big time differences between you and the various AI cars at the end of the race.

    This is primarily because the player can travel further than the AI on a full tank of fuel.

    I have been experimenting with the settings below in an attempt to encourage similar pit stop behaviours between you and the AI which will hopefully help to alleviate these problems.

    Settings/Gameplay settings
    Driving/AI Control in Pit Lane - ON. This is to ensure that you and all of the AI cars spend the same amount of time in the pit lane during each stop.

    Single Player/Single Event
    Tyre Wear - Ideally this needs to be 'OFF' (unfortunately) to ensure that the number of AI pit stops are not influenced by tyre wear. This is necessary because, so far, I have been unable to figure out the AI's 'thinking' behind when its necessary to change tyres based on levels of wear. Longer races can result in the AI pitting more or less frequently than you (and sometimes each other), based on when the AI decides it's time to change tyres.
    However, this can obviously take some of the fun out of the race when you yourself no longer have to adapt to tyre wear as you race and judge when is the best time to pit for a change.
    For this reason it's worth trying 'ON' for races where tyre changes will not be required or may only be required once, to add some variety to the racing, but if you do this, at least make sure that the tyre changes will fit easily within the selected Minimum Pit Stop Duration (see below).
    Finally, don't use tyre wear multiples as a method of forcing pit stops on the AI. I have found that it increases the likelihood of varying the number of stops by the AI unnecessarily, particularly if the tyre change doesn't coincide conveniently with a low fuel refill stop. All of this can lead to substantial time differences between you and the AI at the end of the race. Plus, I have found that on the higher multiplication settings, the tyre degradation feels too sudden and a little unnatural to me whilst driving.

    Fuel Use - 'ON, 2x, 3x or 4x'. Your choice. Use higher multiples for shorter races where pit stops are still required. I have found this to be the best method to force pit stops on the AI during races, as fuel consumption and refill quantities (see Pit Stop Presets below) seem to be fairly consistent across the board.
    Another tip relating to fuel is to avoid numbers of laps in the race that are exact multiples of full fuel tank quantities (as indicated on the Car Setup page). For example, if a full tank gives you 10 laps, avoid race lengths of 10 or 20 or 30 etc., laps. This is because the AI may put an extra pit stop in right near the end of the race for a splash and dash if fuel economy hasn't been as good as predicted and this will put you a whole pit stop's time ahead of the rest of the field. In this example, it's better to go with 15, 25, 35 etc., lap races so that both you and the AI make the same number of stops.

    Mandatory Pit Stop - 'OFF'. Don't use this to force pit stops, use the Fuel Use multiplier (above) instead. It forces unnecessary pit windows and tyre changes (which are a requirement for an MPS) which complicates matters. It can lead to the AI being less efficient and thus can cause substantial time differences between you and the AI at the end of the race.

    Minimum Pit Stop Duration - ON. Use an appropriate number of seconds to ensure that you and the AI cars spend the same amount of time in the pit lane irrespective of the amount of fuel (and/or tyres, if tyre wear is on) taken during the stop. The longer the pit lane, the more time you'll need. Note that the AI cars will sometimes pit in on different laps to change things up a little, which mixes the order up nicely allowing for undercut strategies. If you're not sure exactly how long to allow, just use the full 90 seconds to be safe and maybe have a coffee while you wait! :)

    Car Setup
    These settings ensure that you travel the same distance as the AI on a full tank of fuel.
    1. Select your car and track combination.
    2. Select the required Fuel Use Multiplier.
    3. Select no AI opponents and start a practice session.
    4. Go to Car Setup. Fill the fuel tank completely and note the number of laps (this is how far the AI will get on a full tank).
    5. Go to practice and run several laps to get the 'litres per lap' consumption from the car's data display (use the Full Data Display, it's easier to read).
    6. Multiply the litres per lap (See 5. above) by the number of laps noted in the Car Setup screen (See 4. above) and put this amount of fuel in the car for the start of the race to keep you on an equal footing with the AI cars in your Class. You and the AI cars should now run out of fuel at roughly the same time.

    Pit Stop Presets
    1. Add the same amount of fuel you added in the Car Setup (See 6. above) to your pit stop strategy so you will stay in step with the AI when you stop to refuel during the race.
    2. It's worth making a note somewhere of the calculated fuel quantity and the fuel use multiplier used so you won't have to go through all this again later for this particular car, track and fuel multiplier combination.

    AI Difficulty
    I've found that it's important to set the AI difficulty as close as possible to, or even slightly higher than, your own ability. Traditionally I tend to set the AI to slightly easier than I can cope with and then start at the back of the grid to see how far to the front I can get during a race. This is fine for sprint races but no good for endurance races with pit stops. This is because the AI regularly pit a lap or two sooner than they need to, which allows you to do one or two hot laps without traffic before pitting, which makes the undercut way too easy. It's not difficult to gain a good half a dozen places or so this way if you run both undercut laps cleanly. It's worth experimenting to find how many notches above your usual difficulty level the sweet spot is for you.

    Hope this helps with endurance races against the AI.

    Obviously any comments, suggestions or findings anyone may have are welcome! :)
     
    • Informative Informative x 4
    • Like Like x 1
    Last edited: Dec 31, 2018
  2. ravey1981

    ravey1981 Well-Known Member Beta tester

    Joined:
    Apr 15, 2018
    Ratings:
    +873 / 0 / -0
    Sounds like you want to do endurance races where the AI do exactly the same as you but aren't as good so you can still win. That's hardly endurance racing to be fair. Having no tyre wear is a bit pointless. You may as well just have no pitstops at all.

    Use adaptive AI rather than fixed, they will constantly adapt to your pace, works great over longer sessions.
     
  3. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    No, what he's trying to do is create an environment were the AI and the player is more likely to have the same number of pit-stops of roughly the same length, instead of one or the other gaining an unrealistic advantage.

    Never really looked into it myself, since I don't have the patience (or time for that matter) for 3+ hour races.
    Longest I ever did in R3E was a 1 hour GT3 race, and both tires and fuel-tank can easily cope with that.
     
  4. dungbeetle

    dungbeetle Well-Known Member

    Joined:
    Feb 15, 2016
    Ratings:
    +66 / 0 / -0
    It has nothing to do with the pace of the AI, and yes, I have conceded that no tyre wear is undesirable.

    Yes, exactly that.
     
  5. ravey1981

    ravey1981 Well-Known Member Beta tester

    Joined:
    Apr 15, 2018
    Ratings:
    +873 / 0 / -0
    By creating a situation where they are forced into exactly the same strategy and are forced to spend exactly the same amount of time pitting. In that case there's just no point having pitstops at all....
     
  6. dungbeetle

    dungbeetle Well-Known Member

    Joined:
    Feb 15, 2016
    Ratings:
    +66 / 0 / -0
    Well, actually there is, because as I explained in the original post, it introduces opportunities to undercut the AI as the they sometimes pit on different laps to refuel.

    Rest assured, I'm not on a mission here to create as boring and as easy a race as possible, I'm merely trying to eliminate some of the less desirable traits of the AI which can easily spoil an endurance race against them.
     
  7. MattStone

    MattStone Well-Known Member

    Joined:
    Mar 6, 2016
    Ratings:
    +169 / 0 / -0
    I appreciate what Dungbeetle is trying to do here as I've never had confidence that the AI pit strategies are realistic.

    Fuel is pretty straight forward but as for tyres there are so many variables
    • I would imagine AI would be less hard on tyres as they wouldn't over drive the car, I imagine they would be close to perfect at not spinning the drive wheels or scrubbing the front tyres. Taking that into consideration do they wear their tyres at a rate similar to an average players style of driving or to the near perfect driver who doesn't over drive their car at all?

    • When the tyres are near the end of life I would imagine the AI driver would manage the car better and hence get more life out of their tyres. How does that compare to the average player?
    It would be a pretty complicated thing to program and allow for the variables!
     
  8. dungbeetle

    dungbeetle Well-Known Member

    Joined:
    Feb 15, 2016
    Ratings:
    +66 / 0 / -0
    @MattStone Yeah, predicting AI tyre management is tricky.

    In theory though tyre wear shouldn't be a problem provided that the AI never pits solely for a tyre change, as the Minimum Pit Stop time would cover the extra time taken to change the tyres during a fuel stop.

    I am finding however, that the number of laps per fuel tank in relation to the overall race length seems to be the main culprit. The fewer the number of laps between refills, the more likely the AI will throw in an extra stop at the end of the race. Maybe the answer is to avoid the higher fuel multiples to give larger gaps between stops.
     
    Last edited: Dec 6, 2018
  9. ravey1981

    ravey1981 Well-Known Member Beta tester

    Joined:
    Apr 15, 2018
    Ratings:
    +873 / 0 / -0
    Coming back to this and I'll try to be constructive this time.....

    Is the in game fuel calculation accurate? I seem to remember that the fuel laps in the setup page is quite different to the calculated fuel per lap when using third party apps for example. Do AI always start with a full tank?
    We can assume that fuel tank capacity is realistic and that driving time on a tank is also realistic, what probably isn't happening is any prior planning by the AI so there is no strategy happening? So they only refuel when empty?

    Would probably be handy for the AI dev to let us know these answers. Physics dev @Alex Hodgkinson will know if the fuel calcs are correct or not....
     
  10. Alex Hodgkinson

    Alex Hodgkinson KW Studios Developer

    Joined:
    Jun 5, 2017
    Ratings:
    +1,948 / 0 / -0
    You can check to see how accurate fuel calculations are by loading your car in pit lane, scrolling through to the fuel estimate on the dash and taking note of fuel usage in L/lap. This value will update as you drive to show the actual fuel usage you're attaining while driving. So, set fuel usage to 1x, drive 5-7 laps and take note of the updated value. The estimate should drop down a little bit (around 5%) because the AI use this value to work out how much fuel to put in the tank. If it under estimates, then AI will have to pit or will run out of fuel. Obviously if you use fuel usage multipliers the margin of error will increase.

    Cars released and physics updated within the last 18 months will be the most accurate in this sense. I can't speak for older car sets such as P1 & P2 as I simply don't know what the deal is with those.
     
    • Informative Informative x 4
  11. dungbeetle

    dungbeetle Well-Known Member

    Joined:
    Feb 15, 2016
    Ratings:
    +66 / 0 / -0
    A good point, and no I don't believe the one on the Car Setup page is, at least for the player.

    On more than one occasion, I have been able to get much further on a full tank than the laps predicted on the Car Setup page. However, the strange thing is, that the AI did seem to be pitting in accordance with those predictions and because of this I have had to make pit stops anyway just to stay in step with the AI.

    Another good point and I honestly don't know. However fortunately, as I mentioned above, the AI do still seem to keep in step with the predicted figures.

    If that's the case, then this may be a better basis for calculation, however it's obviously more tricky to do this than to just use the Car Setup page predicted figures. The advantage of using those (if only they were accurate for both the AI and the player) is you can get the information quickly and easily for any track/car combination.

    OK, now my brain hurts! ;)
     
    Last edited: Dec 20, 2018
  12. ravey1981

    ravey1981 Well-Known Member Beta tester

    Joined:
    Apr 15, 2018
    Ratings:
    +873 / 0 / -0
    Going from what Alex said it seems the AI use the players fuel consumption to estimate theirs + margin for error. They are then taking that number as a given and will pit on that lap whatever, hence why the player can go longer (error margin is not needed)

    I use dashboard apps to give me the fuel consumption and predicted laps left on the fly. Which is easier that doing the manual calls from the in car dash figures...

    I'd guess that given the fact that F1 teams have elaborate software to predict best strategy then it may be too much to ask for a game to come up with realistic pit strategies for AI...
     
    • Like Like x 1
  13. Alex Hodgkinson

    Alex Hodgkinson KW Studios Developer

    Joined:
    Jun 5, 2017
    Ratings:
    +1,948 / 0 / -0
    If you find AI fuel use wildly different to what you as a player can achieve, please do report
     
  14. ravey1981

    ravey1981 Well-Known Member Beta tester

    Joined:
    Apr 15, 2018
    Ratings:
    +873 / 0 / -0
    Will do although I don't get chance to do longer races often. While you are here, what's the deal with tyres? What triggers AI to decide it's time to change? Do they do it in set wear range or when their average lap time drops by a certain amount? At what point does tyre wear become critical? Light wear is reported by crew chief at 90% but I know you can't go to 0% for example.
     
  15. dungbeetle

    dungbeetle Well-Known Member

    Joined:
    Feb 15, 2016
    Ratings:
    +66 / 0 / -0
    Ah,ok.

    So in that case, I wonder if running a practice and/or qualifying session before the race will help the AI to make better pit stop strategy decisions during the race?

    Might be worth a try
     
  16. dungbeetle

    dungbeetle Well-Known Member

    Joined:
    Feb 15, 2016
    Ratings:
    +66 / 0 / -0
    Here is a scenario I originally ran to see if practicing and qualifying before the race would help the AI make better pit stop decisions. As you can see from the results, some of the AI seemed to make the right decision (which is encouraging) while over half of them didn't. I'm not sure if the practice and quali sessions actually helped at all to be honest, but at least this race demonstrates how the AI can sometimes make quite obvious errors in pit stop strategy.

    Hopefully this information will help the Devs identify where the problems lie.

    Whilst a three stop strategy would no doubt be of benefit in a much longer race where tyre wear might have more of a bearing on lap times (maybe ramping up the tyre wear as well might have helped), in this case the 3 stop strategy was a big mistake. The pole sitter after qualifying could only manage 9th place in the end after choosing a 3 stop strategy.

    SETUP

    Track - Hungaroring GP
    Track length - 4,381m
    Race Laps - 20
    Race Time - n/a
    No. of Opponents - 14
    AI Difficulty - Adaptive
    Practice (mins) - 7
    Quali (mins) - 10
    AI control in pit lane - ON
    Time in pit lane (secs) - 60
    Tyre Wear - ON
    Fuel Use 4x
    Mandatory Pit Stop - OFF
    Minimum Pit Stop Duration - 60 seconds
    Pit Stop/Fuel Add - Normal
    Fuel at start - Full Tank
    Car setup/Full tank capacity in laps) - 6

    RESULTS
    Player pit stops: 2
    AI pit stops: 2 (6 AI) or 3 (8 AI)
    The player started 14th out of 15 on the grid, pitted twice on laps 7 and 15 and finished 5th
    The 4 AI who finished ahead of the player and the 2 who finished in 6th & 7th place pitted twice on laps 6 and 14.
    The remaining 8 AI who finished further behind pitted three times on laps 5, 11 and 15.
    The AI which qualified on pole, pitted three times and finished 9th.
     
  17. Neil Bateman

    Neil Bateman Well-Known Member

    Joined:
    Mar 27, 2016
    Ratings:
    +48 / 0 / -0
    I would have thought practice and qualy would not affect the race as far as number of pit stops are concerned, each AI has its own level of ability in speed, driving style etc.....so some AI would be harder on tyres than others, some might be harder on fuel consumption, the pole sitter may have been faster over a single lap but wears his tyres out a lot faster. Its hard to determine exactly why 3 stops are required over 2 stops unless some AI drivers just cant look after cars or tyres as well as others can.
     
    • Like Like x 1
  18. dungbeetle

    dungbeetle Well-Known Member

    Joined:
    Feb 15, 2016
    Ratings:
    +66 / 0 / -0
    Ah, right. I must confess I hadn't considered the various AI's individual abilities which could also affect their performance, fuel consumption, tyre wear, etc.

    The original idea to run practice and quali was to help the AI obtain more accurate fuel consumption estimates and thus avoid any fuel requirement errors (i.e., underfuelling at any point and then needing an extra stop to fix it), as apparently they use the player's data to calculate this (as advised by Alex in post #10 above).

    When it comes to tyre wear, there was barely any wear on my tyres after the 20 laps (tyre wear was on 1x) so I'm not sure if the pole sitter, even though he was quicker, would have needed to carry out an extra tyre change stop on this particular occasion.
     
  19. Neil Bateman

    Neil Bateman Well-Known Member

    Joined:
    Mar 27, 2016
    Ratings:
    +48 / 0 / -0
    Of course i was making assumptions that is how the AI files are designed.;)
     
  20. dungbeetle

    dungbeetle Well-Known Member

    Joined:
    Feb 15, 2016
    Ratings:
    +66 / 0 / -0
    Sure, but I think it's reasonable to assume that they must have at least some individual traits/abilities in order for them to perform differently. :)