Hi, > Gesendet: Donnerstag, 05. November 2015 um 22:19 Uhr > Von: "Michael T. Pope" <mp...@computer.org> > > On Wed, 4 Nov 2015 21:37:50 +0100 > win...@genial.ms wrote: > OK, that makes sense. I think its 5 experts though (multipleMax). You > are right though that there should be a brake on this to stop requesting > when there are plenty of experts, and it should also be suppressed when > the bonus would be reduced. In practice though, colonies change their > production priorities moderately often, so many wishes (should:-) get > dropped.
There is a -1 to the number of experts before the maximum is taken, so the result can increase for up to 6. I think reducing that 6 to 3 is better. > > Together with what I wrote above I assume a single colony could suck up all > > experts of one type leaving none for other colonies. > > I think it should prioritize based on higherlevel buildings standing in the > > colony, and as a tie breaker on input material production. > > IMHO the expert should go where it can have most effect. When the big > AIColony rewrite was done, that was very hard to work out. The production > code has since been improved, and it should be easier. Yeah, when I play my thinking is "find colony/workplace where this expert produces most stuff and arrange for raw materials" not "look at each colony what it could use then calculate some priorities". This is one of the things I hope can be improved someday. > > > > how workerwishes never get deleted, > > > > > > WishRealizatioMission calls completeWish which deletes wishes. Is this > > > not > > > happening? > > > > Sorry, when writing this I did not think of distinguishing deletion of > > outdated wishes which for some reason the colony does not need anymore > > (for example the forests got cut down and no more trappers or woodcutters > > needed or higher level materials stopped being produced there for some > > reason), > > which I was writing about, from cleaning up fulfilled wishes. > > updateGoodsWishes deletes outdated wishes, updateWorkerWishes does not > > Goods do not have missions (although a bunch of code would be nicer if > they did), so they need special handling in updateGoodsWishes. > WishRealizationMission cleans up completed worker wishes because it is in > control when the wish is completed. Goods have transport missions, but thats besides the point. I was writing of Wishes which can not be easiliy fulfilled, never get assigned to a mission and then should be deleted by the AIColony when the conditions change. > Anyway, my reservations aside, there is certainly enough substance here > that this area could do with a revisit. I have got as far as grabbing and > reading your aicleanup patch, and expect to start merging it soon. BTW, > why in an abstract class like AIPlayer do you want to have methods with > empty implementations (i.e. "{}"). Surely declaring them abstract > is clearer? Normally yes, but I decided it would be cleaner that way: - removeAIColony and removeAIUnit are optional hooks for when an AIPlayer is creating more data structures. Both get overwritten only once and I think in that case its better to provide a sensible default than force duplicated dummy implementations. - getNeededWagons, scoutsNeeded and completeWish are necessary to avoid type testing for EuropeanAIPlayer (and resulting crashes in alternative AI-implementations), mainly in AIColony, AIUnit and some Missions. Some tests sadly do that, too, and I still need to figure out a solution for these. As native players are not using AIColony and have that ai-settlement code inline (and its problematic as multiple inheritance would not work, but adding an interface would clutter the code more and require type testing for the hypothetical weird EuropeanAIColonyCallbacks interface in AIColony), its currently better to provide dummy methods in the AIPlayer base class (until other code can be reorganized, if even possible). Greetings, wintertime ------------------------------------------------------------------------------ _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers