[Freeciv-Dev] [patch #2963] Use ferryboat system for trade

2012-10-12 Thread Marko Lindqvist
Update of patch #2963 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2012-10-04 Thread Marko Lindqvist
Update of patch #2963 (project freeciv):

  Status: In Progress = Ready For Test 

___

Follow-up Comment #13:

- Updated agains svn
- Changed the boat requirement checks: 1) Units capable of sea movement
themselves require no boat. 2) Only transported units are considered currently
transported - not units in ocean cities etc

I'll put this version to heavy testing and am going to commit it in this shape
even though some problems remain - it's already a big improvement for AI and
it's unlikely to get any better in short term - leaving improvements to future
tickets.

(file #16633)
___

Additional Item Attachment:

File name: ContTrade-3.patch.bz2  Size:6 KB


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2012-08-10 Thread David Lowe
Follow-up Comment #12, patch #2963 (project freeciv):

 Can a unit be transported over land?

In Alien World ruleset, it certainly can.

___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2012-08-09 Thread Jordi Negrevernis i Font
Follow-up Comment #10, patch #2963 (project freeciv):


_Still needs to decide what to do with dai_is_unit_tired_waiting_boat(). It's
counting time from caravan's original birth. Old units could not be reassigned
to a mission, as they would give up immediately. _

This is trying to give some time to the unit to find an intercontinental route
and a transport to that city... and then fall back to continental trade... So
if the unit gets bored of waiting it finds a new route in the current island.

_I wonder why there's if (unit_transported(punit) ||
is_ocean_tile(unit_tile(punit))) when checking if unit needs a boat. Is the
latter part meant to check if unit can itself move on ocean tiles? (if it's
not transported as first checked, then to exist in ocean tile it must be able
to live there itself - ignoring possibility of ocean cities, native bases, and
native roads) In any case this cannot be right._

This is in dai_is_unit_tired_waiting_boat(), so it just only checks if the
unit is being transported... Can a unit be transported over land?


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2012-08-09 Thread Marko Lindqvist
Follow-up Comment #11, patch #2963 (project freeciv):

 It's counting time from caravan's original birth

 This is trying to give some time to the unit to find an
 intercontinental route and a transport to that city.

I see that, but it's only giving time for newly created unit. It's always
counting from unit's birth, there's no way to reset this. If old unit gets
reassigned to create traderoute under AI control, it won't wait single turn
for the boat.

 if (unit_transported(punit) || is_ocean_tile(unit_tile(punit)))

 it just only checks if the unit is being transported

Should check, you mean? Obviously it checks if unit is transported OR if
it's in ocean tile. This is true if unit is transported over land, or if unit
is stationed in ocean city for example.

___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2012-08-08 Thread Marko Lindqvist
Update of patch #2963 (project freeciv):

  Status:  Ready For Test = In Progress

___

Follow-up Comment #9:

- When considering value of building caravan, consider ruleset set traderoute
type trade % instead of blindly assuming that intercontinental trade is better
than continental.
- Removed wrapper function aiferry_boats_available() that did nothing but
called aiferry_avail_boats() Call latter directly instead
- Minor style corrections


Still needs to decide what to do with dai_is_unit_tired_waiting_boat(). It's
counting time from caravan's original birth. Old units could not be reassigned
to a mission, as they would give up immediately.

I wonder why there's if (unit_transported(punit) ||
is_ocean_tile(unit_tile(punit))) when checking if unit needs a boat. Is the
latter part meant to check if unit can itself move on ocean tiles? (if it's
not transported as first checked, then to exist in ocean tile it must be able
to live there itself - ignoring possibility of ocean cities, native bases, and
native roads) In any case this cannot be right.

(file #16353)
___

Additional Item Attachment:

File name: ContTrade-2.patch.bz2  Size:6 KB


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2012-07-24 Thread Marko Lindqvist
Follow-up Comment #8, patch #2963 (project freeciv):

- Updated against current TRUNK HEAD.

(file #16180)
___

Additional Item Attachment:

File name: ContTrade.patchSize:23 KB


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2012-06-28 Thread Marko Lindqvist
Update of patch #2963 (project freeciv):

 Assigned to:  jorneg = cazfi  
 Planned Release: = 2.5.0  


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2011-10-30 Thread Matthias Pfafferodt

Follow-up Comment #7, patch #2963 (project freeciv):

updated patch; needed due to the transport patch set ...

(file #14327)
___

Additional Item Attachment:

File name: 0015-Use-ferryboat-system-for-trade.patch Size:25 KB


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


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


[Freeciv-Dev] [patch #2963] Use ferryboat system for trade

2011-10-10 Thread Jordi Negrevernis i Font

Follow-up Comment #6, patch #2963 (project freeciv):

The problem with units boarding and unboarding the ferry seams to be that
aiferry_goto_amphibious computes a path which leads the unit back to land on
the same turn...
It hardly happens anyway...


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2011-10-05 Thread Jordi Negrevernis i Font

Follow-up Comment #5, patch #2963 (project freeciv):

Corrected version with style on sync with CodingStyle.

Known bugs:
* sometimes caravan or freights keep on boarding onboarding ships.
* sometimes caravans don't go for the wonder and do their business
elsewhere.


(file #14198)
___

Additional Item Attachment:

File name: caravan_diff_cont_8_trunk.diff Size:23 KB


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2011-09-26 Thread Jordi Negrevernis i Font

Update of patch #2963 (project freeciv):

  Status: In Progress = Ready For Test 

___

Follow-up Comment #4:

Trunk version.

Resolved a couple of bugs.

I think the code is ready to commit. I reduced the line lengths...


(file #14163)
___

Additional Item Attachment:

File name: caravan_diff_cont_7_trunk.diff Size:23 KB


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2011-09-25 Thread Jordi Negrevernis i Font

Follow-up Comment #2, patch #2963 (project freeciv):

S2_3 version. trunk will follow...

* It's evaluates the optimal destination only once (now is evaluated each
turn), like the diplomat code.
* allows trade routes through the sea and to allies also.
* didn't add any handicap, the aicore module can't use ai_handicap or
map_known_and_seen function :-(. Any ideas?
* touches ai_unit_task... i don't know with implications has... requires a
capability change? requires touching the network code? required touching the
save game code?


(file #14162)
___

Additional Item Attachment:

File name: caravan_diff_cont_6.diff   Size:21 KB


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2011-09-25 Thread Matthias Pfafferodt

Follow-up Comment #3, patch #2963 (project freeciv):

it's late so only a short comment:
 didn't add any handicap, the aicore module can't use
 ai_handicap or map_known_and_seen function :-(. Any ideas? 
perhaps add the handicap in the functions for the default AI? For example,
return without searching for a city on the other side of the ocean? Or a
random element? (chance to get a city = x%)?
 touches ai_unit_task... i don't know with implications has...
 requires a capability change? requires touching the network
 code? required touching the save game code?
enum ai_unit_task is part of the AI (in trunk it is moved to aiunit.h). So,
this does not require a capability change as there are no changes to the
network protokol - it is a (default) AI internal change.

You could think about saving the computed destination city for the unit in
the savegame. This would increase the memory of the AI ;-)

I do not know if this change is something for 2.3 but for sure it should be
go to trunk (= 2.4). There, it can use all the cleanup done to the AI code!

If the code is ready, some cleanup will be needed (line length!).

___

Reply to this item at:

  http://gna.org/patch/?2963

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


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


[Freeciv-Dev] [patch #2963] Use ferryboat system for trade

2011-09-24 Thread Jordi Negrevernis i Font

Update of patch #2963 (project freeciv):

 Assigned to:None = jorneg 


___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2011-09-21 Thread Jordi Negrevernis i Font

URL:
  http://gna.org/patch/?2963

 Summary: Use ferryboat system for trade
 Project: Freeciv
Submitted by: jorneg
Submitted on: Wed Sep 21 21:48:29 2011
Category: ai
Priority: 5 - Normal
  Status: In Progress
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:


This patch teaches the AI to make trade routes or help wonder construction
across the ocean.

It's not ready to commit. It contains debug info and is based on S2_3.

If it is of interest I can rebase to trunk. I hope that the rebase will be
straight forward... who knows...

And also this is going to make the AI more stronger that now.




___

File Attachments:


---
Date: Wed Sep 21 21:48:29 2011  Name: caravan_diff_cont.diff  Size: 18kB  
By: jorneg

http://gna.org/patch/download.php?file_id=14119

___

Reply to this item at:

  http://gna.org/patch/?2963

___
  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 #2963] Use ferryboat system for trade

2011-09-21 Thread Matthias Pfafferodt

Follow-up Comment #1, patch #2963 (project freeciv):

I did not test the patch but would say, all changes wich increase the AI
skill are good. Perhaps add a handicap? One part of the player say AI is to
good - for the other part it's not good enough.

One comment: is the reference to the lua header file really needed (in
aiunit.c)?

___

Reply to this item at:

  http://gna.org/patch/?2963

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


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


Re: [Freeciv-Dev] [patch #2963] Use ferryboat system for trade

2011-09-21 Thread Jordi Negrevernis i Font

En/na Matthias Pfafferodt ha escrit:

Follow-up Comment #1, patch #2963 (project freeciv):

One comment: is the reference to the lua header file really needed (in
aiunit.c)?


?!? No, it's not needed. It's only C code.


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