AAI under development again :)

AAI under development again :)

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

AAI under development again :)

Post by submarine »

Hello together,

it has been quite a while since my last post/sign of life and I assume most of the people from 10 years ago are no longer active as well. Over 10 years ago, I wrote the AAI bot ("A" for the lack of creativity as my first name is Alexander and "three letter AI" names were quite popular back then ;) )

The main reason I stopped further development was a lack of time - during the last ten years, I did my PhD, became a professional SW developer, got married and started a family :)

As I advanced in my professional career I have little opportunity to use my coding skills anymore. Thus, I started to code in my private life again. After the first glance at the current AAI codebase I wanted to delete everything and restart from scratch. However, I decided to face the challenge and started to refactor AAI. I already fixed a few bugs (especially a crash in game) and can now play stable games with BA10.24.

So far, I worked on my own fork https://github.com/AlexanderSeizinger/AAI

My first goal is to finish the refactoring of some core components. After that I would raise a PR on the "official" AAI repo. Are there any active developers left? I noticed some forum posts from abma, would you be willing to merge my changes some time in the future?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: AAI under development again :)

Post by FLOZi »

Hi submarine, welcome back! S44 still going if you're interested in using it again. 8)
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: AAI under development again :)

Post by submarine »

Cool, that's great to hear that Spring44 is still being worked on. As a human player I really liked the unique game mechanics (though I was really bad...)

However, for an AI designed to play TA-like games S44 is very hard. My guess would be that it is easier to write an S44 specific AI from scratch. Is there any S44 AI? (I remember some very basic "build units and send them towards enemy HQ" AI)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: AAI under development again :)

Post by FLOZi »

Yes, and even harder now than back then.

There are a couple of AI's but effectively both are of the sort you describe.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: AAI under development again :)

Post by abma »

submarine wrote: 20 Jun 2020, 13:55 My first goal is to finish the refactoring of some core components. After that I would raise a PR on the "official" AAI repo. Are there any active developers left? I noticed some forum posts from abma, would you be willing to merge my changes some time in the future?
yes, for sure! please don't get frightened, AAI was removed from the official spring repository some time ago because it was unmaintained, but that seems to be solved soon, so when you create the pull request, i'll try to readd it.

glad to hear that + good luck! :-)
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: AAI under development again :)

Post by Beherith »

Awesomeness, excitedly looking forward to a testable/playable release :D
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: AAI under development again :)

Post by AF »

Why hello old friend, we meet again
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: AAI under development again :)

Post by submarine »

abma wrote: 21 Jun 2020, 23:11
yes, for sure! please don't get frightened, AAI was removed from the official spring repository some time ago because it was unmaintained, but that seems to be solved soon, so when you create the pull request, i'll try to readd it.
Don't worry, as it was crashing as soon as the AI finished its first storage it was not really playable. I wonder why I never stumbled upon that when this bug was introduced.

My plan is to finish the initial refactoring of the internal Buildtree (as it is rather entangled with all other parts this is a major package) and fix/improve some minor things on the way and then raise the first PR. Afterwards it should be in a playable state again and it's time to look at all the other parts :)

From my current point of view, the old code is really horrible...
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: AAI under development again :)

Post by submarine »

Just a short update:

After weeks of refactoring and > 100 commits I feel that things are moving in the right direction :) I fixed many smaller and a few more severe bugs in the process. I finished a major rework/refactoring of the Unit Selection/Buildtree (the criteria which are used to select units need to be reworked too to notice a visible improvement) and just started cleaning up the sector / map classes.

After that I can hopefully raise a big PR...
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: AAI under development again :)

Post by submarine »

Even though I still have many ideas for improvements I think AAI is now in a state where it can be used again.

@Abma: is there anything I should consider before raising a PR? How is the AI version increased?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: AAI under development again :)

Post by abma »

is there anything I should consider before raising a PR?
no, try and error i guess :-)

How is the AI version increased?
AFAIK https://github.com/spring/AAI/blob/master/VERSION + https://github.com/spring/AAI/blob/mast ... fo.lua#L24

the first one is the installation directory name and the second file is, what will show up as version in spring.
User avatar
IceXuick
Posts: 519
Joined: 14 Mar 2006, 01:46

Re: AAI under development again :)

Post by IceXuick »

Yeah!

The re-surfaced-Submarine!

Super nice to see many more 'old' people returning.
Awesome to see you're working on AAI again. For me personally it was the AI i played against the most.
Possibly over 400-500 hours.
Many thanks for that! (Which maybe also was a part in me returning back to Spring. - i couldn't find that fun in any other RTS ever since)

I can sometimes be blunt.. so i'll just get it out: Did you see/hear/played the new BAR already?
And would it perhaps be possible to get AAI in BAR as well?
Would be awesome!

Info and links etc are on: https://www.beyondallreason.info/

PS. I've fully switched to Discord, so i might not respond here quickly, but i'll try!
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: AAI under development again :)

Post by submarine »

Thanks for the nice words ;)

I test AAI with BA10.24. I figured out that detection of Metal Makers is currently broken; apart from that it runs very well (i.e. stable).

Is BAR very much different to BA or is it just visual/balance changes?

Can you build AIs yourself? You could check out my fork (link in the first post) and give it a try.
User avatar
Floris
Posts: 611
Joined: 04 Jan 2011, 20:00

Re: AAI under development again :)

Post by Floris »

The differences between BAR and BA 10.24 (other than visuals) isnt all that much, look at the changelog between the 2 versions here:
https://github.com/beyond-all-reason/Be ... ngelog.txt
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: AAI under development again :)

Post by submarine »

@Abma: I finally created a (huge) PR :) Next time, I will not wait that long.

@IceXuick: I checked the page but have not found time to try BAR yet. From what I have seen AAI should work with BAR, too. A proper config file (I assume BAR no longer uses the internal unit names from TA/BA) would be required though.

BTW: Your maps are really, really beautiful! I am really looking forward to getting water maps working properly again and doing the playtests on boulder beach :D
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: AAI under development again :)

Post by Beherith »

Most of the unitnames are still the same for BAR and BA, a handful of exceptions exist.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: AAI under development again :)

Post by submarine »

Thank your very much for merging, abma!

What is your preference in the future? Regular smaller PRs every few commits?
(in my professional life as as SW development consultant my hair would stand on end if someone raised such huge PRs :D )
Last edited by submarine on 27 Oct 2020, 19:44, edited 1 time in total.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: AAI under development again :)

Post by abma »

submarine wrote: 27 Oct 2020, 19:28 What is your preference in the future? Regular smaller PRs every few commits?
(in my professional life as as SW development consultant my hair would stand on end if someone raises such huge PRs :D )
as AI's are git submodules it doesn't matter if the changes are small or huge... basicly only you could review the changes. i can only do some basic tests and give feedback or review it when you request it: but thats difficult for large changes.

the changes/commits how you did look well, so its difficult for me to give proper feedback. the ci starts to work, when it compiles (which it doesn't atm with gcc 10.2 at least)
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: AAI under development again :)

Post by abma »

did you notice that your changes don't compile https://github.com/spring/AAI/pull/1#is ... -717416617 ?

where should i report errors? do you plan to do more changes? if so, IMHO it maybe makes sense to give to push commits to the spring/AAI, as still the submodule in the spring engine repo needs to be updated, too.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: AAI under development again :)

Post by submarine »

Sorry I have been away for a few days. I already raised a PR that hopefully fixes the issue.

Thanks again for asking!
Post Reply

Return to “AI”