Remove some native AIs from spring?

Remove some native AIs from spring?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Remove some native AIs from spring?

Post by abma »

currently there are several native AIs shipped with spring, they work more or less:
AAI
E323AI
KAIK
RAI
CircuitAI
Shard

currently afaik only CircuitAI is maintained, the others are basicly unmaintained for years. For simplifying maintenance and reducing compile time i suggest to remove AAI, E323AI and RAI because i remember them to have bad code or are more weak.

So only keep KAIK, CircuitAI and Shard which are shipped / compiled with spring.

What do you think about this?
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Remove some native AIs?

Post by Silentwings »

Seems reasonable to me.
User avatar
MasterBel
Posts: 271
Joined: 18 Mar 2018, 07:48

Re: Remove some native AIs?

Post by MasterBel »

Whether my progress trying to make Spring work with Mac has any significance is yet to be seen;
RAI is the AI that works best on macOS. I haven't verified these observations on my more recent builds (I removed all AIs to save time) but KAIK crashes on game start, and Shard usually crashes 15 minutes into a game.
I've never run CircuitAI, though – I'll make sure to test that too.

Also, welcome back abma. Good to see you around again. :)
raaar
Metal Factions Developer
Posts: 1094
Joined: 20 Feb 2010, 12:17

Re: Remove some native AIs?

Post by raaar »

Removing some seems like a good idea. Many of those only work on one or two games. If KAIK and Shard crash, they should also be removed.

I thought Shard had moved to a lua-only gadget AI.

There needs to be some way for games to tell lobbies which AIs are recommended for them.

Maybe we could add the recommended AIs for each game to the games list on the wiki


related SL github issues about AI filters:
Recommended maps, AIs and engines hints #817
add bot should split AI into categories : recommended, other
Last edited by raaar on 07 Sep 2019, 14:59, edited 1 time in total.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Remove some native AIs from spring?

Post by gajop »

Ideally we should remove all and make AIs possible to distribute without bundling them with Spring..
That's probably hard to achieve however, so let's just remove the unused ones as a first step.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Remove some native AIs from spring?

Post by FLOZi »

gajop wrote: 07 Sep 2019, 07:23 Ideally we should remove all and make AIs possible to distribute without bundling them with Spring..
That's probably hard to achieve however, so let's just remove the unused ones as a first step.
This.
raaar wrote: There needs to be some way for games to tell lobbies which AIs are recommended for them.
Also this. (Relevant: viewtopic.php?f=21&t=19627)
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Remove some native AIs from spring?

Post by Jools »

abma wrote: 06 Sep 2019, 23:57 currently afaik only CircuitAI is maintained, the others are basicly unmaintained for years. For simplifying maintenance and reducing compile time i suggest to remove AAI, E323AI and RAI because i remember them to have bad code or are more weak.
If we always simplify maintenance then we also need fewer maintainers and also admins so then it's also time to reduce those.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Remove some native AIs from spring?

Post by Silentwings »

If we always simplify maintenance then we also need fewer maintainers
Wrong way around. The (non-lua) AIs have few maintainers and then it becomes necessary to simplify their maintainence.

Back on topic,
gajop wrote:Ideally we should remove all and make AIs possible to distribute without bundling them with Spring..
That's probably hard to achieve
Perhaps not so hard - I think it is likely that the native AI interfaces are on their way to a slow death, and that lua AIs will eventually take over. I rate this as probably a good thing, and one consequence is that it mostly solves the distribution issue.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Remove some native AIs from spring?

Post by FLOZi »

Jools wrote: 07 Sep 2019, 18:12
abma wrote: 06 Sep 2019, 23:57 currently afaik only CircuitAI is maintained, the others are basicly unmaintained for years. For simplifying maintenance and reducing compile time i suggest to remove AAI, E323AI and RAI because i remember them to have bad code or are more weak.
If we always simplify maintenance then we also need fewer maintainers and also admins so then it's also time to reduce those.
How many admins do you think there are? :?
User avatar
ThinkSome
Posts: 387
Joined: 14 Jun 2015, 13:36

Re: Remove some native AIs from spring?

Post by ThinkSome »

Isn't CircuitAI made for ZeroK? Would anyone really suffer if all engine AIs were wiped out?

Edit: CircuitAI + 104.0.1-1218 + s44 test-5474 = "ui/customdialogs.cpp:215 Engine exited with nonzero code 11". Nothing particular in infolog, it just exited.

delete delete delete delete delete engine AIs
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Remove some native AIs from spring?

Post by abma »

ok, thanks for the feedback. i've deleted AAI / RAI / E323AI:
https://github.com/spring/spring/commit ... 711cc06244

ThinkSome wrote: 08 Sep 2019, 01:54 Isn't CircuitAI made for ZeroK? Would anyone really suffer if all engine AIs were wiped out?
yes, but as we have currently no nice way to distribute native ais IMHO its better to keep it with the engine.
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Remove some native AIs from spring?

Post by hokomoko »

It's good to have maintained AIs in the repo to easily test that things compile OK and to ease shipment.
User avatar
ThinkSome
Posts: 387
Joined: 14 Jun 2015, 13:36

Re: Remove some native AIs from spring?

Post by ThinkSome »

Just delete them all in springlobby like I did and let the afk AI devs develop them in their own safe space, where they won't bother any one.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Remove some native AIs from spring?

Post by Forboding Angel »

Just delete them all. @hoko, doesn't it make more sense to just use a game with a built in luaai for that sort of testing? Evo/BAR/ZK all have luaai, I think metal factions has one, Pretty sure that the cursed has something.

The fact of the matter is that these native ais help literally no one and have been the source of a lot of distribution issues in the past.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Remove some native AIs from spring?

Post by PicassoCT »

I've used rai for jw testing.. It crashed after a while though
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Remove some native AIs from spring?

Post by hokomoko »

Forboding Angel wrote: 10 Sep 2019, 03:50 Just delete them all. @hoko, doesn't it make more sense to just use a game with a built in luaai for that sort of testing?
No, I want to test the C/Cpp interface, not the AI.
I can't do that with a lua AI.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Remove some native AIs from spring?

Post by Forboding Angel »

Ahhhh ok that makes sense. I don't suppose something like nullai is enough for that?
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Remove some native AIs from spring?

Post by very_bad_soldier »

hokomoko wrote: 08 Sep 2019, 10:22 It's good to have maintained AIs in the repo to easily test that things compile OK and to ease shipment.
If testing is the main reason to keep the AI then I think you should consider to use unit tests instead.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Remove some native AIs from spring?

Post by abma »

very_bad_soldier wrote: 10 Sep 2019, 17:18 If testing is the main reason to keep the AI then I think you should consider to use unit tests instead.
we use unit tests and ais for testing... just search for "validation test" in the bugtracker to see some examples.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Remove some native AIs from spring?

Post by AF »

AAI etc were built with a paradigm Kloot pushed where if something went wrong in the AI, it was better to hard crash, rather than feign a working AI and ruin the gameplay for the player. The player would then know something went wrong, report the bug, and it would get fixed. Hence, they're not built to be failure proof.

NTai and Shard took the other approach, of doing their best to put up a fight when something went wrong, but giving the player the choice as to wether to continue or not, but native Shard doesn't do much, it's a lua interface wrapper with some additional shiny things. Thus Shard requires very little maintenance.

Shard as a project though has lived on more as a Lua AI gadget, with various forks thanks to the efforts of various people. It could be continued as a native project by adding various libraries to improve the AI for parallelism, terrain analysis, ML, etc, but the cost of native AI dev is super high in comparison to lua AI.

So:

- keep it as long as you like, but keep in mind I don't maintain it
- if necessary, poke me via email or twitter, I don't check here often enough
- if you're interested in Shard, look at the docs, then join the AI/dev channels for Evo and BA discords
Post Reply

Return to “Engine”