Donation

Help us to pay our server!
(: Consider a donation :)



Social Media

  • Facebook
  • Google+

Latest Posts

Topic: aihints help

Tinker
Avatar
Joined: 2014-09-12, 10:53
Posts: 130
Ranking
At home in WL-forums
Location: DDR
Posted at: 2018-01-12, 12:50

I can not find much documentation on aihints but have managed by trial and error to get some idea of what is possible.

I am using one aihints currently for three buildings used by three tribes. Amonst other lines there is one " normal_ai_limit = 2", this works fine for 2 tribes but empire seems to ignore it and builds 20 or 30 of the building. If all tribes built so many then I would assume my use of the hint was wrong, could it be that empire handles the hint differently?


Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1053
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2018-01-12, 13:14

Tinker wrote:

I can not find much documentation on aihints but have managed by trial and error to get some idea of what is possible.

I am using one aihints currently for three buildings used by three tribes. Amonst other lines there is one " normal_ai_limit = 2", this works fine for 2 tribes but empire seems to ignore it and builds 20 or 30 of the building. If all tribes built so many then I would assume my use of the hint was wrong, could it be that empire handles the hint differently?

There is not such entry (normal_ai_limit) recognized by AI, so this is pure luck that it "works" for some tribes face-smile.png

But I wonder if it is right that the game silently ignores non-existing ai-hints (e.g. might be typo or so....)


Top Quote
Tinker
Avatar
Joined: 2014-09-12, 10:53
Posts: 130
Ranking
At home in WL-forums
Location: DDR
Posted at: 2018-01-12, 22:17

Mmm, I tried several variants before I found one that seemed to work, but you say it was just luck. If there is no way to limit normal ai from building more than a set number of a type of building? Perhaps there should be, or is there another, preferred, method of limiting buildings. The lack of help files about ai is really a drawback. I really want to help improve ai performance, partly as that is all I can play against, but also new players probably prefer ai opponents as they learn the rules.


Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1053
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2018-01-12, 22:30

Tinker wrote:

Mmm, I tried several variants before I found one that seemed to work, but you say it was just luck. If there is no way to limit normal ai from building more than a set number of a type of building? Perhaps there should be, or is there another, preferred, method of limiting buildings. The lack of help files about ai is really a drawback. I really want to help improve ai performance, partly as that is all I can play against, but also new players probably prefer ai opponents as they learn the rules.

There was no "business case" for limiting buildings of normal AI, we limit only weaker ones. Limiting buildings for normal AI player would be very questionable and controversial...

EDIT: I dont believe you can do much with aihints and players are not expected to edit them so they will barely miss the documentation. Anyway, we have some in ai_hints.cc: http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/src/ai/ai_hints.cc#L25

Edited: 2018-01-12, 22:45
Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2200
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-01-17, 15:02

https://wl.widelands.org/docs/wl/autogen_ai_hints/


Top Quote