Latest Posts

Topic: AI difficulty

eldarion
Avatar
Topic Opener
Joined: 2021-04-11, 01:23
Posts: 4
Ranking
Just found this site
Posted at: 2021-05-02, 12:43

Hello,

I have been playing Widelands for some weeks now and i'm having a blast. The only thing that lets me down is the difficulty.

On custom maps ("new game" option) the AI is too passive. I never had any resistance from the AI while attacking their towers (except for the defenders of said tower) and the AI never attacks my towers or tries in any way to conquer my area.

I've been playing with "Normal AI" (the hardest of the list) and usually my maps have the "HQ Hunter" or "Endless Game" objectives and Romans vs Romans.

The strange thing is that while playing the "Neptune's Revenge" map of the Roman tutorial campaign, i got my ass kicked trying to conquer the barbarian towers. The AI aggression was excellent. It reacted very strongly to my attacks and employed clever tactics. For instance, when i attacked one of their towers and leave only 1 soldier on my tower, they immediate counter attacked and conquered my tower.

So, my question is if i am doing something wrong or am i missing some option to increase the AI aggression while creating new games. If not, is there a way to do it by scripting or by console commands?

Like i said, Widelands is great on the construction phase of the game, but when i start the conquering phase, i loose the interest and start a new game because i know i will get no challenge there.

On a side note: i read on the forum some prepositions about higher difficulty levels for the AI based on increasing build times for the player vs the computer. I think the best approach (and harder to implement) would be the increase of the difficulty based on the AI aggression/responsiveness.

Thanks in advance.

Edited: 2021-05-02, 13:44

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

Hi eldarion,

the answer to your question is simple and complex altogether.
First of all there is no special trick to make the AI more aggressive. In the current dev builds (which I assume you are using) the Ai decides whether to attack based on a comparison of local powers as well as on overall powers.

The problem is that the AI takes a bit longer to get ready to produce military strength permanently as its decisions which buildings to build are influenced by actual shortfalls rather than preplanning. This can explain why it feels to be stronger in Neptunes Revenge as well as perhaps in empire 04. In both scenarios the player is delayed in its development due to various reasons while the AI opponent isn't (at least not that much). By this some of the disadvantage of the Ai is equalized making the fight a bit harder. However there are still some things that could be made better.
Generally a map maker can't influence the AI, but the designer can help the AI and disadvantage a single player if the map is not intended to be balanced. To make the AI more challenging you need to give it a lot of space and ressources nearby while the player needs to struggle for space and ressources a bit.
Furthermore you can choose different starting conditions. If the AI plays with trading outpost (or the even enhanced trading outpost from an addon) while the player uses a peaceful village on medium maps or struggling outpost on large maps this might make the games more interesting.


Top Quote
eldarion
Avatar
Topic Opener
Joined: 2021-04-11, 01:23
Posts: 4
Ranking
Just found this site
Posted at: 2021-05-02, 14:04

Thank you for the reply hessenfarmer. Yes, that makes sense. On my next play though i will do what you suggest and add some starting advantages to the AI and see how it plays. As a developer myself (although not a game developer) i understand that one of the most difficult areas is the implementation of a good AI.

I wonder if Widelands AI is at pair with the AI of settlers 2. Is Widelands mimicking Settlers 2 AI or it's something completely different? When S2 came out, i was more interested on other games at the time and now that (re)discovered this genre i'm having an hard time to play it, since i'm now spoiled by Widelands commodities.

Edit: and yes, you were correct. I am using a dev build.

Edited: 2021-05-02, 14:08

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-05-02, 14:25

I don't know about the S2 AI, as I don't have access to their Source code. So I beleive we are doing our very own thing.


Top Quote