Offline AI pit strategy: inspiration from microprose GP4

Discussion in 'Wish Lists' started by 3377, Apr 11, 2020.

  1. 3377

    3377 Registered

    Joined:
    Oct 16, 2010
    Messages:
    99
    Likes Received:
    48
    As a offline player only, may I suggest a simple proposition for the AI pit stop strategies inspired from the magic data of grand prix 4 (what a great game it was).

    Let's begin by presenting the GP4 ai pitstrategy, first of all in gp4 it's impossible to ban refueling.
    In the "magic data" for each track for the pit stop was presented in this way in the editor:
    For a 60 lap race:
    Number of pitstop : 1 || percentage 33 || stop 1 on lap 27 || window1 : 6
    Number of pitstop : 2 || percentage 45 || stop 1 on lap 18 || window : 4 || stop 2 on lap 38 || window : 4 ||
    Number of pitstop : 3 || percentage 22 || stop 1 on lap 14 || window : 3 || stop 2 on lap 29 || window : 3 || stop 2 on lap 44 || window : 3

    Meaning that 33% of the ai present during the event would make 1 pit stop, between lap 30 and 36 (the lap was chosen randomly. Same thing for 2 stops and 3 stops strategies

    No way we can do exactly the same thing in RF2, well from the track POV, we have so many different cars with different rules for each concerning pit stops.

    So why not creating a new file, in each car directory? We already know if a car allows or not refueling. As it's not up to car makers to make all pit strategies for all the tracks that any player will use, we should be able to edit this new file "on the fly", in the UserData/player/SettingsDirectory/"CarName". It should be ok as this file would not be used online.

    I would present this way (all the numbers in the file would be for a 100% distance race) RF2 would automatically adjust the data for a 50% race for instance. Heck add a button to disable this feature if not wanted

    Taking the example of a simple race at silverstone:
    52 lap race with refueling and no tyre compound change allowed
    The tires compound are the one seen on the garage defined in the .TBC files
    The number of lap in the race is useful for the AI to know the amount of fuel to put in the car in their last stop, the fuel amount in litres is calculed via the data avalaible in the game : "FuelUse" in track AIW, "FuelConsumption" and "FuelEstimate" in the engine file and "AIFuelMult" in the .HDV file. However I don't know the exact formula for AI that is track-dependant

    Silverstone - GT layout \\Track name in RF2 track menu, corresponding to the Event Name in the GDB file
    {
    LapNumber=52 \\number of lap in the race
    NumberOfStrategy=2 \\Number of strategy availble for this track

    Strategy1 = {
    {1, 60}, \\number of required pit for this strategy || percentage of AI using this strategy
    {"Hard", 23,6,"Hard"} \\stint starting compound || first lap for pit window || window || new compound
    } (the AI would pit between laps 23 and 33, taking fuel and new hard tires, and take the necessary of amount of fuel, as we know how many lap are left for this car)
    Strategy2 = {
    {2,40}
    {"Soft", 15,4,"Soft"}
    {"Soft", 34,4,"Soft"}
    }
    }

    Then another example, for current F1 rules (no refueling so the AI put the maximum of amount of fuel they can)
    Silverstone - GT layout
    {
    NumberOfStrategy=3
    Strategy1 = { \\starting on hard and finishing on soft
    {1, 5},
    {"Hard", 34,4,"Soft"}
    }
    Strategy2 = { \\starting soft and finishing on hard
    {1, 40},
    {"Hard", 34,4,"Soft"}
    }
    Strategy3 = { \\2 stop : soft/medium/soft
    {2, 55},
    {"Soft", 10,4,"Medium"}
    {"Medium", 30,4,"Soft"}
    }

    It is just a thought, but I guess the idea is here for us offline players, for offline endurance race I don't have a "simple" way to go for the moment.

    Is it doable in rfactor2?
    How would you change it?

    Thanks
     
    RoboCAT10, Hazi and atomed like this.
  2. 3377

    3377 Registered

    Joined:
    Oct 16, 2010
    Messages:
    99
    Likes Received:
    48
    Of couse I know what the GDB and RFM files does. Fuel and tire wear multiplier are a solution but not a good one. Resulting in way more stops on tracks with long charges (like monza) than on other tracks with low fuel consumption. I did use the multipliers on RF1, and it did not leave me a great impression. Every AI pit at the "same time", no strategy nothing..... AI allways starts on hard tire (yes I know you can make them use your strategy, but it's great either if you have multicar races)


    Multipliers are not the solution. Mandatory pit stops could be one, with a randomness added to it would make a nice solution
     
    Last edited: Apr 11, 2020
    RoboCAT10 and atomed like this.
  3. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    7,453
    Likes Received:
    4,369
    There were editable pitstop windows in rF1, but I think that was one of the items the original programmers just assumed it would carry over to rF2 and never fully debugger the process.
     

Share This Page