1/27
Search

A.I. part THREE

I am happy to see you again for the third part of the AI devlog.


We now know how the AI issues its building orders and forms unit groups.

And that these are controlled by specific functions.

Let's take a closer look:



What is a platoon ?


Basically we call a group of units a platoon.

If the AI wants to execute an attack command, a platoon is formed and a program thread is started that controls the unit group.


A Lua class was written for this purpose, with which these groups can be managed.

There is a nice guide for me and all modders who come by there:



So we can simply create a new platoon with CreatePlatoon() and add more units to it with AssignUnits(). Now that we can create and manage unit groups, the last problem is...



How do I control a platoon?


Again, the operation of the Platoon Class is very simple and we only need a single command:

Platoon:StartAIFunction(platoonFn, ...)


platoonFn is placeholder for the name of the AI function to be executed.

As an example, let's take a simple attack function:




Here the nearest enemy unit is searched for and attacked from the position of the platoon.

And after a second of waiting, it repeats.

If anyone has ever wondered where self-learning AI agents could be used,

then this would be the perfect place for it. (I'm just thinking to myself here)



Is this all just theoretical, or will machine-learning AI definitely come to Sanctuary?


When reading an AI devlog, it should of course already be clear that an AI is being worked on. What was described here in the devlog already works.

Even if the AI is under construction, AI mods and modded units are already supported.


My personal plan is to complete the basic structure of the AI first.

With this I also want to ensure that modders will be able to develop a full AI.


For a few days it has also been possible to compete against the AI and carry out test games (AI vs. AI). This means that I can already answer the question of whether a rudimentary AI will be available with yes.



As always, I would like to thank you for your attention and look forward to the next devlog with you.


Regards, Uveso.

592 views

Recent Posts

See All