patchFreeciv - Patches: patch #3384, autosettler check current danger

 
 
Show feedback again

patch #3384: autosettler check current danger

Submitted by:  None
Submitted on:  Sun 08 Jul 2012 01:32:42 AM UTC  
 
Category: aiPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Originator Email: -unavailable-
Open/Closed: ClosedPlanned Release: 2.4.0, 2.5.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)

Mon 04 Mar 2013 10:08:17 PM UTC, comment #10:

> I'll leave that to future tickets (and probably TRUNK only).

Raised bug #20587 for safe-keeping.

Jacob Nevins <jtn>
Project Administrator
Wed 20 Feb 2013 01:58:13 PM UTC, comment #9:

> I think this is due to is_square_threatened() calling
> is_ground_threat(). Given that nothing else uses this function,
> perhaps it should be changed to not care about the unit move
> type?


To make it work well, a bit more work is needed. It should not abort work when settler is not on the coast, but still the sea unit is within checked range, or when sea unit is not able to coastal bombardment...
I'll leave that to future tickets (and probably TRUNK only). This already fixed the biggest problem of pirates killing all the AI workers.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 19 Feb 2013 09:19:48 AM UTC, comment #8:

I had a go with this on S2_4, and while workers do now run away from land units unless accompanied by a bodyguard, workers on the coast are still oblivious to a battleship sat next to them.

I think this is due to is_square_threatened() calling is_ground_threat(). Given that nothing else uses this function, perhaps it should be changed to not care about the unit move type?

Jacob Nevins <jtn>
Project Administrator
Tue 19 Feb 2013 04:07:38 AM UTC, SVN revision 22375:

Autosettlers abort their current work, and seek for new one, when tile
becomes threatened.

Suggested by Anonymous

See gna patch #3384

(Browse SVN revision 22375)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 19 Feb 2013 04:07:31 AM UTC, SVN revision 22374:

Autosettlers abort their current work, and seek for new one, when tile
becomes threatened.

Suggested by Anonymous

See gna patch #3384

(Browse SVN revision 22374)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 13 Feb 2013 05:31:14 AM UTC, comment #5:

- S2_4 version.
This changes ai-module interface capability. I think this is ok, we have never claimed to freeze it for S2_4.

(file #17188)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 13 Feb 2013 05:16:29 AM UTC, comment #4:

This patch makes autosettlers not to evaluate dangerous tiles at all when finding work. Every turn there's check for human player's autosettlers if tile is now dangerous. If it is, current work is aborted, and new one searched for. For AI there's new AI callback called for every working autosettler every turn. Callback implemented for default AI does just the same as human player autosettlers - if tile has turned dangerous, current work is aborted.

(file #17187)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 13 Feb 2013 04:05:14 AM UTC, comment #3:

I'll see if I can implement something. Your implementation was in the common function used by all units - so even human controlled units were unable to do anything near enemy. Kind of bad if you cannot build fortresses near the borderline ;-)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 12 Feb 2013 07:14:16 AM UTC, comment #2:

Glad that you were able to reproduce the issue. How are we going to proceed ? The patch I proposed is outdated and not 'perfect' ..

Anonymous
Mon 11 Feb 2013 04:01:51 PM UTC, comment #1:

I've not been active with this ticket as I thought that I need to investigate and test more that one cannot exploit it by moving military units, without even intention to risk them by actually attackign, around AI workers and thus making them to abort work only to start it from the beginning again and again.
Then I just witnessed autogame where AI workers working next to cities (i.e. one step from safety) kept working when pirates appeared to slaughter them - single AI lost 8 workers that way in 2 turns!

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 08 Jul 2012 01:32:42 AM UTC, original submission:

This patch allows the autosettler to consider the current danger to its position while it is busy with an activity like irrigating, building roads, rails, mines etc. If the tile is under thread the autosettler will abort its current mission and withdraw.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #17187:  AutosettlerSafeTile.patch added by cazfi (8kB - text/x-diff)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by None (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 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 19 Feb 2013 04:08:02 AM UTCcazfiStatusReady For Test=>Done
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu 14 Feb 2013 11:33:40 PM UTCcazfiDependencies-=>Depends on bugs #20511
    Wed 13 Feb 2013 05:31:14 AM UTCcazfiAttached File-=>Added AutosettlerSafeTile-S2_4.patch, #17188
      Planned Release=>2.4.0, 2.5.0
    Wed 13 Feb 2013 05:16:29 AM UTCcazfiAttached File-=>Added AutosettlerSafeTile.patch, #17187
      StatusNone=>Ready For Test
    Sun 08 Jul 2012 01:32:42 AM UTCNoneAttached File-=>Added freeciv-autosettler-check-current-danger.patch, #16017
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup