Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2004:
[freeciv-ai] Re: (PR#10694) AI Builds Doomed Ferries and Passengers
Home

[freeciv-ai] Re: (PR#10694) AI Builds Doomed Ferries and Passengers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [freeciv-ai] Re: (PR#10694) AI Builds Doomed Ferries and Passengers
From: "Benedict Adamson" <badamson@xxxxxxxxxxx>
Date: Fri, 12 Nov 2004 11:53:54 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10694 >

I wrote:
...
> At present, the 'danger' is computed (in ai_gothere_bodyguard) by 
> summing the attack ratings of enemy units. The AI compares that total 
> with the defence rating of the unit. I suggest replacing that with an 
> estimate of the probability of survival. [sic, I meant death, obviously]
...

On further reflection, the probability of death multiplied by the value 
(in shields) of the unit would be better. For ferries, use the 
probability of death multiplied by the total value of the ferry and its 
passengers. That is, measure the danger as the expected cost that turn, 
assuming our enemies attack rationally.

I also wrote:
> If we recorded in the ai.danger field of enemy units the danger 
> they contribute to our units (that is, have the field do double duty as 
> a record of 'menace'), we could use that information to select targets 
> for defensive attacks in the rampage and hunter code.

Recording expected cost as the 'menace' allows intelligent choices about 
suicidal attacks: a unit may attack suicidally if the menace of the 
target exceeds the value of the unit.

It also occurs to me, if bodyguards are reassigned each turn, we do not 
need the punit->ai.charge field. We would still need the 
punit->ai.bodyguard field to ensure that aiferry_gobyboat can grab 
bodyguards.





[Prev in Thread] Current Thread [Next in Thread]