On Sat, 23 Jun 2012 02:05:39 PM Michael Vehrs wrote:
> I have committed a patch that adds initial goods price ranges to the
> game options. This causes the ServerPlayerTest to fail intermittently.
> However, I think this is due to wrong or simplified assumptions made by
> the test cases.

If you are referring to the "English price for silver should have recovered" 
one, that has been intermittent for quite a while.  Hopefully you have made it 
more reliably broken:-).

Meanwhile I have temporarily broken testAmerica by regenerating that map with 
a version of FreeCol that assigns a `contiguity' number to each tile, where 
the number is unique to each connected landmass or body of water.  The 
necessary patch will go in tomorrow if it survives an overnight test run.

The contiguity trick is intended to allow the map searching routines to 
quickly return failure when asked for impossible paths (e.g. land-unit-
without-carrier trying to go to a different continent, or naval-unit trying to 
go from the sea to a lake).  It would be good if the former could return 
`Fail-but-would-succeed-if-there-was-a-carrier', distinct from the latter 
which should just fail utterly.

Indeed I am trying to do a lot of things with the search routines.  This is 
all driven by trying to beat sense into the AI.  Here are some more things 
underway in various stages of completion:

- Improve the return value: currently we get null for failure, and null for 
`already there, so no path'.  Returning a trivial PathNode in the latter case 
is the obvious improvement.

- We currently handle the case where a carrier is specified, but there is a 
hard assumption that the passenger unit starts on board the carrier, and 
disembarks somewhere.  This can be generalized to include the opposite case, 
where the passenger walks to the carrier and embarks, and further generalized 
to both embarking and disembarking (but not disembarking and re-embarking, 
that explodes the search space).

- Disembarking and embarking are hard to really get right.  We currently 
assume it is best to maximize the use of the carrier, which is usually right.
However it is not for mounted units where there is a good road system.
Similarly, with the contiguity trick, we can tell if a path could be found 
without needing a carrier, which might be preferred if they are busy.

- Generalize the endpoints.  Currently we have distinct routines for searching 
for paths to Tiles and to Europe.  Unified routines that find paths between 
Locations are better.

- `Rendezvous paths' --- currently the CashInTreasureTrainMission moves the 
train to the nearest coastal colony, and then decides if it is worth going to 
Europe.  What is really needed is a way to find a joint path where a carrier 
moves from its current location towards the train, the train moves towards the 
carrier, they rendezvous somewhere, and then move to a cash-in location.

Once that lot works the tools will be in place to fix the problems I hit in 
TransportMission.  It will still lack common sense (paths that avoid danger 
are the next major can of worms), but a few classes of stupid will be gone.

Cheers,
Mike Pope

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to