[George] Question of the Week
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
How was the AI in Transcendence designed? What did you keep in mind when designing it?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
My philosophy in designing the AI (in fact, in designing the whole game) has been consistent: don't worry about anything you don't need right this moment. In other words, I only add enough code to solve an immediate need and I don't worry (too much) about future requirements that I may or may not have.
Over time the AI has remained the same, only adding features as needed. There is one major change in design that is worth pointing out, however. Originally I introduced the concept of "controllers". The idea was that a controller was a C++ piece of code that implemented a ship AI in a particular style. My original goal was to create new controllers to achieve different ship AI behaviors. That is why, for example, Ferians and Gaians have their own controller.
I've since decided that was a suboptimal idea. Instead, in the future I am moving towards having a single controller (the default controller) and customizing ship behavior using TransLISP or AI settings.
Also in support of this I am moving away from complex ship orders. For example, an order like "tradeRoute" or "scavenge" could be implemented as a sequence of simpler orders ("dock", "wait", etc.) The Commonwealth traffic behavior code is a good example of how to create complex behaviors out of simpler orders.
Finally, looking forward, I want to add more variety to the AI. For example, it would be great to add new orders and/or AI settings to change the behavior of fighting ships.
Over time the AI has remained the same, only adding features as needed. There is one major change in design that is worth pointing out, however. Originally I introduced the concept of "controllers". The idea was that a controller was a C++ piece of code that implemented a ship AI in a particular style. My original goal was to create new controllers to achieve different ship AI behaviors. That is why, for example, Ferians and Gaians have their own controller.
I've since decided that was a suboptimal idea. Instead, in the future I am moving towards having a single controller (the default controller) and customizing ship behavior using TransLISP or AI settings.
Also in support of this I am moving away from complex ship orders. For example, an order like "tradeRoute" or "scavenge" could be implemented as a sequence of simpler orders ("dock", "wait", etc.) The Commonwealth traffic behavior code is a good example of how to create complex behaviors out of simpler orders.
Finally, looking forward, I want to add more variety to the AI. For example, it would be great to add new orders and/or AI settings to change the behavior of fighting ships.
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
Thanks for the response George. Ok, another follow-up question(s):
So with a singular controller for all ship AI, how would modders get access to that controller to add their own variety of controllers? Would we have to make our own, distinct from the controller, or would we modify the existing controller? Would it be like an event handler that gets tacked onto the AI ship?
Also, can we have a mode where the AI can take control of the playership and we could just watch? It would be nice for cinematics to have AI to control the playership to execute movement without player input.
So with a singular controller for all ship AI, how would modders get access to that controller to add their own variety of controllers? Would we have to make our own, distinct from the controller, or would we modify the existing controller? Would it be like an event handler that gets tacked onto the AI ship?
Also, can we have a mode where the AI can take control of the playership and we could just watch? It would be nice for cinematics to have AI to control the playership to execute movement without player input.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
- alterecco
- Fleet Officer
- Posts: 1658
- Joined: Wed Jan 14, 2009 3:08 am
- Location: Previously enslaved by the Iocrym
As it is now, when you spawn a ship with (sysCreateShip ..) the last argument you get to pass is a controller block, This piece of code is what will be called at any time the object does not know what to do. In there you can give any orders you feel like. When that set of orders has been accomplished, it will call the function again. That is how AI is defined. For more fine grained control, like combat AI, we still need some interfaces.