Latest Posts

Topic: News about AI

hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-08-13, 20:52

you can find the map in the Mission4 branch i recently added. it is in the campaigns folder the emp04.wmf. By the way if you have an improved babarian AI you could also try it on emp03.wmf. Perhaps you could train the Ai for babarian first on a map with more players as my mission maps are designed for only 2 players.
But this is leading me to a more general thought. As the different tribes require different tactics and strategies will it be possible to have an AI performing good with every tribe. It might be worth to have tribe specific AI values trained even if it is a lot more effort.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2017-08-16, 12:30

After some more playing rounds, it seems that the AI performs quite well on your map now. In the first games I watched, barbarians performed very poorly, but now they build a strong economy, manage to evade-train some soldiers; the blue empire AI had its first level 9 soldier (lacking one evade) after just over 2 hours (!), but the barbarians pushed them back slowly with masses of rookies and would probably have won if I´d watched long enough.

The training algorithm is a real disadvantage for barbarians. Trainingsites are set to 0 capacity until fully stocked, then 1 soldier is trained, then 0 again until full stocked… This works great for empire and not bad for atlanteans, but barbarians only manage to get a few double-evade-trained soldiers and nearly no attack/life trained ones. The AI always builds lots of training camps, far more than it can supply. I think a more flexible algorithm would improve the AI´s barbarian soldier training more than AI training can.


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-08-16, 13:53

Nordfriese wrote:

After some more playing rounds, it seems that the AI performs quite well on your map now. In the first games I watched, barbarians performed very poorly, but now they build a strong economy, manage to evade-train some soldiers; the blue empire AI had its first level 9 soldier (lacking one evade) after just over 2 hours (!), but the barbarians pushed them back slowly with masses of rookies and would probably have won if I´d watched long enough.

Glad to hear it.... I hope it has not get untrained too much on other maps...

The training algorithm is a real disadvantage for barbarians. Trainingsites are set to 0 capacity until fully stocked, then 1 soldier is trained, then 0 again until full stocked… This works great for empire and not bad for atlanteans, but barbarians only manage to get a few double-evade-trained soldiers and nearly no attack/life trained ones. The AI always builds lots of training camps, far more than it can supply. I think a more flexible algorithm would improve the AI´s barbarian soldier training more than AI training can.

Number of trainingsites is also governed by AI algorithm... But probably the mutations does not make too big impact to affect overall results of game....

Manipulation with positions is also done with genetic algorithm, but I can tweak it a bit to encourage barbarians for more relax approach.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-08-16, 20:20

I did some trial for myself with empire AI against babarian AI in multiplayer on my map with scripting turned off. I used the numbers you provided some days ago, so the Ai's were not specifically trained on my map. Surprisingly, in the normal map mode I can confirm your results. The two tribes were performing quite equal with that numbers, even some weaknesses in their respective starting slots got managed pretty well. I also noticed the thing with the training sites on babarian. But in the same way empire built a lot of arena's without upgrading one to colosseum. But thats minor stuff in my eyes. So the good news is that Tibors brainwork is performing really well. Congrats! that is really bringing the game to a new level if there is an AI with sufficient challenge for a player.
The bad news is I tried it in the scenario afterwards and the stats were not really promising. I can't watch a replay since there was no replay saved (don't know why but my version currently refuses to save a replay in a scenario). So I will have to complete the map to see what had been built by the AI.
will keep you informed.
@ Nordfriese if you have better training values could you provide them somewhere. (perhaps in your frisians branch?)


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

We don't have support for saving scenario replays, because we can't handle the scripting. This resulted in crashes in the past, so we turned it off in the code.


Busy indexing nil values

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-08-17, 21:00

ok then I know it is not a bug in my installation


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-08-18, 09:01

the branch ai_training_switch was finally merged into trunk. Also here is a new wiki: https://wl.widelands.org/wiki/Ai%20Training/ , it is still quite brief, but if there will be any questions we will update it.

In next branch I want to look at training sites.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-08-19, 00:24

Hi I was working to find out why the barbarians in my scenario don't work as expected. I found out that I didn't allow them the tavern, so they couldn't reach basic economy. But after allowing all buildings I found out that they never build a gamekeepers_hut so they don't reach it anyway. I tested this outside the scenario on the map in normal mode as well. They don't build a gamekeepers_hut although this is marked as basic building. Don't know why. Tried to comment the line basic amount out in init.lua of gamekeepers_hut. After that they reached basic_economy and everything went pretty fine. Could you please have a look on the code what could have caused this problem.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2017-08-19, 17:21

The problem with the gamekeeper reminds me of the fact that Frisian AI sometimes refuses to build a reindeer farm and seamstress, although one reindeer farm is basic economy. In my Frisians scenario, the frisian AI sometimes fails to build a reed farm (basic economy), so it gets deadlocked.

From now on, I´ll include the Frisians in AI training rounds. I included the trained files in the frisians branch recently and will continue including trained DNA in uploads.


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-08-19, 17:27

Nordfriese wrote:

The problem with the gamekeeper reminds me of the fact that Frisian AI sometimes refuses to build a reindeer farm and seamstress, although one reindeer farm is basic economy. In my Frisians scenario, the frisian AI sometimes fails to build a reed farm (basic economy), so it gets deadlocked.

From now on, I´ll include the Frisians in AI training rounds. I included the trained files in the frisians branch recently and will continue including trained DNA in uploads.

It is the very same problem - all of them are helper productionsites. So I am going to address it in new branch.

BTW a while ago a branch that improves building of trainingsites was merged to trunk. It would be convenient if you use it for further training. Of course with your actual wai files...


Top Quote