Writing an AI for colonizing planets

Posted on:December 28 2021

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.





Comments:


I always thought creating AIs in games must be the most fun part. Pity that my games never reached the state where there where playable, so no way I ever had the chance to try creating a game AI.
tom
Quote
2021-12-28 09:54:26


Would be cool if you would go a bit more indepth in a future post!
hans
Quote
2022-01-03 11:22:19


Add comment:


Posted by:


Enter the missing letter in: "Internation?l"


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons