[Freeciv-Dev] [patch #4832] Prefer ruleset advice to MOVE_TYPE in AI

2014-06-22 Thread Emmet Hikory
Update of patch #4832 (project freeciv):

 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] [patch #4832] Prefer ruleset advice to MOVE_TYPE in AI

2014-06-22 Thread Emmet Hikory
Update of patch #4832 (project freeciv):

  Status:  Ready For Test => Wont Do

___

Follow-up Comment #3:

Thinking about these criticisms, I won't apply this patch, as it makes more
sense to properly encapsulate the semantics.  Generally speaking, my
preference is to extend the use of server/advisors for collecting static
information about the ruleset or state of the game, simply because that
already contains the appropriate structures and logic for parsing status at
ruleset load and each turn.  The alternative is to create dai_foo functions
and data structures that mirror this, and have the advisors code call AI
callbacks so each AI has separate data.  In the short term, this does make
adv.land_move and adv_sea_move more important, but these provide more accurate
representation in cases where complex units are considered.

My initial thoughts (although they may change with implmentation) on the
behaviours to be represented by individial patches when breaking this down:

process_defender_want():
Consider whether the unit is a good defender for the terrain of the city
being analysed, rather than how the unit moves.

dai_hunter_try_launch():
Consider whether the enemy unit can attack the missile platform (using
reverse pathfinding), rather than how the unit moves.

dai_update_simple_ai_types():
This guard exists to protect some areas of the AI code that don't work
correctly: needs closer understanding of the rationale for the imposed
limits.

dai_is_unit_tired_waiting_boat():
Examine callers in more detail, possibly replace with a check about
sea_move == MOVE_FULL, or, if possible, with analysis of whether unit can
reach 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


[Freeciv-Dev] [patch #4832] Prefer ruleset advice to MOVE_TYPE in AI

2014-06-21 Thread Marko Lindqvist
Follow-up Comment #2, patch #4832 (project freeciv):

> I'm not against,

Well, actually this is against the idea I had that we should get rid of move
type in generic server code first, to restrict its use to AI only. This change
makes adv.land_move and adv.sea_move more important than before and advisors
are part of generic server code (can't be replaced by loading another,
theoretical, AI module that does not depend on move_type)

___

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] [patch #4832] Prefer ruleset advice to MOVE_TYPE in AI

2014-06-21 Thread Marko Lindqvist
Follow-up Comment #1, patch #4832 (project freeciv):

I'm not against, but I think this is essentially cosmetic. Though it doesn't
use UMT_LAND symbol, it's still based on the same idea of there being
fundamental difference between land and sea moves. (Isn't move_type even
automatically assigned by the same principle as advisor* land_move and
sea_move properties?). True gen-movement would base things on nativity only
(so no subset of terrains would be conceptually different from any other - no
matter if the subsets contain only land terrains or only sea terrains, or
both)

"adv" refers to server/advisors data. "adv)ice" might not always be accurate
way to see it.

___

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] [patch #4832] Prefer ruleset advice to MOVE_TYPE in AI

2014-06-20 Thread Emmet Hikory
URL:
  

 Summary: Prefer ruleset advice to MOVE_TYPE in AI
 Project: Freeciv
Submitted by: persia
Submitted on: Sat 21 Jun 2014 09:13:25 AM JST
Category: ai
Priority: 5 - Normal
  Status: Ready For Test
 Privacy: Public
 Assigned to: persia
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.6.0

___

Details:

Another step towards removing use of UMT_LAND and UMT_SEA in the AI.  This
patch uses adv.land_move and adv.sea_move to address a few more cases in the
code.  I'm happy to break this up if anyone has concerns about parts of it,
but my autogame testing shows expected behaviour with the classic ruleset.

Included adjustments:

process_defender_want(): use land_move != MOVE_NONE rather than
move_type==UMT_LAND to identify suitable units.

dai_hunter_try_launch(): fear any unit with sea_move != MOVE_NONE, rather than
fearing UMT_SEA and UMT_BOTH units.

update_simple_ai_types(): Only apply the requirement to be able to attack
non-native tiles to units that cannot move on land.

dai_is_unit_tired_waiting_boat(): use sea_move != MOVE_NONE rather than
move_type != UMT_LAND to check if a unit might be able to move on the ocean
without a boat.




___

File Attachments:


---
Date: Sat 21 Jun 2014 09:13:25 AM JST  Name:
prefer-ruleset-advice-to-MOVE_TYPE-in-AI.patch  Size: 5kB   By: persia



___

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