Currently Online

Latest Posts

Topic: News about AI

Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2018-03-29, 22:11

Well, in fact I spotted this behaviour as well lately, there is indeed a bug (or poor design of code), I will prepare a fix

EDIT: to explain the issue better, AI counts fish in vicinity and considers the number, but when there is no spot with fish in vicinity, it builds (used to) the fisher hut near any water.... this is why this issue can go unnoticed a lot of time...

Edited: 2018-03-29, 22:39

Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2018-03-29, 22:24

Please test: https://code.launchpad.net/~widelands-dev/widelands/ai_fisher_fix/+merge/342427


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2018-03-29, 23:47

ok will test it tomorrow.
One other thing Ai still does not conquer mountains (at least not in reasonable time) although contained ressource is not available elsewhere. seems like the minable field tweak does not work properly. If wanted I could provide replays of my tests.
EDIT: Forget it just realized the tweak wasn't in my branch. Will test again.

Edited: 2018-03-30, 13:02

Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2018-03-30, 13:50

The net effect of mineable fields tweak is probably negative - until it is followed by some training. So please wait till another branch ai_new_wai_29032018 is merged into the trunk. It is result of about 20 rounds of training, too little but as usual I lack CPU power and time to train much more...

But this still does not guarantee that it will work better in the case you are referring to. If you have specific map, or replay I can look at the issue for sure...


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2018-03-30, 15:24

I use a very slightly modified map of crossing the horizon ( I just added a minimal amount of iron) to thest whether AI is able to leave the very restricted start island. If the AI conquers the iron spots and some gold spots at least babarians are managing to do so. but if they are reaching the iron or gold or not is more the less randomly distributed.
As a side effect the restricted maps shows some corner cases like for the fisher's huts. i have tested the fix and it does not work. have explained it more on launchpad.
I will give it another try with your ai valuesof the given branch


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2018-03-30, 23:50

I have tested the whole evening with modifying the Ai files a lot including setting all values to 100. never could provoke the Ai to conquer the mountains with the needed gold or iron. They did it just accidentally. so this is still a bug. and a critical one as well as otherwise the Ai si now good enough to escape from this small starting island.


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2018-03-31, 18:59

hessenfarmer wrote:

I have tested the whole evening with modifying the Ai files a lot including setting all values to 100.

??? Why to 100? The "problem" with WAI numbers is that number of combinations is astronomically high, so manual setting some random numbers has minimal chance to produce something useful. This is like radiating DNA - it can only harm, chances it leads to some super-organism is effectively zero...

They did it just accidentally. so this is still a bug. and a critical one as well as otherwise the Ai si now good enough to escape from this small starting island.

Restricted space is a problem for AI. I think a training would help a lot, including modifying fitness function - I can look at this again, but as I said many times - I am short of machine time to perform needed training. I am not a google or IBM with huge amount of iron (CPU time) to use for training of AI


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2018-03-31, 23:46

Ok that was just a frustrated move at all. before I dug all the relevant numbers from defaultai.cc and modified them to get a higher score for a building near a mountain with no normal building spot left to conquer, but this never went high enough as the parts of scor_parts were too few. where can I sen you my map or a replay to show you the behaviour?


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2018-04-01, 09:39

OK, then it was quite reasonable approach, but problem is that it is not enough. The network of relationships is so convoluted that such changes can backfire elsewhere...

I will modify the fitness function and train more...


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2018-04-01, 14:13

I was fully aware of the risk of a backdraft elsewhere. And I won't do this normally. However I wanted to see whether the AI could be provoked to build a military building just to conquer a reasonable amount of mountains. For now it seems it couldn't be provoked to do so. Will have a look in the code to see whether I could find a reason for that.


Top Quote