Abstrct/Schemaverse — Issue #11: Per-ship policy
Author: cbbrowne
Created: 2012-03-04 17:37:19+00:00
State: open

You have set up a way of having hooks to do sophisticated fleet policy management, which is excellent.

I think it would become more convenient to program the fleet if there was also, added in, some primitive, but still useful, per-ship policy that would be executed as part of the per-tic ship processing.

What I suggest is to have a small set of tightly specified choices, defined with a view to them being very cheap to implement.

a) MINE

If there is a planet belonging to me at the ship's location, mine it.

b) ATTACK

If there is an enemy ship in range, shoot at it. If there are multiple to choose from, I suggest leaving the choice implementation-dependent. I'd *like* a random selection, but I'm not sure it's worth paying for that.

c) REPAIR

If there is a friendly ship in range in need of repairs, fix it. Again, choice being implementation-dependent.

d) BURN

I have an idea about making motion more interesting; if the efficiency of the rocket motor was best at low power, then there would be value in doing small burns each tic, so as to use fuel most efficiently, building up Delta-V over several tics. In the absence of some changes to that, probably pointless.

Given that, the "tic" loop might look like:

a) Move the ships based on previous state
b) Set up automatic actions for any ships with the above policies set
c) Run fleet methods
d) Allow users to request further actions
e) End of tic: process actions

Making the ships a *little* bit intelligent should make it a lot easier to manage the fleets.