Latest Posts

Topic: Some small Ideas, improving a lot

king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1636
Ranking
One Elder of Players
Posted at: 2020-04-11, 19:15

Nordfriese wrote:

Ähm… could you please define how exactly this X value is to be determined? It first sounded like a per-player factor that can reduce production times for hard AIs, now it's suddenly a single number…?

it's a single number for every player. so, at most 8 numbers.

but the number stays the same throughout the game once defined. So, you start blue player and as human X is 1. Say you set up a hard AI, with X=0.5. Then for the rest of the game blue player has X=1 and red player has X=0.5

and it's just a single number. nothing to break there

I'm not going to accept arguments like this face-wink.png I recently fixed a desync that was also caused by one wrong 8-bit number. One-number-changes have broken savegames and replays and introduced desyncs and logic bugs countless times already.

yes, i acknowledged that it would still require having other parts of the code pointing to it.

then again, can you think of something else to have a settable difficulty that is consistent throughout the game and that is less complicated?


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 901
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-04-11, 19:25

king_of_nowhere wrote:

Nordfriese wrote:

Ähm… could you please define how exactly this X value is to be determined? It first sounded like a per-player factor that can reduce production times for hard AIs, now it's suddenly a single number…?

it's a single number for every player. so, at most 8 numbers.

but the number stays the same throughout the game once defined. So, you start blue player and as human X is 1. Say you set up a hard AI, with X=0.5. Then for the rest of the game blue player has X=1 and red player has X=0.5

Thanks for the explanation. So if we want to keep this a single-player feature, it could be implemented by setting this for each player when the AI instances are created, and multiplying all times in production programs with this factor throughout the game. For savegames and especially replays this would still involve a lot of fragile hacking because there is no place for this kind of information yet.
In summary, doable, but a lot of effort for a questionable gain…

and it's just a single number. nothing to break there

I'm not going to accept arguments like this face-wink.png I recently fixed a desync that was also caused by one wrong 8-bit number. One-number-changes have broken savegames and replays and introduced desyncs and logic bugs countless times already.

yes, i acknowledged that it would still require having other parts of the code pointing to it.

then again, can you think of something else to have a settable difficulty that is consistent throughout the game and that is less complicated?

Let the AIs start with trading outpost


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1636
Ranking
One Elder of Players
Posted at: 2020-04-11, 20:18

Nordfriese wrote:

then again, can you think of something else to have a settable difficulty that is consistent throughout the game and that is less complicated?

Let the AIs start with trading outpost

trading output gives a fixed amount of resources continuously (or only provided the headquarter is empty, not sure about it). this is important in a small map, while in a large map with huge economy it gets lost.

so, it is not consistent throughout the game.


Top Quote
simplypeachy
Joined: 2009-04-23, 12:42
Posts: 142
Ranking
At home in WL-forums
Location: Hampshire, UK
Posted at: 2020-04-11, 20:28

blind3rdeye wrote:

My thinking is that when I play a game vs the AI, the outcome essentially comes down to what happens at first contact; because the AI basically just attacks until they run out of soldiers. So if I'm strong enough to defend my core infrastructure, I win; otherwise I lose. When the AI has a starting advantage, it means I have to try to avoid a fight to survive the early game; but once I'm set up, the early game advantage doesn't matter anymore. I'd prefer if the AI's advantage was a bit more persistent. This way, in a FFA with AI players, the later players might still offer some resistance.

An excellent piece of writing on how to increase the computer player's effectiveness across the length of a game, which is far more important than their starting situation.


I need less fish :-(
Update: I definitely need less fish :-((
_aD on IRC

Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 476
Ranking
Tribe Member
Posted at: 2020-04-11, 20:32

If we want to strenghten AI in the mid and long game, maybe adding soldiers randomly would help after 1 hour every 10 min a soldier who is randomly trained -?


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 1389
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-04-11, 21:25

the-x wrote:

If we want to strenghten AI in the mid and long game, maybe adding soldiers randomly would help after 1 hour every 10 min a soldier who is randomly trained -?

only a few posts above we already discussed that the Ai is wasting its soldiers attacking with half healed and every single soldier until they are completely worn out. if we can get it to not doing so and increase their ability to train this might help better. I know this is also hard to achieve but I belive the effort is better spent on this then on any "simple" hack which might cause a lot of side effects all around the code.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 1389
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-04-11, 21:27

king_of_nowhere wrote:

Nordfriese wrote:

Ähm… could you please define how exactly this X value is to be determined? It first sounded like a per-player factor that can reduce production times for hard AIs, now it's suddenly a single number…?

it's a single number for every player. so, at most 8 numbers.

but the number stays the same throughout the game once defined. So, you start blue player and as human X is 1. Say you set up a hard AI, with X=0.5. Then for the rest of the game blue player has X=1 and red player has X=0.5

Have thought a second time about your proposal. This will only work if the AI has full productivity in the whole chain. If it lacks some ressources which it constantly does this might not have the desired effect anyway.


Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 476
Ranking
Tribe Member
Posted at: 2020-04-11, 21:57

hessenfarmer wrote:

the-x wrote:

If we want to strenghten AI in the mid and long game, maybe adding soldiers randomly would help after 1 hour every 10 min a soldier who is randomly trained -?

only a few posts above we already discussed that the Ai is wasting its soldiers attacking with half healed and every single soldier until they are completely worn out. if we can get it to not doing so and increase their ability to train this might help better. I know this is also hard to achieve but I belive the effort is better spent on this then on any "simple" hack which might cause a lot of side effects all around the code.

Well the best part of the AI is that it can play competetivly by attacking which is a very good thing, we should not lower. So like your proposal we should add 10 or 20 soldiers at once - or make the AI if it has finished his first attack moves - event to change his strategy then (or add random events)


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 1687
Ranking
One Elder of Players
Location: North of Germany
Posted at: 2020-04-12, 00:09

niektory wrote:

One thing to keep in mind for it to work is ensuring that rushing with the starting force is not effective. In other words, making sure that with equal forces the defender has an advantage.

I'm not so sure about that. On large distance, the defender already has an advantage (because he doesn't waste his resources for expanding, so he can invest in a stronger defense). So we have some variety in the game - short vs long distance - which can be appreciated.

On small maps, the possibility to rush with with the starting force might be important for Non-Atlanteans vs Atlanteans.


Top Quote
blind3rdeye
Avatar
Joined: 2020-03-26, 08:47
Posts: 46
Ranking
Pry about Widelands
Posted at: 2020-04-12, 02:14

Regarding the AI's decision making for attacks. I think one of the flaws in the way the AI uses soldiers is that they trickle in attackers who have essentially no chance of doing any damage. The AI is just throwing away soldiers. So I've got a suggestion about AI behaviour. (I haven't read the existing code for this, so I'm not sure if what I'm saying is a viable or sensible idea.)

When the AI launches an attack, it should remember:

  • Where it chose to attack (or at the very least, which player it was attacking)
  • The net strength of its attack (a rough sum of all the stats of the soldiers sent out)
  • Some measure of the outcome; perhaps a ratio like (net strength of enemies killed) to (net strength of our soldiers killed), or perhaps something just as simple as number of enemy soldiers killed

My basic idea is that if the AI launch an unsuccessful attack, it should then know to not attack again until it can launch of a stronger attack force. unsuccessful could simply mean that zero enemy soldiers were killed; or it could be something more complex related to the ratio mentioned above. And of course, the decision making should include a random chance to just attack again anyway, just so that players can't predict & exploit the AI behaviour too easily.

...

And as a complete aside, someone mentioned defender advantage - and I know that has come up a few times in other threads. I've got a little thought-bubble idea for that. Someone recently informed me the chance of a soldier winning a skirmish was significantly affected by which soldier strikes first. Perhaps the rules of battle could be such that the home-ground soldiers always strike first - or are more likely to strike first - or strike first under certain circumstances (such as when they come out of a building). It's not really on-topic for this thread, but its just a little idea that I haven't yet given a lot of thought too.


Top Quote