[Freeciv-Dev] [bug #24662] get_discounted_reward(): ACTION_HELP_WONDER when only ACTION_TRADE_ROUTE available

2016-08-06 Thread Marko Lindqvist
Update of bug #24662 (project freeciv):

  Status:  Ready For Test => Fixed  
 Assigned to:None => cazfi  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24662] get_discounted_reward(): ACTION_HELP_WONDER when only ACTION_TRADE_ROUTE available

2016-08-04 Thread Marko Lindqvist
Follow-up Comment #3, bug #24662 (project freeciv):

Improvement for S2_6/TRUNK attached.

This fixes the exact bug I've reported in this ticket, but I think also the
optimization there in both old and new code is premature in a way that it
causes proper code to be used practically never, including most cases where it
would really be needed. Going to investigate that in a new ticket.

(file #28129)
___

Additional Item Attachment:

File name: ConsiderCaravanActions.patch   Size:3 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24662] get_discounted_reward(): ACTION_HELP_WONDER when only ACTION_TRADE_ROUTE available

2016-08-02 Thread Marko Lindqvist
Update of bug #24662 (project freeciv):

  Status:None => Ready For Test 
 Planned Release: => 2.5.6, 2.6.0, 3.0.0

___

Follow-up Comment #2:

> I've not checked if the logic was similarly broken before action enablers in
S2_5

S2_5 version of the bug is that the caravan evaluates the possibility to help
building wonder in opponent's city (and may act upon high want on that) since
it could establish trade route there.

Fix for S2_5 attached.


(file #28115)
___

Additional Item Attachment:

File name: AlliedWonder-S2_5.patchSize:1 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24662] get_discounted_reward(): ACTION_HELP_WONDER when only ACTION_TRADE_ROUTE available

2016-06-18 Thread Marko Lindqvist
Follow-up Comment #1, bug #24662 (project freeciv):

Affects also civ2civ3 since it too has limits on what cities trade routes can
be created to - and that's very much seen in autogames (logs filled with
failures to establish trade routes; telling that AI believed that it could do
it and thus attempted it when in fact it was not possible). In fact, with the
hardcoded rule of minimum distance of domestic traderoutes, maybe all rulesets
are affected to some extend.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24662] get_discounted_reward(): ACTION_HELP_WONDER when only ACTION_TRADE_ROUTE available

2016-05-12 Thread Marko Lindqvist
URL:
  

 Summary: get_discounted_reward(): ACTION_HELP_WONDER when
only ACTION_TRADE_ROUTE available
 Project: Freeciv
Submitted by: cazfi
Submitted on: Thu 12 May 2016 03:52:13 PM EEST
Category: ai
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 
 Contains string changes: None

___

Details:

get_discounted_reward() first checks that at least one of the related actions
is possible (or'ring), and then proceeds on the assumption that all of them
are.
For example when ACTION_TRADE_ROUTE is possible but ACTION_HELP_WONDER is not,
it may decide that ACTION_HELP_WONDER is more beneficial than
ACTION_TRADE_ROUTE and sets result->help_wonder.

If not checked if the logic was similarly broken before action enablers in
S2_5 (meaning that despite separate unittype flags, having one of them set
would let function to select either)

One result I've been seeing in a ruleset (variant2 would do) without
ACTION_HELP_WONDER enabler, is that when homecity starts building a wonder,
caravans turn back thinking they can get the benefit of a wonder building by
ACTION_TRADE_ROUTE, and only when they actually try to ACTION_TRADE_ROUTE it
fails due to zero distance between caravan homecity and destination.





___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev