AI update

Post here if you want to help developing something for FAF.

AI update

Postby Thim » 05 Dec 2014, 15:12

Before I learned that FAF existed, I had been toying with my copy of Sorian AI, improving it in various aspects (and breaking it a few time) to the point where it was doing significantly better than the origonal Sorian. If I wanted to make a cleaned up version of this update, do you have any suggestions where to start? I know where the FAF source is, can test locally (albeit very crudely; I don't know of any way to print errors) and I am aware of the sticky posts on this forum, but I wanted to ask if anyone else had other useful info before embarking on this.
Did someone else already do this?
Is there something special about FAF's sorian AI pack?
Special coding protocol I need to follow?
Known big problems with AI?
How the AI classes fit together (I still never found the code that decides what to build, only code about what to do with platoons and how to sort units into platoons)
Thim
Crusader
 
Posts: 26
Joined: 08 Nov 2014, 02:48
Has liked: 0 time
Been liked: 1 time
FAF User Name: Thim

Re: AI update

Postby Resin_Smoker » 05 Dec 2014, 15:38

I'd suggest starting by providing better 3rd part mod support for custom units and enhancements. Beyond this both the in-game AI and Sorains tend to use a huge number of threads resulting in significant SIM slowdown as the number of units increases. Both SIM and tactical performance could use some love.

Side note: I've noticed a few instances where Sorains will attempt to issue orders to a dead or destroyed unit. Don't know if this is something you could look into but I think this could prevent situations where the AI appears to sit idle doing nothing.

Resin
Resin_Smoker
Evaluator
 
Posts: 856
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 104 times

Re: AI update

Postby Thim » 07 Dec 2014, 00:52

What is currently lacking in the support? I have found that just putting the relevent tags on a new unit allows the AI to know what to do with it (although making the AI build it is tricky)

Also, to my knowledge, Lua doesn't use true multi-threading. Am I just way off on this?
Thim
Crusader
 
Posts: 26
Joined: 08 Nov 2014, 02:48
Has liked: 0 time
Been liked: 1 time
FAF User Name: Thim

Re: AI update

Postby Resin_Smoker » 08 Dec 2014, 15:32

Thim wrote:What is currently lacking in the support? I have found that just putting the relevent tags on a new unit allows the AI to know what to do with it (although making the AI build it is tricky)

Also, to my knowledge, Lua doesn't use true multi-threading. Am I just way off on this?


Well as i understand it, adding a custom unit will offset the existing AI build order rather than just add to it. Hence adding a new unit type to the Scout platoon will replace the current units built for that platoon. At least this is what i understood from Sorian (years back). Is it possible to add new platoon types?

Question: can you provide an example of what you consider to be a "relevant tag" ? I ask because Sorian's instructions / examples were very sparse on this subject. Would be able to add specific units to specific roles and know with some level of certainty that the units would build without causing future issues for the AI down the road. (AI stalling and doing nothing)

BTW: Any changes / improvements you do should always come with a detailed read-me file for those souls wanting to improve it years later.

Resin
Resin_Smoker
Evaluator
 
Posts: 856
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 104 times

Re: AI update

Postby Thim » 08 Dec 2014, 18:58

Question: can you provide an example of what you consider to be a "relevant tag" ? I ask because Sorian's instructions / examples were very sparse on this subject. Would be able to add specific units to specific roles and know with some level of certainty that the units would build without causing future issues for the AI down the road. (AI stalling and doing nothing)


If you look at lua/AI/PlatoonTemplates.lua (note that if a readme exists for sorian AI, I never found it), there are lists of platoon types that the AI will try to organize. These each list a set of tags that are appropriate for units of that platoon, matching the categories section of the unit's blueprint (categories that most units already feature). I have yet to find the code that decides which platoons to assemble, but I do know that altering the strategies and composition of each platoon does cause a noticeable change in AI behavior. I have yet to try adding a new platoon to this list, and don't know if whatever black box is organizing platoons would pay attention.

As for building units, lu/AI/AIbuilders has several files regarding what to build under what conditions. These files refer to units by the unit's catagory, which is different from the category tags on the blueprints or in PlatoonTemplates.lua. There is another file somewhere that specifies what unit blueprint corresponds to what unit category, but I have found it once and it wouldn't be too tough to change the blueprint IDs, which in theory would result in new units being made. This could be part of a normal mod hook as far as I could tell, allowing mods that add units to have the AI support packaged in them.

This is why I was asking around for what other info people had on the AIs...
Thim
Crusader
 
Posts: 26
Joined: 08 Nov 2014, 02:48
Has liked: 0 time
Been liked: 1 time
FAF User Name: Thim

Re: AI update

Postby MandeR » 19 Dec 2014, 07:43

Bumping simply because I would love if someone could continue where Sorian left off on his AI...
MandeR
Crusader
 
Posts: 15
Joined: 19 Dec 2014, 07:29
Has liked: 3 times
Been liked: 2 times
FAF User Name: MandeR

Re: AI update

Postby Krapougnak » 19 Dec 2014, 11:43

Try asking Sprouto on the GPGnet forums the guy has a detailed knowledge of the AI.

http://forums.gaspowered.com/viewforum. ... 426718f15c
User avatar
Krapougnak
Contributor
 
Posts: 333
Joined: 12 Jul 2012, 11:03
Has liked: 178 times
Been liked: 24 times
FAF User Name: Krapougnak

Re: AI update

Postby MandeR » 19 Dec 2014, 22:12

Thanks! I read a couple threads he had been posting in and it looks like he's actually been doing quite a bit. I didn't see anything freely available though so I had to drop him a PM.

Hav any experience with his work?
MandeR
Crusader
 
Posts: 15
Joined: 19 Dec 2014, 07:29
Has liked: 3 times
Been liked: 2 times
FAF User Name: MandeR

Re: AI update

Postby Krapougnak » 20 Dec 2014, 13:05

I have downloaded his AI and tried it a year ago, was promising, since then, I haven't had time to give it a serious try. But the guy is available in the forums and answers quite often. From what I get he has developed a deep understanding of how SCFA AI works.

He is open to new playtesters but you have to pm him first to get access to his work. So wait and see... . Keep us posted plz. :)
User avatar
Krapougnak
Contributor
 
Posts: 333
Joined: 12 Jul 2012, 11:03
Has liked: 178 times
Been liked: 24 times
FAF User Name: Krapougnak

Re: AI update

Postby MandeR » 20 Dec 2014, 22:45

You're right, Sprouto got back to me quickly and now I'm just waiting for him to email me the installer. He remarked that the LOUD AI project is still 'very much alive' and that he's welcoming more play testers. You should totally drop him a line.

Also, he invited me to send the installer out to whomever...so if anyone would like a copy just let me know.
MandeR
Crusader
 
Posts: 15
Joined: 19 Dec 2014, 07:29
Has liked: 3 times
Been liked: 2 times
FAF User Name: MandeR

Next

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest