Topic: How to balance ai better, and other minor issues.

king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35 UTC+2.0
Posts: 1668
Ranking
One Elder of Players
Posted at: 2014-09-15, 19:25 UTC+2.0

Hi, First of all, let me congratulate you for the game. I've been a long time fan of settlers 2, and widelands improves on it without distorting the gameplay.

Now back to business. I've been playing only a week, but I already see a couple problems that in my estimation are very big. The first is also very easy to fix: the "save game" button is very close to the "exit game", misclicking is easy and it do not ask for confirmation. Add the fact that there are no writings on the button, and that the exit button in my mind really resembles the save icon (it is a door with an arrow pointing at it, but the door is square, like the floppy disk, and many programs use for saving the icon of a floppy disk with an arrow...). So, in one week I've been playing, I've already accidentally quitted at least twice. Thanks to the autosave I only lost minutes, not hours. Still, it would be nice if the game asked for confirmation once you click on exit.

The second problem, more importantly, has to do with gameplay. Namely, the bots suck. Hard. I set 7 bots in team against me, and I still won very easily. I barely lost a couple dozen soldiers in the whole game. I could do it in settlers 2 too, but it required considerable effort and hundreds of casualties on my part.

The key of the issue is the military training. in settlers 2, it only took 4 coins to make a general. that ensured that the ai could mount a good supply of them in an acceptable time. In widelands, getting all the promotions is much more difficult and - while that improves the gameplay from a human point of view - so the ai never gets them. even after 8 hours of being left undisturbed, the strongest bot only had a couple soldiers that only missed one promotion, and all the rest around halfway. with a dozen fully promoted soldiers, I could completely obliterate my stronger enemy, and the mechanic where wounded soldiers go back to their buildings rather than engaging morre opponents - I like that, by the way - made sure that all my winning soldiers survived. In fifteen minutes, the enemy had lost 200 units of military power, and I had one single casualty - an unlucky fight where my soldier lost against a much weaker opponent.

I read somewhere that you can alter the game so that the ai soldiers will start the game with already some promotions; however, in my opinion that does not fix the problem. it simply make the ai overwhelming in the early game, while still incredibly weak later. I would like to be able to survive an early contact with an ai, while also seeing it progress to the point that it can still offer a challenge after ten hours.

The key to that, I think, is to facilitate the bot access to higher training. For example, by setting an appropriate difficulty level (something that the game lacks, and that could be implemented) it could be possible to give the ai the advantage of getting two promotions at the price of one; that would have allowed the enemy of my game to have an army on par with mine, while still being manageable in the early game. Anyway, the trick would be something that would help the "hard level" ai getting top promotions for their soldiers.

Another thing I'd do would be to reduce the difference between power levels. I've seen that just one single extra promotion is enough to guarantee at least an 80% win chance. That's too imbalancing imo. I've always felt that the bigger weakness of settlers 2 gameplay was that whoever managed to get 4 coins in the same building basically won the game, and hailed widelands' slow promotion mechanics as a fix to that. but if the game still gives a huge advantage to whoever can get a single promotion of advantage, we have the same problem. I'd tweak the numbers a bit to ensure that an army with a slight advantage of promotions would also have a slight advantage on the field, not a decisive one.

I hope that was helpful to create a better ai and not the rambling of a guy who thinks he knows more than he actually does.

Oh, another minor thing I'd like to see implemented: on military buildings I can only pick "prefer rookies" and "prefer heroes". That means the game will spread all my best soldiers to all the places where I like to keep a non-negligible military presence. I'd like instead to be able to keep my good soldiers on the defensive front, but concentrate the very best where I intend to attack. I'd like to keep my desert borders guarded by decent soldiers in case an unexpected enemy comes out of the fog of war, but still focus the very best of my army where the fighting requires it. So, I'd like for a third option to be added, "prefer the very best". Or maybe you can put a similar priority counter on soldiers like you put on whares, to decide if sending heroes in that place is high, medium or low priority.

Again, thanks for the game, and for taking the time to read all this.

Edited: 2014-09-15, 19:27 UTC+2.0

Top Quote
Tibor

Joined: 2009-03-23, 23:24 UTC+1.0
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2014-09-15, 22:52 UTC+2.0

Hi,

thank you very much for your feedback


You probably played release version of widelands, but there are changes in AI on the way. You can even test them, of course compilation is not trivial, especially on windows. The branch/code is here: https://code.launchpad.net/~widelands-dev/widelands/tibor-ai5

The main goal of changes is to make economy of AI more robust, to prevent slow downs or even stagnations of computer players.

But more specifically to your comments. "Management of soldiers" is quite primitive.
* First - in generally, AI should build particular training facilities in reasonably short time and have them supplied - this should be improved in reworked AI.
* Second - AI sets preferences of rokkies vs heroes depending on fact if there is enemy or not in vicinity. Here it also controls target number of soldiers in building. (this is very primitive decisions making)
* And third - AI is making decision whether to attack or not (from particular military building).

But this is no exactly what you are mentioning - the stuff you are describing sounds like "micro-management" of soldiers and indeed it is not done by AI. The game itself has some algorithm for this stuff and AI does not interfere.


Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 10:53 UTC+2.0
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2014-09-16, 10:22 UTC+2.0

There is currently a discission at https://wl.widelands.org/forum/topic/1545/ about ensuring the best soliers are used in fights which may have some relevance to your points.

I have seen several posts about players wanting more micro management of military units, at times I feel I could do with more control, for example getting units to a point of attack before I commit to it, at other times the control I have seems right. I quite like the three buton priority idea, and perhaps a way to indicate that this biulding should be fully manned if possible, without resorting to going to all other buildings and reducing the manning level to one or two.

Have you tried the AI type setting when starting a new game? It defaults to aggresive which seems to be the easiest to beat, they will attack with weak forces at any oportunity, I think normal assumes that each of your buildings is fully manned and will only attack when it has a greater force, often prefering hero's. For a challenge can I suggest twin lagoons map, with only one opponent the AI does not divert into attacking other AI's, your resource management is critical to your sucess and due to the terrain attack and defence are not straightforward.

In the end I am hoping that the work on getting to AI to run it's economy better will solve a lot of problems, you have probbably found yourself that if you are short of just one training resource then your military just does not work properly, and an AI that mises several resources is no competition.

With reference to the save and exit buttons, this is the reson I hate icons, as every other button on the list has words why not replace the icons with the words Save and Exit, or you could edit the png files in the /worlds folder.

Edited: 2014-09-16, 10:41 UTC+2.0

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56 UTC+2.0
Posts: 3317
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-09-16, 12:17 UTC+2.0

I'll see what I can do about the exit button.


Busy indexing nil values

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35 UTC+2.0
Posts: 1668
Ranking
One Elder of Players
Posted at: 2014-09-16, 17:44 UTC+2.0

@ tibor: glad to hear that work to improve the ai is already underway. I suppose I wasn't the only one to point that out.

@ tinker: I've seen that discussion before posting, but it's pretty different; that one dealt with the algoritm that sorted which soldiers are sent out, while I was simply proposing to add some more chance for micromanaging in distributing soldiers among the various buildings. About the ai, I set it on aggressive because I assumed it would be hardest. Since ai can't rival my economy, I assumed that setting it to attack early, before my power start to grow, would complicate things for me. And in fact it does. the only game where I had some difficulties was in a small map where i was attacked after half an hour. Ai attacking other ai is not a concern because i play with all ai allied against me, so they don't attack each other. I guess I could try smaller maps for more challenge, but I like most about this game the chance to grow and expand and make long games wile building a lot of economy. Which is also the reason I'm not seeking the multiplayer right now. Now I'm trying a new game with normal ai, and I'm refraining from attacking it until its power grows to a reasonable level. Probably will finish the game during the weekend.


Top Quote
Tibor

Joined: 2009-03-23, 23:24 UTC+1.0
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2014-09-16, 20:50 UTC+2.0

One comment on aggressive-normal-defensive. This is something that should be thought over. Perhaps better divisioning would be hard-normal-easy.

Currently in reworked AI, the computer players compare own/enemy's military power as shown in graph and attacks based on the ratio. Defensive can attack if ratio is 1.2 (current computer player is 20% stronger then enemy), other ratios are 1.0 and 0.8. Side effect is that computer player should not exhaust itself attacking a stronger enemy.

But this is all difference there is there by now.

Also what is not implemented/considered is possible alliances of players.

If we changed to hard-normal-easy divisioning, I could modify economy growth - more specifically slow it down for normal and easy games. Thougt my feeling is that reworked AI is slow to "take off" - but good at maintaining the growth. But it would need real-life testing by human players, not just AI-only tests.


Top Quote
grantmasterflash

Joined: 2009-12-19, 14:12 UTC+1.0
Posts: 6
Ranking
Pry about Widelands
Posted at: 2014-11-28, 08:43 UTC+1.0

Tibor wrote:

If we changed to hard-normal-easy divisioning, I could modify economy growth - more specifically slow it down for normal and easy games. Thougt my feeling is that reworked AI is slow to "take off" - but good at maintaining the growth. But it would need real-life testing by human players, not just AI-only tests.

Please don't slow the AI down. The current level of AI competency should be made into the new easy or medium category. I'd really like to have a hard, harder and cheat (where the AI knows all your secrets) so it's challenging.

An additional complexity that would be nice is a Settlers type of categorization of AI players. Some were aggressive, some liked gold etc...


Top Quote