patchFreeciv - Patches: patch #4015, Occupying unit value

 
 
Show feedback again

patch #4015: Occupying unit value

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Wed 17 Jul 2013 06:33:43 PM UTC  
 
Category: aiPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.4.1, 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 07 Nov 2013 10:21:44 PM UTC, SVN revision 23704:

When AI calculates value for unit capable of occupying cities, choose
higher one of the values based on units capability to occupy city or kill
enemy unit. It was always assigning value based on occupying ability for
the units capable of unit, even if that was the lower one. This change may
cause AI to build more land units instead of ships, as now also land units
get value based on unit killing ability when it's higher than one based on
city occupying ability.

See patch #4015

(Browse SVN revision 23704)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 07 Nov 2013 10:21:34 PM UTC, SVN revision 23703:

When AI calculates value for unit capable of occupying cities, choose
higher one of the values based on units capability to occupy city or kill
enemy unit. It was always assigning value based on occupying ability for
the units capable of unit, even if that was the lower one. This change may
cause AI to build more land units instead of ships, as now also land units
get value based on unit killing ability when it's higher than one based on
city occupying ability.
Also made value of the target city to affect value of occupying unit.

See patch #4015

(Browse SVN revision 23703)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 07 Nov 2013 10:21:27 PM UTC, SVN revision 23702:

When AI calculates value for unit capable of occupying cities, choose
higher one of the values based on units capability to occupy city or kill
enemy unit. It was always assigning value based on occupying ability for
the units capable of unit, even if that was the lower one. This change may
cause AI to build more land units instead of ships, as now also land units
get value based on unit killing ability when it's higher than one based on
city occupying ability.
Also made value of the target city to affect value of occupying unit.

See patch #4015

(Browse SVN revision 23702)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 29 Oct 2013 10:23:29 AM UTC, comment #4:

- S2_5/TRUNK versions updated against svn

(file #19282, file #19283)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 25 Aug 2013 11:15:21 PM UTC, comment #3:

- Updated against svn

(file #18767)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 20 Jul 2013 03:37:08 AM UTC, comment #2:

New TRUNK/S2_5 version

- Halved the occupier desire factor. It's not like we're guarateed to conquer the city even if we build unit capable of occupying. AI was building too many occupier units ignoring the fact that it needs units to defeat the defenders too.

(file #18361)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 17 Jul 2013 07:20:54 PM UTC, comment #1:

S2_4 version.

Assuming this makes it to 2.4.0, but postponing to 2.4.1 is not a problem if required.

(file #18321)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 17 Jul 2013 06:33:43 PM UTC, original submission:

Attacker unit capable of occupying a city has value based solely on its own price.

- Unit that could also kill defenders, and value for that would be calculated higher than city occupying value, still get the lower value. From the logging from my test games that actually happens a lot - resulting in that those units that cannot occupy and thus get assigned the defender killing value are preferred over units capable of occupying
- Target city does not affect the value of occupying

Attached patch for TRUNK & S2_5 fixes both parts. Occupying unit value is based on city value, and final value is higher of the occupying and defender killing values.
To get effectively worth of any enemy city (including those running another ai type) new functions added to ai callback interface and building advisor code is adjusted. These changes are too intrusive for S2_4, but I'm about to make S2_4 version that takes care of the case where defender killing value should be used instead of low (in S2_4) occupying value.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #19282:  OccupierValue-4.patch added by cazfi (8kB - text/x-diff)
file #18767:  OccupierValue-3.patch added by cazfi (8kB - text/x-diff)
file #18361:  OccupierValue-2.patch added by cazfi (8kB - text/x-diff)
file #18321:  OccupierValue-S2_4.patch added by cazfi (2kB - text/x-diff)
file #18318:  OccupierValue.patch added by cazfi (8kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Nov 2013 10:21:57 PM UTCcazfiStatusReady For Test=>Done
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Tue 29 Oct 2013 10:23:29 AM UTCcazfiAttached File-=>Added OccupierValue-4.patch, #19282
      Attached File-=>Added OccupierValue-S2_5-4.patch, #19283
    Sun 25 Aug 2013 11:15:21 PM UTCcazfiAttached File-=>Added OccupierValue-3.patch, #18767
    Sat 20 Jul 2013 03:37:08 AM UTCcazfiAttached File-=>Added OccupierValue-2.patch, #18361
    Sat 20 Jul 2013 03:22:59 AM UTCcazfiPlanned Release2.4.0, 2.5.0, 2.6.0=>2.4.1, 2.5.0, 2.6.0
    Wed 17 Jul 2013 07:20:54 PM UTCcazfiAttached File-=>Added OccupierValue-S2_4.patch, #18321
      Planned Release=>2.4.0, 2.5.0, 2.6.0
    Wed 17 Jul 2013 06:33:43 PM UTCcazfiAttached File-=>Added OccupierValue.patch, #18318
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup