Currently Online

Latest Posts

Topic: now we really need difficulty levels

king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-05-16, 18:24

this idea was triggered by another discussion, but i'm opening another thread to not go offtopic.

ever since i started playing I've been calling for difficulty levels because the AI was too easy. Now, however, I'lll reverse the argument. We'll soon need difficulty levels because the AI is becoming too hard.

It's still nowhere near a match for a skilled player, however not everyone is a skilled player. And in particular, new players are not. The current AI (7454) could already beat a new player without settlers experience aand without much mind for tactics, and I've been told that new improvements are on the way. My fear is that at the current level, the AI will become too difficult for a new player. therefore, a new player will download the game, try to play, get raped by the AI, lose the interest for the game. We'd stop receiving new players. We need an easy mode if we want to keep the game friendly for them, if we want more people to start playing this game.

It wouldn't even be too hard; it would require to deactivate some of the most recent Ai functionalities on easy mode. Alternativelly, my proposal of multiplying all the working times of the AI for a new parameter which is depenent on the difficulty level is still good, although that would require more programming.

Whatever way is chosen, now we really need at least an easy mode. a strong player can always find more challenges by self-inflicted penalties, like making no more than a certain number of farms, or avoiding certin promotions. a weak player cannot find a good challenge if the ai is too difficult for him. A stronger player is unlikely to stop playing for lack of a strong ai, but a weak player is more likely to quit playing if he cannot have fun. and everyone starts as a weak player, so we must avoid scaring them away.


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2440
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-05-16, 19:03

I agree with your thoughts. A new player shouldn't be overwhelmed by the ai.

We should think about, what we could do to avoid this.... some thoughts:

  1. Maps: We could make maps which makes expanding for the ai much harder then for the human player. F.e. less place for big buildings, or less ores. Saying: describe the startposition as easy/difficult/hard
  2. Define less inventories for the computer player.
  3. AI: Don't know if it is possible here in widelands: Make some of the ai functions optional. For years i coded a game called "Schiffeversenken" with an ai and 3 different levels of difficulty. I realized the three levels by skipping some of the ai functions to each level. In easiest level i skipped most functions (or adjust them to the level), in very difficult level i skipped none.

Just thoughts face-smile.png


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 00:54
Posts: 351
Ranking
Tribe Member
Posted at: 2015-05-16, 19:32

IIRC, the AI has two main scripts for workers:

Script 1:
* Walk out to tree (or rock or whatever).
* Cut down tree.
* Carry tree back to hut.
* Wait a while.
* Repeat.

Script 2:
* Produce a Ration (or axe or whatever).
* Put ration outside the hut.
* Wait a while.
* Repeat.

So in either case, you could add difficulty levels just by changing how long the AI waits between actions. I'm not good at programming, but if you just flat-out doubled the wait times, that should make the AI significantly easier to beat (and should take five minutes to make it fully testable, if even that much), while flat-out halving the wait times (rounded up if needed) should make an AI significantly harder to beat (and, again, just as easy to produce and test).

Someone really should try this out.

EDIT: Also, if you want even simpler difficulty levels, just fiddle with the starting ware amounts; the AI would be less of a pushover if they started with four times what the player did, while beginners would have an easier time if they started with four times what the AI did!

Edited: 2015-05-16, 19:35

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-05-16, 20:14

DragonAtma wrote:

So in either case, you could add difficulty levels just by changing how long the AI waits between actions. I'm not good at programming, but if you just flat-out doubled the wait times, that should make the AI significantly easier to beat (and should take five minutes to make it fully testable, if even that much), while flat-out halving the wait times (rounded up if needed) should make an AI significantly harder to beat (and, again, just as easy to produce and test).

Someone really should try this out.

Yes, that's exactly my main suggestion. multiply that time by a factor, which is 1 for normal level, more than 1 for harder levels, and less than 1 for easier levels. the advantage is that once the factor is implemented, it is highly customizable with minimal effort.

EDIT: Also, if you want even simpler difficulty levels, just fiddle with the starting ware amounts; the AI would be less of a pushover if they started with four times what the player did, while beginners would have an easier time if they started with four times what the AI did!

I don't like the idea of tampering with starting resources because the balancing effect is too dependent on the size of the map. if you have a large map, with contact after 4 hours of game (rremember, we're talking about a weak player who won't be able to expand fast) then a few more starting resources won't make much of a difference. In a duel map, they would be overwhelming. I'd like the difficulty setting to be consistent with map size. espeically considering that the new player has no way of knowing all of this.

For the same reason I don't like the idea of tweaking the maps. I would not want beginners to be barred from most maps. Also, a map imbalanced to favor a player, in my mind, has a much greater humiliating impact that just using easy difficulty setting.


Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2015-05-16, 20:32

Dont you think we should rename difficulty levels, because aggressive through defensive does not equal difficult to easy levels. AI player can be very smart, expanding fast but with very low tendency to attack.

I like the idea of slowing down the AI player. Now AI player "thinks" about every 0.5 seconds, so we can extend this time. Should not be that difficult to code.

Various starting wares - good idea, but objections of king_of_nowhere are very valid as well.

But I have another idea - we can limit max number of some critical buidings - like mines (count per type), or lumberjacs or so. Not all, better only couple of them because algorithms tent do be quite complicated and I am afraid to make significant changes.


Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 00:54
Posts: 351
Ranking
Tribe Member
Posted at: 2015-05-16, 21:00

I've occasionally seen games limit things (such as ship counts in AoE3), yet they never seem to provide a better reason than "Oh, it's to balance the game!"

So I don't see a reason to limit a player to a certain number of buildings, especially if they have half the map and ten times what their rival has.

As for changing starting resources, I see it as a backup so newer players -- or careless AIs -- are less likely to accidentally starve themselves of a key resource (which, in some cases, can be outright game-ending, such as outright forgetting to build a sawmill). Yes, I also realize how broken it could be (doubling an AI's starting wares on Crater is much bigger a problem than on, say, Riverlands), but it's also very easy to implement.


Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2015-05-16, 21:04

yes, new players does not know all that production dependencies so more starting wares can save them from "starving" as you called it.


Top Quote
einstein13
Avatar
Joined: 2013-07-28, 23:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-05-16, 23:13

I don't like idea of tweaking the times for production and wares. It is like cheating here.

Time between "thinking" for AI can be changed- that is the easiest way.

Also I don't think that we should consider making AI much easier. Now the AI is not the hardest one and it is quite simple to prohibit them from attack: you should have your soldier power higher than enemies. For me it is better to make different AIs, better than this one. Go forward than backward.

For sure we should save current AI for begginers face-wink.png There are some maps where AI can't play very well, but any person (even begginer) will have more possibilities. Also we can provide some begginer maps (for example huge empty place with resources, then wall of rocks and then small place for AI). Then new players will have possibility to know basics about the mechanics in the game.

So my idea is not to change productions in buildings and not to change starting resources. Better is to change time for AI between its steps (it can be even 3 seconds for easy AI). Also we should think about special AIs or just better AI for harder difficults face-wink.png

Tibor did great job, but we shoudn't stay at one place, but move on face-smile.png


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-05-16, 23:35

i also don't like limiting buildings. if you limit the smelting works to 2, it won't make any difference in crater, but it will cripple hard in ice wars. again, the way to balance should be equally good regardless of buildable space and time before enemy encounter


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-05-16, 23:40

einstein13 wrote:

I don't like idea of tweaking the times for production and wares. It is like cheating here.

Also, the worker and building production programs are part of the core game logic and affect all the players, even the human ones. All the AI does is decide when to build what, where to send a ship and when to attack.

Time between "thinking" for AI can be changed- that is the easiest way.

I agree. This would be an easy and fast nerf, without needing too much coding. This way Tibor could continue focusing on the core AI improvements.


Busy indexing nil values

Top Quote