Jump to content


- - - - -

Driver.ini Generator / Editor / Randomizer


  • Please log in to reply
10 replies to this topic

#1 Saiph

Saiph

    Still driving 4 Team BDS

  • Supporter
  • PipPipPipPipPipPipPipPipPipPip
  • 2,184 posts
  • Gender:Male
  • Location:Aylesbury, UK
  • Interests:Computer gaming (esp. simulations, strategy, RPG), real ale, live music, motor sports, boring the NSA/GCHQ to death.
  • Sim interest:GPL

Posted Jun 01 2020 - 11:26 AM

There has been some talk on the forum recently about creating edited driver.ini files to make races against the AI less predictable. For example, you could adjust the performance figures for AI drivers to simulate them having a notably bad day to give you a better chance, or for them to have a notably good day to give you someone to chase and prevent the human driver from running away with the race:

View Postprize, on May 29 2020 - 07:48 PM, said:

I also like the idea of randomizing AI drivers in drivXX.ini.  If the slider is set to race against 5 AI drivers, say, by default you're racing against 5 fast drivers.  If you randomize the drivXX.ini for the mod you're using, you'll get a random choice of 5 drivers from the list; this makes for slower and more varied AI competition.

Also:

View Postjgf, on May 30 2020 - 10:44 AM, said:

Ah, the Driver Randomizer.  There was one for Nascar 2 (or 3?) but not for N2k3;  probably because the former used txt files for driver parameters while the latter used hex files.  Since GPL uses text files for drivers it probably wouldn't be too difficult for some knowledgeable soul to create a utility to randomize driver selection and/or performance.

The one I recall gave you four options for each driver performance parameter:  the percent chance he would perform better than normal and by how much;  and the percent chance he would perform worse than normal and by how much.  So, for example, a front runner might have a 3% chance of up to 20% less power ...the loss may be so slight you would never notice or he may be a backmarker for that race.  There was also a restore button to reset the defaults.  I loved that little program, and spent untold hours tweaking the cfg file ...and naturally had one for each carset.

For less than a full field it could randomly select the specified number of drivers and create a new driver.ini with just them.  (The Nascar util didn't do that, like GPL we always raced the best drivers.)

As prize says, if you limit the number of AI drivers in a race, it appears that GPL automatically selects the best drivers to race against. Is this correct? Would it be possible to change the driver.ini file to give a more random and variable selection of opponents? Also, it seems it might be quite easy to do this for a single race. But would it also be possible to do it for an entire championship season?

Would other GPL drivers be interested in a tool like this?

I must admit, I have very little experience with editing driver.ini files, as I am usually a hotlapper, although I do know some of the basics. There are a couple of "hype" values for each driver, along with a number for "variability". Perhaps those are the number which would need to be tweaked?

I would be willing to look into writing a driver.ini randomizer. It wouldn't be pretty - I don't know how to use Vis Studio to write nice Windows GUIs, but I could develop a simple command-line utility which would take basic info from a .INI or config file and fiddle around with the standard driver.ini file to give you a tweaked version.

Please let me know if anyone is interested in this, and if there are any GPL AI experts out there who are familiar with the driver.ini files, I'd be grateful for some basic advice on:

( 1 ) Which values need to be changed to influence driver behaviour, and how sensitive are they?
( 2 ) Is it possible to drive an entire season with custom AI drivers to give a more varied season?
( 3 ) Does GPL already include a certain randomness for each driver, denoted by the "variability" number?

Edited by Saiph, Jun 01 2020 - 11:28 AM.


#2 KARTM

KARTM

    Denny Hulme

  • Supporter
  • PipPipPipPipPipPipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Montreal Canada
  • Interests:karting vintage racing gpl
  • Sim interest:GPL

Posted Jun 01 2020 - 11:40 AM

the main values  is the "hype" for exemple i feel that in the 67extra  that Clark and Gurney  are too fast for the league so i have reduce there hype value , but at the same time on some track i use a AI  setting in the GEM below  1 so the whole pack is faster

Edited by KARTM, Jun 01 2020 - 12:35 PM.


#3 Saiph

Saiph

    Still driving 4 Team BDS

  • Supporter
  • PipPipPipPipPipPipPipPipPipPip
  • 2,184 posts
  • Gender:Male
  • Location:Aylesbury, UK
  • Interests:Computer gaming (esp. simulations, strategy, RPG), real ale, live music, motor sports, boring the NSA/GCHQ to death.
  • Sim interest:GPL

Posted Jun 01 2020 - 12:31 PM

Thanks for that Kartm. That's something else to think about: Not only does the driver.ini file control each driver, but GEM has an overall setting which can affect the whole AI grid.

#4 Pavel

Pavel

    Bruce McLaren

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 926 posts
  • Gender:Male
  • Location:Minsk, Belarus
  • Interests:Racing, Simracing, Music
  • Sim interest:GPL

Posted Jun 01 2020 - 12:38 PM

Fun thing. From beginnig most GPL players tried to take control of AI cars. Number of test were made, results documented, changes to game files were made. Those changes were implemented in new mods, patches and were carried to newer mods. And now there are wishis to restore randomness in AI performance :)

Each mod's gpl_ai.ini has DRIVER ERRORS and RANDOM MODIFICATIONS sections. And also this string that is set to 0:
[ magic ]
disable_random_modifiers = 0.000000   ; set to 1.0 to prevent random driver modifiers (0.0 = modifiers allowed)

At first I suggest to try play we this settings.

Edited by Pavel, Jun 01 2020 - 12:39 PM.


#5 prize

prize

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 60 posts
  • Interests:GPL add-on tracks and mods
  • Sim interest:GPL

Posted Jun 01 2020 - 01:08 PM

I agree with Pavel that changing driver personality via adjustment to AI parameters and algorithms requires a lot of work and expertise.

What I was talking about in the post Saiph cited at the beginning of this thread is something different.  My proposal was simply to choose which AI drivers you race against.

Choosing your opponents is so simple I do it by hand.  I edit the driver.ini file and simply replace the string "driver_1" with "driver_23".  Then I replace "driver_23" with "driver_1".  After doing that with a few more randomly chosen pairs of drivers, I've randomized the driver order.  Now when I race against 5 drivers, it won't be the 5 fastest, but just 5 randomly chosen drivers.  For a casual race this mixes things up and makes the race more fun.

Most modifications to GPL require a lot of work and expertise.  This is different.  A script which automates this swapping could be written with just a few lines of code.

#6 prize

prize

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 60 posts
  • Interests:GPL add-on tracks and mods
  • Sim interest:GPL

Posted Jun 01 2020 - 02:03 PM

I appreciate all the AI adjustment and modding work that Pavel mentions.  This really is the magic of GPL, that it can recreate a race event from years gone by in a way that no book or film can.

My post above was about a different subject.  Rather than simulating a historical race, what I had in mind with the driver randomizer idea Saiph reposted at the beginning of this thread was to recreate a day of casual practicing at a track, where you're just putting in laps along with whoever else happened to show up that day.  Imagine that you're sharing the track with drivers who are not big names, and whose driving style you're not familiar with.  It's fun and easy to do.

For this purpose, AI editing expertise is not required.  One just randomly picks two numbers, say 3 and 22, and then swaps the string "driver_3" with "driver_21" in driver.ini.  Repeat this with a few more randomly chosen pairs of numbers between 1 and the number of drivers, and you've randomize the driver file.  If you're racing against 5 AI drivers, that will be driver_1 ... driver_5, which are no longer the first 5 drivers in driver.ini, but are 5 randomly chosen drivers.  This is so simple I do it by hand, but it could be automated with just a few lines of code.

Edited by prize, Jun 01 2020 - 02:04 PM.


#7 Saiph

Saiph

    Still driving 4 Team BDS

  • Supporter
  • PipPipPipPipPipPipPipPipPipPip
  • 2,184 posts
  • Gender:Male
  • Location:Aylesbury, UK
  • Interests:Computer gaming (esp. simulations, strategy, RPG), real ale, live music, motor sports, boring the NSA/GCHQ to death.
  • Sim interest:GPL

Posted Jun 01 2020 - 02:27 PM

View PostPavel, on Jun 01 2020 - 12:38 PM, said:

Fun thing. From beginnig most GPL players tried to take control of AI cars. Number of test were made, results documented, changes to game files were made. Those changes were implemented in new mods, patches and were carried to newer mods. And now there are wishis to restore randomness in AI performance :)
.......

Thanks for the info Pavel.

The beauty of GPL is that so many people can enjoy it in so many different ways. Some people like me get most pleasure from simply driving as many of the GPL cars as possible on as many of the tracks as possible. Seeing new scenery, and getting the 'feel' of a new car, are both really enjoyable for me.

But GPL is primarily built for racing, so a lot of people enjoy races, either against the AI, or online against other humans.

Even though I don't race often, I can appreciate the efforts that the GPL modders have made over the years to try to tame the AI, and make it reflect the real-life drivers as accurately as possible. Whenever I race against the AI, I prefer to face the real-life personalities, just to see where I finish compared to the famous names. "Ah, I finished 13th and got lapped by Clark. But I'm getting better because he only lapped me once!"  :D

View Postprize, on Jun 01 2020 - 01:08 PM, said:

......
Choosing your opponents is so simple I do it by hand.  I edit the driver.ini file and simply replace the string "driver_1" with "driver_23".  Then I replace "driver_23" with "driver_1".  After doing that with a few more randomly chosen pairs of drivers, I've randomized the driver order.  Now when I race against 5 drivers, it won't be the 5 fastest, but just 5 randomly chosen drivers.  For a casual race this mixes things up and makes the race more fun.
......

Aha. That's obviously easier. As you say, a program to do that would be simple. ( A ) choose which mod you want to change, ( B ) choose whether you want to randomize the order, or revert back to the normal order. Job done.

#8 Pavel

Pavel

    Bruce McLaren

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 926 posts
  • Gender:Male
  • Location:Minsk, Belarus
  • Interests:Racing, Simracing, Music
  • Sim interest:GPL

Posted Jun 01 2020 - 02:37 PM

I think I was missunderstood a bit :) I want to say that I also don't like predictable race results. I like to see some variations, not significant, but at least different drivers on podium. Some mods come with race specefic Ai set that tries to replicate particular race results for every round. So some AI parameters set to 0 without any option for variation. I don't like such things in mods.

#9 webfoot

webfoot

    Denny Hulme

  • Supporter
  • PipPipPipPipPipPipPipPipPipPip
  • 337 posts
  • Gender:Male
  • Location:Birmingham England
  • Interests:.
  • Sim interest:GPL

Posted Jun 01 2020 - 03:07 PM

Saiph,

Lee's AI tutorial over at http://gplmotorworks.gplworld.de/ contains much info on AI behaviour and the effect of the parameters in the driver.ini

#10 jgf

jgf

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 986 posts
  • Gender:Male
  • Location:Columbus, OH
  • Sim interest:GPL and P&G

Posted Jun 02 2020 - 01:10 PM

For all Sierra sims the game loads the drivers basically from "best" to "worst", so if you select anything less than a full field you will always get the best cars/drivers.   For GPL I envision a utility that would backup the driver.ini then create a new ini containing the specified number of drivers selected at random from the original, this way you would have no idea who would show up at a particular session;  this list would remain in use til you ran the randomizer again to create a new list or restore the default.  You could even have it select a random number of random drivers. (This is simple enough to do manually, but then you are selecting the drivers yourself so know who will be on the track with you.)

My knowledge of programming is minuscule so this may be more difficult than I imagine, but it would seem just automatic editing of text files.

#11 KARTM

KARTM

    Denny Hulme

  • Supporter
  • PipPipPipPipPipPipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Montreal Canada
  • Interests:karting vintage racing gpl
  • Sim interest:GPL

Posted Jun 02 2020 - 01:50 PM

thats decide in the drivers,ini by the" bump order " edit that and you can have a small pack of your choice ,very easy to do, you choose  five drive that you want to keep and assign to them  the bump order 1 to 5 , and after that in the game you reduce the number of AI to 5

Edited by KARTM, Jun 02 2020 - 01:54 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Sim Racing Links