Latest Posts

Topic: Some improvement suggestions for build 20.1

WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-02-15, 15:57

king_of_nowhere wrote:

i would prefer extending atlantean fields to other tribes because they allow the farms to work better on maps with little space (archipelago sea, fjords)

+1


Wanted to save the world, then I got widetracked

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-02-15, 16:37

Solstice_s_Return wrote:

There's something else related to it too. I did a couple of simulations to see how the current maritime shipping algorithm works for the AI but before getting into any conclusion, I found that now AI does tons of useless farms.

Hm, interesting, can you tell which build and which map? Ideally you could provide a replay as well. However this is a completely different issue as the one discussed above

The weakness apparently comes from continuous dismantling of military buildings, which on big maps leads to vast areas of land without any military buildings. At the same time it seems that the current AI also favors small military buildings (possibly the main reason for a general weakness over b19 AI on the same map) and as a result it has more sparse distribution of stronger military buildings at its territory.

Although I believe dismantling doesn't need to be bad for AI in secured areas, as this territory can't be conquered by conquering a military building, there is a weakness in them dismantling big sites at the frontline as well. That is unfortunately well known and reported and I still try to find out what to improve code wise.

Finally a conclusion of the current AI seafaring capability: It is weaker than previous. Why? Because two times out of three it did not even begin constructing ships. It has a shipyard early on and harbor at around two hours into the game, but it never got any further in two out of three times.

Again please provide more detail as we can't do anything without knowing the build, the map and ideally have a replay or savegame. Although expedition is started late sometimes.

Edited: 2020-02-15, 16:37

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2020-02-15, 21:58

while ai has always been really bad compared to humans, i don't think military buildings factor much into it. military buildings are useless without the army within, and that's where the ai fails.

i do believe it could be much improved if the programmers accepted to have a separate ai for every tribe, and perhaps even different ai settings for different maps (large, small, close start, far start). the tactics to be used are different enough, humans can adapt, ai cannot. but if the devs guys don't want to, it's their call.


Top Quote
niektory
Avatar
Joined: 2019-06-03, 20:06
Posts: 206
Ranking
Widelands-Forum-Junkie
Location: Poland
Posted at: 2020-02-16, 05:16

Some games have the AI implemented as plugins, so it's possible to choose them at runtime, and even have different AI implementations playing in a single match. I think it's something worth considering, but probably not easy to implement.


Top Quote
Solstice_s_Return
Avatar
Topic Opener
Joined: 2020-01-28, 13:24
Posts: 62
Ranking
Likes to be here
Location: Finland
Posted at: 2020-02-16, 11:39

hessenfarmer wrote:

Solstice_s_Return wrote:

There's something else related to it too. I did a couple of simulations to see how the current maritime shipping algorithm works for the AI but before getting into any conclusion, I found that now AI does tons of useless farms.

Hm, interesting, can you tell which build and which map? Ideally you could provide a replay as well. However this is a completely different issue as the one discussed above

The weakness apparently comes from continuous dismantling of military buildings, which on big maps leads to vast areas of land without any military buildings. At the same time it seems that the current AI also favors small military buildings (possibly the main reason for a general weakness over b19 AI on the same map) and as a result it has more sparse distribution of stronger military buildings at its territory.

Although I believe dismantling doesn't need to be bad for AI in secured areas, as this territory can't be conquered by conquering a military building, there is a weakness in them dismantling big sites at the frontline as well. That is unfortunately well known and reported and I still try to find out what to improve code wise.

Finally a conclusion of the current AI seafaring capability: It is weaker than previous. Why? Because two times out of three it did not even begin constructing ships. It has a shipyard early on and harbor at around two hours into the game, but it never got any further in two out of three times.

Again please provide more detail as we can't do anything without knowing the build, the map and ideally have a replay or savegame. Although expedition is started late sometimes.

I did comparison tests with Tasmania and the version is 20-1 as noted in the header. I try to add later today one replay with b19 and one with b20, although the content of the b19 replay will be unchecked, but If I remember well, it will be the right one.

The b19 replay comparison will show these things: The b19 AI gains far more military strength during the course of the game, has a lot less problems with its buildings and is more determined to reach victory conditions. Also, it almost never fail with ship production and does successful expeditions albeit only along coastals. The replay of b20-1 which I'm going to send is the only time when AI successfully made a couple of ships, did an expedition (as I saw it moving back and forth aimlessly on an open sea) but failed to estabilish new colonies. So three out of three times has to be considered as failures.

The new barracs - building may also be the bottleneck here. I think it also led to the situation that when I built Colosseum to the Flinders Island, the trainer guy never showed up until I forced another trainer to resign from Arena at the King island. To get all helmets to the closest storage building I forced the barracks to empty its ware stock. However, there weren't any helmets at that point and as the production was mostly moved to Flinders Island (exept smelting), the problem might be mostly caused by me. Still I think that there should be base requirement for a couple of helmets and weapons in the storage buildings to ensure the availability of military trainers.


Top Quote
Solstice_s_Return
Avatar
Topic Opener
Joined: 2020-01-28, 13:24
Posts: 62
Ranking
Likes to be here
Location: Finland
Posted at: 2020-02-16, 11:52

niektory wrote:

Some games have the AI implemented as plugins, so it's possible to choose them at runtime, and even have different AI implementations playing in a single match. I think it's something worth considering, but probably not easy to implement.

I think that genetic algorithm with some internal adaptation capability would be the best possible solution. However, the current version seems to be an infant or a small kid while the previous non-genetic was somewhere close to its puberty.

Adaptation here means that for example, if an AI builds couple of farms that stay empty, it stops building more until it gets more farmers. Or at places where it gets first enemy contact and loses, it reinforces its defence by the next time.

And the farther away from the production centres, the bigger military buildings should be to withstand attacks long enough to get replacement units there. Vast areas of no buildings is a kind of a defence solution in itself, if new and big ones get built immediately and far enough from the border to get finished and occupied while enemy is trying to expand there. Of course areas full of small ones are very tricky to get through too, so it is a good defence tactic too..

Edited: 2020-02-16, 12:18

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-02-16, 13:04

Solstice_s_Return wrote:

Adaptation here means that for example, if an AI builds couple of farms that stay empty, it stops building more until it gets more farmers.

That is what the Ai is supposed to do in recent development build. More decisions got an additional weight to take the current economics into account.

Or at places where it gets first enemy contact and loses, it reinforces its defence by the next time.

that is hard to code and won't work against a human player anyhow. The problem is that never ever 2 situations are similar in the game so the concept is teaching the AI all relevant questions related in an decision and let it learn to weigh the answers.
Still this is only a meridian which should work on every situation while not being optimized for any situation.

And the farther away from the production centres, the bigger military buildings should be to withstand attacks long enough to get replacement units there. Vast areas of no buildings is a kind of a defence solution in itself, if new and big ones get built immediately and far enough from the border to get finished and occupied while enemy is trying to expand there. Of course areas full of small ones are very tricky to get through too, so it is a good defence tactic too..

Stopping the AI from stupid dismantling is a priority I agree. However having a lot of Big Building is ressource intensive and makes you loose a lot of ground if conquered. So this makes sense as soon as we have taught the AI the essential defense tactics (dismantle/destroy if building is about to be lost)


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-02-16, 13:15

Solstice_s_Return wrote:

hessenfarmer wrote:

Solstice_s_Return wrote:

Again please provide more detail as we can't do anything without knowing the build, the map and ideally have a replay or savegame. Although expedition is started late sometimes.

I did comparison tests with Tasmania and the version is 20-1 as noted in the header. I try to add later today one replay with b19 and one with b20, although the content of the b19 replay will be unchecked, but If I remember well, it will be the right one.

version 20-1 is probably not specific as our development builds all have this tag on them. When you start the game on the second screen (the main menu) in the lower left is the actual build. So if you talk about release 20, this is only a historical finding due to various changes we had since then in our development branch. To improve something I'd like to ask you to try with current development version again. By the way how did you do the observations?

The b19 replay comparison will show these things: The b19 AI gains far more military strength during the course of the game, has a lot less problems with its buildings and is more determined to reach victory conditions. Also, it almost never fail with ship production and does successful expeditions albeit only along coastals. The replay of b20-1 which I'm going to send is the only time when AI successfully made a couple of ships, did an expedition (as I saw it moving back and forth aimlessly on an open sea) but failed to estabilish new colonies. So three out of three times has to be considered as failures.

Ok I will have a look in them. But please specify the exact version of b20 (whether it is the release version or a more current dev build)

The new barracs - building may also be the bottleneck here. I think it also led to the situation that when I built Colosseum to the Flinders Island, the trainer guy never showed up until I forced another trainer to resign from Arena at the King island. To get all helmets to the closest storage building I forced the barracks to empty its ware stock. However, there weren't any helmets at that point and as the production was mostly moved to Flinders Island (exept smelting), the problem might be mostly caused by me. Still I think that there should be base requirement for a couple of helmets and weapons in the storage buildings to ensure the availability of military trainers.

getting a helmet and a spear into the same warehouse is difficult. but in the past this happened not only for trainiers but for recruits as well so theoretically in b19 you should have faced the same issue more often.
Normal way of solving this is setting one warehouse (the most proximate to production of these wares) to prefer these 2 wares and every other to don't stock or even remove. so it is clear where you get your trainer build.


Top Quote
Solstice_s_Return
Avatar
Topic Opener
Joined: 2020-01-28, 13:24
Posts: 62
Ranking
Likes to be here
Location: Finland
Posted at: 2020-02-17, 22:11

Here's two replays. If I didn't mess up anything they should be appropriate for this investigation. 27.1 Dated one is with build 19 and the other one with build 20 (release). It did not have a better version definition so this is the best I can get I guess. I haven't finished playing the latter game (and so haven't watched the replay yet), but I did an expedition specifically to find out if the seafaring AI opponent got any colonies estabilished and it didn't. The other two runs (not included) were total failures for AI as it didn't build any ships. The other things you will see here is most propably tons of useless farms as AI did so in the fully visible simulation runs. One another weird thing is also going on with this included actual b20 game: I ordered an expedition from the port in the Flinder's island (the biggest island at upper right area) and everything else got there but a builder didn't. I ordered more hammers and then there were eight of them in the headquarters but still no new builder was created. Maybe this is just what happens to the computer: there are scythes but somehow they can not be given to workers. There are also intresting fleet movements of empty ships at times.


Top Quote
Solstice_s_Return
Avatar
Topic Opener
Joined: 2020-01-28, 13:24
Posts: 62
Ranking
Likes to be here
Location: Finland
Posted at: 2020-02-17, 22:12

And the other one too as my zip wasn't allowed:


Top Quote