DumbAI

DumbAIMisc  1.1

  • Thread starter Thread starter ancient_3
  • 100 comments
  • 6,157 views
Hey Ancient,

Regarding point number 2 (“some AI drivers returned to the pits again just two laps later”), it appears this is not a bug. I hadn’t realized that those cars were involved in an incident on the straight in Canada. The impact wasn’t severe enough to cause retirement, but it was sufficient to require a pit stop for repairs. I’ll run some further tests, but for now everything looks fine.

As for point number 1 (“this may not be related to the app itself, but I’ve noticed that one AI driver often performs an extremely fast pit stop, while the rest of the field spends the expected amount of time in the pits according to the car.ini settings for tire changes and refueling”), this issue still occurs. However, I don’t think it’s related to the app either.

Do you still need the car/track combination? I can upload it and send it to you via PM if that’s easier.

Best wishes,
Philip
if they spent an amount of time like the tyre changing time , should be OK then :-)

I'm still interested to have just the track name, just to have a look at pits positions in blender and project pitlane.

I started to work on version 1.1 , in which I'll add possibility to save settings and also working on adding a new log system (in DumbAI main window instead of in the lua debug)

Thanks again for the testing, it is motivating to have some feedback about the app :-)
 
if they spent an amount of time like the tyre changing time , should be OK then :-)

I'm still interested to have just the track name, just to have a look at pits positions in blender and project pitlane.

I started to work on version 1.1 , in which I'll add possibility to save settings and also working on adding a new log system (in DumbAI main window instead of in the lua debug)

Thanks again for the testing, it is motivating to have some feedback about the app :-)
Sure it's Canada 1998 by shin:
 
Hi Philip,
I tried the track with 31 Kunos F488 GT3 bots and was not able to recreate the issue , sorry. Everyone went to pit and spent the correct time there. I specifically looked at the first pit areas and they spent like 20 seconds there, what I'd have expected considering the time computed from the .ini.

To all, I tried the app with URD GTE2019 pack and noticed the Dumb AI can not work for Tyre Wear as their tyre files are encrypted .ini . I'm a bit bored with that I must say. I may put a default value for tyre wear taken from their former GTE mod that is not encrypted or from a Kunos GT3 so that the app doesn't crash but that makes few sense if you run with specific tyre wear and bots don't have the same...
 
Last edited:
Hi Philip,
I tried the track with 31 Kunos F488 GT3 bots and was not able to recreate the issue , sorry. Everyone went to pit and spent the correct time there. I specifically looked at the first pit areas and they spent like 20 seconds there, what I'd have expected considering the time computed from the .ini.

To all, I tried the app with URD GTE2019 pack and noticed the Dumb AI can not work for Tyre Wear as their tyre files are encrypted .ini . I'm a bit bored with that I must say. I may put a default value for tyre wear taken from their former GTE mod that is not encrypted or from a Kunos GT3 so that the app doesn't crash but that makes few sense if you run with specific tyre wear and bots don't have the same...
Hey ancient.

To me the first AI always gave magic lit box there when they went for refueling

I will try to recreate again see of there is any changes and let you know.
 
Hey ancient.

To me the first AI always gave magic lit box there when they went for refueling

I will try to recreate again see of there is any changes and let you know.
Hi Philip,

While debugging future 1.1 version, I noticed the bots behave strangely if you are running the race as a bot yourself and if you navigate between bots to observe what they do. And I was able to observe something like you did.

1) I saw a bot going back to pit without writing anything in the log, just as if DumbAI had been disabled.

2) this bot was really quick to do the pitstop. I looked at my code and saw that I gave a 3 seconds bonus for bots as they are a bit slower in the pitlane and depending on cars, the way I wake up them to make them go back on track may make them lose another couple of seconds. That may explain why with F1 cars, the pitstop is too quick but most likely, it is rather just vanilla AC that took control on the pitstop loop and disabled DumbAI

3) if you run a race as spectator, player 0 (yourself made as a bot by ctrl-C) does not follow DumbAI rules as the app is applied only to cars 1 to cars xx (considering they are bots). I wonder if it is not the same that happens if you get focus on another bot car.

I made the exact same race again but driving the car instead of running as a spectator and everything went well , all DumbAI functions were correctly applied.

Anyway, I changed the pit bonus to only one second for future version 1.1

Also I'll try to clear a bit how DumbAI is applied : maybe if I check if car is driven by AI instead of just using car index, it will be cleaner.

Here is a preview of UI for 1.1 as a bonus ;)
preview_1_1.webp


Load / save file system using .ini format has been added and is debugged. I added the possibility to set a default ini that is loaded at start of the session so that one can start to race without bothering about DumbAI settings

I just finished to debug Tyre Change only , with a new functions that make bots able to run out of fuel.

Still have to debug ReFuel only and Mandatory Refuel strategies, and verify that TyreChange&Refuel and Mandatory Mixed Compounds have not been destroyed by my modifications.

And then define alternate strategies and grid position accounting, for each strategy, and debug them :)
 
Last edited:
Hi Philip,

While debugging future 1.1 version, I noticed the bots behave strangely if you are running the race as a bot yourself and if you navigate between bots to observe what they do. And I was able to observe something like you did.

1) I saw a bot going back to pit without writing anything in the log, just as if DumbAI had been disabled.

2) this bot was really quick to do the pitstop. I looked at my code and saw that I gave a 3 seconds bonus for bots as they are a bit slower in the pitlane and depending on cars, the way I wake up them to make them go back on track may make them lose another couple of seconds. That may explain why with F1 cars, the pitstop is too quick but most likely, it is rather just vanilla AC that took control on the pitstop loop and disabled DumbAI

3) if you run a race as spectator, player 0 (yourself made as a bot by ctrl-C) does not follow DumbAI rules as the app is applied only to cars 1 to cars xx (considering they are bots). I wonder if it is not the same that happens if you get focus on another bot car.

I made the exact same race again but driving the car instead of running as a spectator and everything went well , all DumbAI functions were correctly applied.

Anyway, I changed the pit bonus to only one second for future version 1.1

Also I'll try to clear a bit how DumbAI is applied : maybe if I check if car is driven by AI instead of just using car index, it will be cleaner.

Here is a preview of UI for 1.1 as a bonus ;)
View attachment 1514613

Load / save file system using .ini format has been added and is debugged. I added the possibility to set a default ini that is loaded at start of the session so that one can start to race without bothering about DumbAI settings

I just finished to debug Tyre Change only , with a new functions that make bots able to run out of fuel.

Still have to debug ReFuel only and Mandatory Refuel strategies, and verify that TyreChange&Refuel and Mandatory Mixed Compounds have not been destroyed by my modifications.

And then define alternate strategies and grid position accounting, for each strategy, and debug them :)
Hey Ancient,

Yes — I was actually using Ctrl+C at that time as well when I observed the quick fuel usage, usually for the pole sitter.

I’ll run another test without using it. So just to confirm — the solution is simply not to use Ctrl+C?

The new features look awesome — I can’t wait to try them out! 😍

Best Wishes,
Philip
 
Hey Ancient,

Yes — I was actually using Ctrl+C at that time as well when I observed the quick fuel usage, usually for the pole sitter.

I’ll run another test without using it. So just to confirm — the solution is simply not to use Ctrl+C?

The new features look awesome — I can’t wait to try them out! 😍

Best Wishes,
Philip
Hey,

"the solution is simply not to use Ctrl+C?"

Yeah , could be. It is hard to give a more definitive answer with AC and CSP ^^ Some people (including myself) saw strange behavior when looking at race from AI point of view. The main one seems to be that the bot created from Ctrl+C seems to never follow the lua app instructions :-D

So when I debug, for pit strategy, usually I just start the race and go directly back to pits to stay and observe bot behavior, then I use the replay if I need to look at something that specifically happened during race (blue flag behavior debug etc...)

While debugging version 1.1, I observed a nasty bug where DumbAI was not correctly overriding the fuel level in the particular case in which car would pit at the specific lap that was expected by vanillaAC and another one even more tricky that would happen only when car would pit while having less than a little amount of fuel (probably 5L or something) in which case vanilla was able suddenly to take control again. Took me the afternoon to find a workaround.... but seems I found it with a small approximation (fuel is now free for the part of the pitlane ranging from pit position to normal AI spline, when they go out of pits)
 
Last edited:
ancient_3 updated DumbAI with a new update entry:

global update

Change log:

- new UI with tyres names and cleared presentation

- new load/save file system based on .ini format with the possibility to have a default.ini launched at start of the session

- new race strategies: "Mandatory Mixed Compounds without Refuel" & "Mandatory Refuel"

- consolidation of all older race strategies

- addition of a new AI behavior: "Running out of fuel"

- new random alternative race strategies, adapted to each race strategies

- fuel strategy adapted...

Read the rest of this update entry...
 
Hey Ancient,

First of all, the new update is awesome! I tried your suggestion not to use Ctrl+C, and everything works perfectly now. Thank you for this great update! 😍

There are two things I noticed in the new update:
  1. For some reason, not all compounds appear in the app, as you can see below. (This was working fine before.)
1771756388925.webp

  1. If I select mandatory refuel in situations where I don’t expect any compound change during the pit stop — only a tyre change to the same compound — does “Allow alternative strategy” override this setting?
I believe this might be the case, as I noticed some drivers went back to the pits after refuelling for an additional compound change. However, I wanted to ask for clarification.

(When I switched this option off, everything worked perfectly in this regard.)

Also I have an additional question:
If I use AI limitation in CM will DumbAI still work? (I know AI limitation creates temp folders in the cars folder)

Thanks in advance and best wishes,
Philip
 
Last edited:
Hey Ancient,

First of all, the new update is awesome! I tried your suggestion not to use Ctrl+C, and everything works perfectly now. Thank you for this great update! 😍

There are two things I noticed in the new update:
  1. For some reason, not all compounds appear in the app, as you can see below. (This was working fine before.)
View attachment 1515241
  1. If I select mandatory refuel in situations where I don’t expect any compound change during the pit stop — only a tyre change to the same compound — does “Allow alternative strategy” override this setting?
I believe this might be the case, as I noticed some drivers went back to the pits after refuelling for an additional compound change. However, I wanted to ask for clarification.

(When I switched this option off, everything worked perfectly in this regard.)

Thanks in advance and best wishes,
Philip
Hi Philip,

Thanks for the review :)

For the first point, I just tested it with Kunos SF70 and Kunos Lotus Exo 125 and everything is OK here, every tyres types appear. So I'd say it is linked to the car mod.

DumbAI reads up to 7 tyres types from the tyres.ini file in the car data and looks for 'FRONT',"FRONT_1","FRONT_2","FRONT_3","FRONT_4","FRONT_5", "FRONT_6" and "REAR","REAR_1","REAR_2","REAR_3","REAR_4","REAR_5", "REAR_6" fields and then, for each of them, it looks in the file at their "WEAR_CURVE" field to load the .lut file that eventually allows to compute the tyre wear and the need to get back to pit.

So in your case, likely there is something wrong there for the hard compound ?

If the mod is free , you can tell me where to download it and I'll have a look or if it is not free, you can still try to get the tyres.ini by: getting to Content in CM, select cars, then select your car, click on unpack data. Then navigate to your car folder in assettocorsa\content\cars , open the new data folder and tyres.ini should be in it.


For the second point, first I'd like to thank you for testing such detailed situation, it is the hardest to do for me as it takes a lot of time to experiment any situations, and there is a good amount of them with all these race strategies :)

For Mandatory Refuel, the bot logic is the following:
Was there an expected pitstop for fuel considering the race conditions sent by user (race length, fuel_mult, car max fuel content etc...) ?

If no, then create a new fuel strategy where I will divide my fuel amount into artificial stints so that I make at least one pitstop.

Then, a new choice, am I under an alternate strategy or not ? If not, just split my fuel amount in half and let's go . If I'm under an alternate strategy:
- if I chose a softer compound, then split my fuel amount in 3 and make a second pitstop. If everything is correct in the tyre strategy, I should now have the softer compound as default so this should result into 3 stints with softer compound only.

- if I chose a harder compound, let's keep it at one stop but increase the lenght of the first stint for about 75% if max fuel in tank allows it and then let me get back to the initial default tyres compound for the shorter second one, so this should result into 2 stints, one with harder compound and the other with initial default.

If there was an expected pitstop, then nothing happens for this strategy so it should not change its tyre compounds during race. (I made a mistake and forgot to add Mandatory Refuel strategy in this loop and so only Tyres&Refuel and Mandatory Mixed Compounds with Refuel do adjustement between fuel and tyres compounds currently so I'll correct it for the next update, so thanks again for the report )

So either you are in the case where bot had alternate strategy with harder compound with no expected pitstop at first glance, and so in race, should have made a pit stop later than default and changed its tyres compound from harder to default for this second stint, or something else is wrong in my code :)
 
Last edited:
Hi Philip,

Thanks for the review :)

For the first point, I just tested it with Kunos SF70 and Kunos Lotus Exo 125 and everything is OK here, every tyres types appear. So I'd say it is linked to the car mod.

DumbAI reads up to 7 tyres types from the tyres.ini file in the car data and looks for 'FRONT',"FRONT_1","FRONT_2","FRONT_3","FRONT_4","FRONT_5", "FRONT_6" and "REAR","REAR_1","REAR_2","REAR_3","REAR_4","REAR_5", "REAR_6" fields and then, for each of them, it looks in the file at their "WEAR_CURVE" field to load the .lut file that eventually allows to compute the tyre wear and the need to get back to pit.

So in your case, likely there is something wrong there for the hard compound ?

If the mod is free , you can tell me where to download it and I'll have a look or if it is not free, you can still try to get the tyres.ini by: getting to Content in CM, select cars, then select your car, click on unpack data. Then navigate to your car folder in assettocorsa\content\cars , open the new data folder and tyres.ini should be in it.


For the second point, first I'd like to thank you for testing such detailed situation, it is the hardest to do for me as it takes a lot of time to experiment any situations, and there is a good amount of them with all these race strategies :)

For Mandatory Refuel, the bot logic is the following:
Was there an expected pitstop for fuel considering the race conditions sent by user (race length, fuel_mult, car max fuel content etc...) ?

If no, then create a new fuel strategy where I will divide my fuel amount into artificial stints so that I make at least one pitstop.

Then, a new choice, am I under an alternate strategy or not ? If not, just split my fuel amount in half and let's go . If I'm under an alternate strategy:
- if I chose a softer compound, then split my fuel amount in 3 and make a second pitstop. If everything is correct in the tyre strategy, I should now have the softer compound as default so this should result into 3 stints with softer compound only.

- if I chose a harder compound, let's keep it at one stop but increase the lenght of the first stint for about 75% if max fuel in tank allows it and then let me get back to the initial default tyres compound for the shorter second one, so this should result into 2 stints, one with harder compound and the other with initial default.

If there was an expected pitstop, then nothing happens for this strategy so it should not change its tyre compounds during race. (I made a mistake and forgot to add Mandatory Refuel strategy in this loop and so only Tyres&Refuel and Mandatory Mixed Compounds with Refuel do adjustement between fuel and tyres compounds currently so I'll correct it for the next update, so thanks again for the report )

So either you are in the case where bot had alternate strategy with harder compound with no expected pitstop at first glance, and so in race, should have made a pit stop later than default and changed its tyres compound from harder to default for this second stint, or something else is wrong in my code :)
Ahh, I totally understand now.

Regarding the tyre issue, I didn’t notice any problems to be honest, and it worked well in your previous versions. However, please let me know if I’ve overlooked something. Here is the car:

Regarding the alternative strategy, the following is happening on my side:

Medium was the default, so every car that chose Medium is doing a one-stop race (around 90–100 L of fuel), which is exactly the expected behaviour.

However, those using the alternative strategy (choosing Soft, as Hard is currently unavailable due to issue #1) selected Soft but are still running a one-stop strategy — they are also starting with around 90–100 L of fuel. I assume they then perform a very short second and third stint afterwards, but at the moment it isn’t divided into three “equal” stints, at least not on my side.

Please let me know if my understanding is incorrect or if you need any additional data.

Thanks again,
Philip
 
Back