DumbAI

DumbAI 0.3

Changelog:

- major code refactoring:
everything decided at the bot level has been implemented in the bot class so that methods can easily access a common memory of what is happening during the race for the bot. Takes a bit longer to compute at each frame but huge improvement for implementation of more complex adaptative strategies in the future.

- Default tyre compound: default value is now the second tyre compound, usually medium.

- Qualifying behavior: is recreating CSP behavior but ensuring things like "no more than 3 laps in a qualifying run" etc... is deactivated by default as it does not bring so much right now, but could be useful later if blue flag behavior is added to this session

- Pit strategy:
-- default means no effect of Dumb AI on pitstops

-- Tyre Wear: has been completely rewritten so that DumbAI makes AI pits at the same level of wear when tyres become "red" on your classic tyre GUI apps. It is dynamically computed and takes into accound the Tyre Wear multiplier from Content Manager, which means that with this mode activated, the number of pitstops is not limited, AI goes to pit when needed and changes its tyres to selected "Default tyre compound".

-- One Stop, Mixed Compounds: adds a mandatory pit stop at 1/3rd of the race to change tyres. Bug correction where AI would set Wet Tyres in the second run if Hard tyres were selected as default for the first run. Now, DumbAi automatically adjust the strategy: if hardest compound is selected, then proceed to 2/3rd of the race and put the next softer compound for the last remaining 1/3rd. Tyre Wear is still activated, so if any tyres become "red", AI should to pit for a supplementary pitstop to put a new set of default compound and would still make its mandatory stop at 1/3rd to change compounds.

-- One Stop, Mixed Compounds with Take Qualifying Results into account: the last quarter of the grid tries an alternate inversed strategy. Basically, if top of the grid is on medium for 1/3rd, alternate will try hard for 2/3rd and medium later and conversely if top of the grid is on hard.

- Fuel management: Many things for fuel management are now coded inside DumbAI , e.g. automatic computation for equivalent stints for long races and a dynamic check for Refuel, both taking into accound Fuel Multiplier. Unfortunately, there is a bug in AC which prevents lua app to get the hand on pit stops decided by AC with its vanilla fuel strategy. Once this is solved, I'll be able to use this to produce fuel / tyre strategies.

- Questions about deactivating DumbAI: I did not have enough time to make a proper kill switch. If you want to completely deactivate the app, the best is to compress it in zip/rar into your apps folder and delete the uncompressed app folder so that it won't load. The default values in DumbAI 0.3 (if you touch nothing at the start of the session) lets only the Blue Flag behavior during races and set the tyres to Medium or the second softest tyres (maybe it deactivates also the ability of CSP to automatically put rain tyres)
Changelog:

New functionalities:
- qualifying session: AI waits for a random amount of time before going out on track, then run 3-4 laps (depending of pit location against the finish line) and go back to pit to wait 60 seconds before going out for another run

- alternate pitstop strategy: if Mixed Compound selected, alternate pitstop strategy reverse the strategy for the last quarter qualified -> those AI start with the harder compound and pit at 2/3rd of the race

Small things:
  • new UI to include new functionalities and show the detailed settings only on demand
  • code cleaning
  • small bug corrected for sessions where AI is not present
  • Like
Reactions: fto_10
Dumb AI 0.1

new UI:
  • DumbAI parametrization can be done on the setup menu before the race
  • main Window while racing or replay serves only to look at different track & variables to check for model logic ; it is deactivated by default
  • DumbAI logs are shown in the lua debugger

new functionalities and bug corrections:
  • sliders are now correctly connected to model variables
  • all AI cars put selected tyres at the start
  • enhancement of Blue Flag behavior with a more complex check just after having been outlapped before returning the normal AI line
  • pit strategy available: strategy "Normal" = going to pit when tyres wear over 90% ; strategy "One Stop, Mixed Compounds" = cut lap numbers in three and make the AI pit and change its tyre compound at 1/3 of the race
  • refined decision model of blue flag behavior
  • added a Bot class to simulate driver strategy later
  • fixed a bug in the spline lateral offset
  • fixed a bug in distance computation (thanks to Tetri)
  • added an UI thanks to Tetri
  • changed blue flag behavior

Attachments

  • icon.webp
    icon.webp
    21.1 KB · Views: 5
- allowed the lapped car to retrieve normal max throttle and normal AI spline once they are lapped
added Blue Flag Behavior and made some clearance in the Rain pit part
Back