UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050517 
Firefox/1.0.4 (Debian package 1.0.4-2)
IP: 64.81.113.168
URI: http://wesnoth.slack.it/?AiWML
 - - - - -
Index: AiWML
===================================================================
RCS file: /home/wesnoth/cvsroot/wikiroot/AiWML,v
retrieving revision 1.14
diff -u -r1.14 AiWML
--- AiWML       21 Jan 2005 10:19:16 -0000      1.14
+++ AiWML       11 Jun 2005 00:42:05 -0000
@@ -24,23 +24,27 @@
 The AI considers each unit to be one of these types.
 The type is listed in the unit file in data/units/ (See also UnitWML).
 * //aggression// This key affects how an AI player will fight.
-A value of 1.0 to 0.0 makes the AI attack more, not caring much about taking 
damage.
-If the value is 0.0 to -1.0 the AI will fight, but try to save units.
-The 'aggression' expression takes numeric values from -1.0 to 1.0, with higher 
numbers meaning more aggressive AI.
-'aggression' has a fairly simple definition: when considering how valuable a 
certain attack option is,
-the AI uses the formula damage_inflicted - damage_taken*(1.0-aggression),
-where 'damage_inflicted' and 'damage_taken' are heuristic generated estimates 
of how badly the attack sequence hurts
-himself and his enemies.  ||This definition is actually out of date;
+It determines how an AI considers the difference between its units and its 
opponents
+by taking the value //1 - AI hitpoint value in proportion to opponent hitpoint 
value//.
+||This definition is actually out of date;
 the AI instead weights its decision on the chance to kill
 a unit or be killed, using a combination of its own units, but the values of 
'aggression'
 have analogous effects to what is described here.||
-So, an AI with an aggression of 1.0 (the highest sane value) will only care 
about how much damage attacks inflict.
-If he can inflict 1 damage and take 0, or inflict 2 damage and take 20 
himself, he'll take the latter option.
-An AI with an aggression of 0 will only attack if he feels he can inflict more 
damage than he receives.
-An AI with negative aggression will attack conservatively, having to be able 
to inflict more damage than he takes for it
-to be worth his while.
-The default is 0.5, which means the AI does care if he takes lots of damage,
-but will still be willing to take quite alot of damage, as long as he can 
inflict some on his enemy.
+So, to make an AI which considers its units worthless i.e.
+only cares about how much damage attacks inflict,
+set aggression at //1 - 0 = 1.0//.
+This is the highest meaningful value for aggression; although it is insane, it 
is used on many HttT levels.
+If an AI set on this value can inflict 1 damage and take 0, or inflict 2 
damage and take 20 himself,
+he'll take the latter option.
+To make an AI which considers its units equally as valuable as its opponent's 
i.e.
+only attacks if he feels he can inflict more damage than he receives,
+set aggression at //1 - 1 = 0.0//.
+Although an AI which considers its opponent's units worthless is impossible 
under this scheme,
+an AI which, for example, considers its units twice as valuable as its 
opponent's
+can be represented by aggression //1 - 2 = -1.0//.
+having to be able to inflict more damage than he takes for it to be worth his 
while.
+The default is //1 - 1/2 = 0.5//, which means the AI is content with dealing 
only
+half the damage to his opponent of that which he himself takes.
 * //caution// A number 0.0 or higher (default=0.25) that affects how cautious 
the AI is in various ways.
 If it is higher, the AI will want to retreat more (especially to a better 
defensive terrain), it will dislike moving out
 of a defensive terrain to attack more, and, if




_______________________________________________
Wesnoth-wiki-changes mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/wesnoth-wiki-changes

Reply via email to