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: 3543
Joined: 01 Jun 2009, 00:08

Remove some native AIs from spring?

Post by abma » 06 Sep 2019, 23:57

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?
3 x

User avatar
Silentwings
Moderator
Posts: 3581
Joined: 25 Oct 2008, 00:23

Re: Remove some native AIs?

Post by Silentwings » 07 Sep 2019, 00:14

Seems reasonable to me.
0 x

MasterBel
Posts: 157
Joined: 18 Mar 2018, 07:48

Re: Remove some native AIs?

Post by MasterBel » 07 Sep 2019, 00:20

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. :)
1 x

raaar
Metal Factions Developer
Posts: 807
Joined: 20 Feb 2010, 12:17

Re: Remove some native AIs?

Post by raaar » 07 Sep 2019, 00:25

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.
0 x

gajop
Moderator
Posts: 3022
Joined: 05 Aug 2009, 20:42

Re: Remove some native AIs from spring?

Post by gajop » 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.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6103
Joined: 29 Apr 2005, 01:14

Re: Remove some native AIs from spring?

Post by FLOZi » 07 Sep 2019, 13:01

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)
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: Remove some native AIs from spring?

Post by Jools » 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.
0 x

User avatar
Silentwings
Moderator
Posts: 3581
Joined: 25 Oct 2008, 00:23

Re: Remove some native AIs from spring?

Post by Silentwings » 07 Sep 2019, 19:37

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.
1 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6103
Joined: 29 Apr 2005, 01:14

Re: Remove some native AIs from spring?

Post by FLOZi » 07 Sep 2019, 21:17

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? :?
1 x

User avatar
ThinkSome
Posts: 286
Joined: 14 Jun 2015, 13:36

Re: Remove some native AIs from spring?

Post by ThinkSome » 08 Sep 2019, 01:54

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
1 x

abma
Spring Developer
Posts: 3543
Joined: 01 Jun 2009, 00:08

Re: Remove some native AIs from spring?

Post by abma » 08 Sep 2019, 10:20

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.
0 x

hokomoko
Spring Developer
Posts: 578
Joined: 02 Jun 2014, 00:46

Re: Remove some native AIs from spring?

Post by hokomoko » 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.
0 x

User avatar
ThinkSome
Posts: 286
Joined: 14 Jun 2015, 13:36

Re: Remove some native AIs from spring?

Post by ThinkSome » 08 Sep 2019, 12:22

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.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14574
Joined: 17 Nov 2005, 02:43

Re: Remove some native AIs from spring?

Post by Forboding Angel » 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? 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.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10207
Joined: 24 Jan 2006, 21:12

Re: Remove some native AIs from spring?

Post by PicassoCT » 10 Sep 2019, 07:05

I've used rai for jw testing.. It crashed after a while though
0 x

hokomoko
Spring Developer
Posts: 578
Joined: 02 Jun 2014, 00:46

Re: Remove some native AIs from spring?

Post by hokomoko » 10 Sep 2019, 14:22

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.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14574
Joined: 17 Nov 2005, 02:43

Re: Remove some native AIs from spring?

Post by Forboding Angel » 10 Sep 2019, 16:57

Ahhhh ok that makes sense. I don't suppose something like nullai is enough for that?
0 x

User avatar
very_bad_soldier
Posts: 1371
Joined: 20 Feb 2007, 01:10

Re: Remove some native AIs from spring?

Post by very_bad_soldier » 10 Sep 2019, 17:18

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.
0 x

abma
Spring Developer
Posts: 3543
Joined: 01 Jun 2009, 00:08

Re: Remove some native AIs from spring?

Post by abma » 10 Sep 2019, 17:29

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.
0 x

User avatar
AF
AI Developer
Posts: 20668
Joined: 14 Sep 2004, 11:32

Re: Remove some native AIs from spring?

Post by AF » 13 Oct 2019, 22:55

AAI etc were built with a paradigm Kloot pushed where if something went wrong in the AI, it was better to hard crash, then 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, but native Shard doesn't do much, it's a lua interface wrapper with some additional shiny things. Thus Shard requires 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
0 x

Post Reply

Return to “Engine”

cron