Up next: facility_worth?
Stan Shebs
shebs@apple.com
Fri Jul 26 16:11:00 GMT 2002
Hans Ronne wrote:
>
>My long range plan for the AI is to move all building code to a new
>PLAN_BUILD and consolidate it there. I think this would simplify things
>enormously and solve many problems. For several reasons, I don't like the
>current solution where cities are assigned offensive or defensive plans
>etc. and then try to build accordingly. As for PLAN_IMPROVE, my original
>intent was that it would deal with things like terrain improvement and
>perhaps also tech development rather than with building.
>
I don't remember if I ever heard your several reasons, but there isn't a
generic
plan to build because there are very few games in which building is a
goal in
itself. The purpose of building is to have units that can achieve some
goal,
and unit doing the building must know what that goal is. So even if you
have
a plan to build, you still end up needing to go through the same computation
of whether you need to attack or defend more, and then choose a unit
type that
seems most appropriate - but you build it instead of going to do the job
yourself (at least if you're immobile and untransportable :-) ).
Another consideration is games like galaxy, where you want units that
build their projectiles while moving in for the attack.
Incidentally, the whole plan type idea was a copout, started because I was
having trouble turning goals into specific tasks. In real life, you
want a unit
to be able to have more than one goal, such as a primary goal to explore
and a secondary to defend against enemies, and there shouldn't have to be
a need to reset the whole plan type, just because the secondary goal needs
to take precedence temporarily.
>Accordingly, the function should start by checking if facility_worth(u)
>already is set to a non-zero number. If it is, we just leave it alone. I
>think in general that the game designer can make a much better guess as to
>the usefulness of different facilities than any worth function that we
>could come up with.
>
There would be interesting interactions with game design in any case,
since the
worths would reflect designer prejudices as much as actual value in the
game.
Lenat's Eurisko was infamous back in the 80s for winning Traveller
tournaments
by finding and exploiting edge cases not anticipated by the human
organizers.
One of the uses of putting worths into doctrine is that you could then
have an
AI with designer-suggested weights play against an AI without, and see who
wins.
Stan
More information about the Xconq7
mailing list