AI opponents: random unique AI

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
Posts: 2
Joined: 20 Jun 2020 16:05

AI opponents: random unique AI

Post by Exilyth »


Sometimes, picking 'random AI' gives the same AI for many slots, which can result in multiple instances of the same AI trying to build same looking structures in the same places, which can be highly undesirable due to e.g. the AI getting into each others way too much and/or resulting in highly non-aesthetic depot/station spam.

I'd like to suggest the addition of the value 'random unique AI' as an AI opponent choice.

The way opponents would be chosen could be changed as follows:

Code: Select all

1. pick all 'random' opponents
2. remove the AIs currently chosen for the game from the list of available AI (temporarily ofc.)
3. for each AI slot with 'random unique AI' set:
    3a. pick a random AI from the remaining AIs
    3b. add the chosen AI to the game and remove it from the list of available AIs 
(replacing a 'random unique AI' during a game could work similarly and if there's not enough AIs available it could start over with the full list or fall back to 'random AI')

This would guarantee that a random unique AI is never an AI which is already in the game, reducing duplication of AIs, e.g. choosing all opponents as random unique AI would make all AIs picked for the game unique (if enough different AIs are available).
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: Google [Bot] and 3 guests