Best level AI should maximize the score at all costs.
authorunc0rr
Fri, 17 May 2013 00:06:01 +0400
changeset 9003 896c6b21c87f
parent 9002 2e4cf893c060
child 9005 15a6ed0bd074
Best level AI should maximize the score at all costs.
hedgewars/uAI.pas
--- a/hedgewars/uAI.pas	Thu May 16 17:33:25 2013 +0200
+++ b/hedgewars/uAI.pas	Fri May 17 00:06:01 2013 +0400
@@ -129,7 +129,7 @@
             Score:= AmmoTests[a].proc(Me, Targets.ar[i], BotLevel, ap);
 {$HINTS ON}
             if Actions.Score + Score > BestActions.Score then
-                if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel) * 2048) then
+                if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel - 1) * 2048) then
                     begin
                     BestActions:= Actions;
                     inc(BestActions.Score, Score);