I started implementing the AI for competitor companies for
Cargo Company, my transportation simulation game.
There are trains, trucks and rockets in the game, so for starters, I decided to implement the first version of the AI for building rocket transportation lines between the various planets. Because it is simpler than for example planning a large railway track around difficult terrain additionally.
So in order to create a new transportation line, the AI has to decide a few things:
What am I going to transport? Passengers between Earth and Moon?
Helium-3 between Moon and Mars? Obviously, it would choose the type of line with less competition and the most possible profit.
So, next: where is the best place to build the launch pads? For example:
If I transport passengers, is it best to take into consideration where the town and colonies will grow to? Which industry building do I choose?
Should I create just one launch pad on the moon and transport cargo and passengers there using trucks or trains? Or do the simpler but more expensive version and simply place a launch pad wherever I need one?
Should I try to pick government subventioned resources first?
What types of rockets do I use? Is researching first worth it or should I just buy the smaller rocket engines initially?
What configuration should the rocket parts have? Should I build the rockets so that I can transport multiple types of resources? Or simply go for the one resource - one rocket approach?
Appart from the implementation details, tons of questions like these pop up.
Writing a game AI isn't very easy. But it surely is fun.