Latest Posts

Topic: Regression: Empire Ai failure

PkK

Topic Opener
Joined: 2012-01-06, 12:19
Posts: 236
Ranking
Widelands-Forum-Junkie
Posted at: 2017-05-03, 16:12

On the map Lesser ring 1.1, in builds 17 and 18, and AFAIR also 19, the Empire AI performed very well as the black player. With trading outpost starting condition it usually became the by far strongest late-game AI player (even though I also gave some other Ai player the same starting condition). Often, I'd use modified trading outpost starting conditions (giving more resources than normally) for the black Empire, green Atlanteans and purple Barbarian AI players. These tended to become rather strong, defeating their neighbours, and black Empire usually was the strongest among them.

Recently, I tried two games with current widelands. But both times, the black Empire AI failed. After a while expansion stopped or became very, very slow. On the other hand, the Barbarians and Atlanteans still do very well.

Savegames:

http://colecovision.eu/stuff/empire_ai_failure_1.wgf [a game where, two hours into the game, expansion is very slow; the black Empire performs even a bit worse than the AI players with HQ starting condition; black hasn't made contact with a neighbour yet; on the other hand, the Barbarian and Atlanteans with modified trading outpost starting conditions are busy conquering the lands of their neighbours]

http://colecovision.eu/stuff/empire_ai_failure_2.wgf [about 8 hours into a game; the black Empire AI, despite modified trading outpost starting condition is about to be defeated by its neighbour, which has HQ starting condition; one can see that the black Empire had stopped expanding about 2 hours into the game; on the other hand, the Atlantean and barbarian AI with modified trading outpost starting condition have fully defeated their neighbours].

Philipp

Edited: 2017-05-03, 16:16

Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-05-03, 21:59

Hi,
There were virtually no changes to the AI since build 19. Only thing that can make a bit difference is introduction of barracks. So in worst case scenario, no new soldiers are created. Can it be the case?
I dont remember any other changes that could affect the performance of AI.


Top Quote
PkK

Topic Opener
Joined: 2012-01-06, 12:19
Posts: 236
Ranking
Widelands-Forum-Junkie
Posted at: 2017-05-03, 23:56

Tibor wrote:

Hi, There were virtually no changes to the AI since build 19. Only thing that can make a bit difference is introduction of barracks. So in worst case scenario, no new soldiers are created. Can it be the case? I dont remember any other changes that could affect the performance of AI.

In the 2-hours game, barracks were built and have helmets and spears. But when I look at the latest replay they are not working, saying that the economy does not need soldiers. There are 5 soldiers in the HQ, and none in the arena.

In the 8-hours game, there also are barracks. No soldiers in the HQ, but that might be due to the war. When I look at a replay 2½ hours into that game, there are 28 soldiers in the HQ. The barracks again say that the economy does not need soldiers. There are no soldiers in the arena. No expansion is happening. No construction at all. When I look at the replay 4½ hours into the game, everything still looks the same for the black player. 28 soldiers in the HQ, etc.

Philipp

Edited: 2017-05-03, 23:56

Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-05-04, 07:49

I hoped the problem is in barracks, but obviously not.

As I said, there have been no changes to AI since build19 so there is nothing to revert. And fix is neither simple nor fast. And I am intensively working on experimental AI so I am not eager to invest my time to old AI.

Also dont forget that AI behaves quite randomly, and you can run AI-players-only game easily and be observer. So you can retest, maybe next time it will be better....


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-05-04, 09:44

Looks like the bug might be in the trainingsite code, but I don't see anything obvious.


Busy indexing nil values

Top Quote
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: 2017-05-04, 15:30

If I remember the trunk correctly, the target soldier quantity works for all soldiers. Suggestion: It should count only upgrade-less-soldiers.

Maybe this is the problem? I mean: Why should soldiers go to an arena if they are already trained in evade?


Wanted to save the world, then I got widetracked

Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-05-04, 15:58

WorldSavior wrote:

If I remember the trunk correctly, the target soldier quantity works for all soldiers. Suggestion: It should count only upgrade-less-soldiers.

Maybe this is the problem? I mean: Why should soldiers go to an arena if they are already trained in evade?

All the AI is doing is setting (max) capacity of soldiers in trainingsite depending on how well it is stocked - it changes it to 0 or 1.


Top Quote
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: 2017-05-04, 16:37

This is another problem of the AI, but it's not the one I'm talking about. Target soldier quantity is another expression for the economy limit of soldiers. In case that this limit concerns all soldiers, the players have to increase this limit step by step if they want to increase their number of trained soldiers. And a need for increasing an economy limit step by step is not very good


Wanted to save the world, then I got widetracked

Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-05-04, 16:42

Are you sure you mean AI as Computer Player?

AI does not manipulate the target for soldiers, should it? In my experimental branch it just stops/starts the barracks...


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-05-06, 11:15

I had a look at the first savegame. There are 48 soldiers sitting in the warehouses, so that the Barracks won't do anything is correct - we have plenty soldiers.

The reason that none of them are in the training site is that they already have all the Arena upgrades. If you take over the player and enhance the Arena to a Colloseum, the soldiers start moving there immediately.

So, this has nothing whatsoever to do with how soldiers are produced and upgraded; there must be something else that keeps the AI from expanding.


Busy indexing nil values

Top Quote