Merge lp://staging/~widelands-dev/widelands/ai_fisher_fix into lp://staging/widelands

Proposed by TiborB
Status: Merged
Merged at revision: 8647
Proposed branch: lp://staging/~widelands-dev/widelands/ai_fisher_fix
Merge into: lp://staging/widelands
Diff against target: 62 lines (+20/-7)
2 files modified
src/ai/ai_help_structs.h (+1/-1)
src/ai/defaultai.cc (+19/-6)
To merge this branch: bzr merge lp://staging/~widelands-dev/widelands/ai_fisher_fix
Reviewer Review Type Date Requested Status
GunChleoc Approve
hessenfarmer test and review Approve
Review via email: mp+342427@code.staging.launchpad.net

Commit message

AI tweak - fisher now strictly requires fishes in vicinity.

Description of the change

AI tweak - fisher now strictly requires fishes in vicinity.

NOT TESTED! But what can go wrong here :)

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3323. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/360061692.
Appveyor build 3130. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_ai_fisher_fix-3130.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Famous last words *lol* - I have done some minimal testing.

@bunnybot merge

review: Approve
Revision history for this message
bunnybot (widelandsofficial) wrote :

Refusing to merge, since Travis is not green. Use @bunnybot merge force for merging anyways.

Travis build 3323. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/360061692.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

fix is not working. Reason is that the algorithm counts all fish in the working radius, but fishermen only are able to extract the fish from the coast so even if there is no catchable fish at all. AI will (and is doing so in my tests) continue to build fishermen huts. Only thing is they now will be build in a region of 6 around the coast instead of 7 around the coast, cause the first water field had been emptied. So as the current game adds default fish to the maps where no fish is defined, we can't solve it in the editors. best thing would be to check whether there is a walkable and reachable field near the ressource befor considering it to be nearby

review: Needs Fixing
Revision history for this message
TiborB (tiborb95) wrote :

Indeed, this fix does not cover situation when fish are there but not reachable from coast.

But eliminates possibility of building a fishers hut in vicinity of water without fish at all.

I will modify the code once more...

Revision history for this message
TiborB (tiborb95) wrote :

OK, so I did it hard way, please test now

(some cleanup needed before merging)

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

still not working properly
see replay

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

didn't know how to add somethign to the branh so I created a bug reprot and added my replay there it shows both the fisher problem not being fixed and the problem with the non conquered mountain area

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

Did a playtest of the algorithm.
Code cleanup looks good.
Thanks to Tibor for his patience and support

review: Approve (test and review)
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3351. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/363043830.
Appveyor build 3157. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_ai_fisher_fix-3157.

Revision history for this message
GunChleoc (gunchleoc) wrote :

LGTM - just 1 nit for a comment. Please merge once it's fixed :)

review: Approve
Revision history for this message
TiborB (tiborb95) wrote :

OK, fixed, merging now
@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: