AI

From Warzone Wiki
(Difference between revisions)
Jump to: navigation, search
(minor edit)
 
(20 intermediate revisions by 7 users not shown)
Line 1: Line 1:
The exact inner mechanics of the AI remain a mystery. However, some general rules of its behaviour are known. Those were either deducted through observation of the AI's movements, or they have been stated by the creator himself on the forums.  
+
The Warzone AI's behavior is determined by a set of algorithms.  The source code behind these algorithms can be viewed on GitHub at https://github.com/FizzerWL/WarLight.AI. You can also read more about the AI at https://www.warzone.com/blog/index.php/2016/02/the-warlight-ai-goes-open-source/
  
Note: The descriptions below refer to the AI as of december 2011. Future modifications to the AI are likely to alter its behaviour.
+
== Weighted Random ==
 +
 
 +
The AI constructs a list of actions it could take on each turn, along with a value of how strongly it feels it should do that action. It then does a weighted random against that list. This means that the AI is never perfectly predictable, but it does have tendencies.
  
 
== General behaviour of the AI ==
 
== General behaviour of the AI ==
* It currently does not know how to use abandon cards. [http://warlight.net/Forum/Thread.aspx?ThreadID=136&Offset=20]
+
 
* It does prefer to expand as long as it still sees neutral bonuses to expand to. [http://warlight.net/Forum/Thread.aspx?ThreadID=136&Offset=12]
+
Confirmed:
* It always attacks as though you won't reinforce. [http://warlight.net/Forum/Thread.aspx?ThreadID=1744&Offset=2]
+
 
* It generally only places armies in a few spots and attacks from them. [http://warlight.net/Forum/Thread.aspx?ThreadID=1744&Offset=2]
+
* It prefers to expand as long as it still sees [[neutral]] [[bonuses]] to expand to, as long as the bonus meets its criteria for being a good bonus. {{Ref|http://warzone.com/Forum/Thread?ThreadID{{=}}136&Offset{{=}}12}}
* It tends to prefer neutral territories over player controlled territories, but it mostly prefers to attack the weakest territories. [http://warlight.net/Forum/Thread.aspx?ThreadID=1744&Offset=4]
+
 
* It tends to favor getting bonuses, and breaking enemy bonuses higher than making random other attacks. [http://warlight.net/Forum/Thread.aspx?ThreadID=1744&Offset=4]
+
 
== Behaviour of the AI in team games ==
 
== Behaviour of the AI in team games ==
 +
 
* It will only attack teammates in two circumstances:
 
* It will only attack teammates in two circumstances:
  
 
#If a bonus is entirely controlled by teammates and it has >= 50% of the territories. It will only do attacks of 2 then.
 
#If a bonus is entirely controlled by teammates and it has >= 50% of the territories. It will only do attacks of 2 then.
#If it's expanding into a new bonus that no teammates control. [http://warlight.net/Forum/Thread.aspx?ThreadID=2489&Offset=2]
+
#If it's expanding into a new bonus that no teammates control. {{Ref|http://warzone.com/Forum/Thread.aspx?ThreadID{{=}}2489&Offset{{=}}2}}
 +
 
 +
* The AI will not play cards when teamed with a human teammate unless it must play cards by rule.  The only circumstance where an AI must play cards when teamed with a human teammate is if the last player on a team turns into an AI via boot or surrender and [[cards]] must be used by that team that turn.
 +
 
 +
== Playing With Itself ==
 +
 
 +
Under the single-player tab, you can set up a game full of AIs, no [[fog]] and watch the entire game play out on its own.
 +
 
 +
However, under the multi-player tab, the AI will not play a game without any humans involved.  If only AIs remain in a game, the AIs will simply [[vote to end]].  If voting to end is not possible, such as in a [[tournament]] game, the AIs will just pick a winner randomly.  This restriction is necessary due to the way that multi-player games work.  Due to Warzone's flexible engine, someone could construct a game that took thousands or millions of turns to finish.  For example, a game with no bonuses or large [[wastelands]] separating players.  The Warzone server would strain to complete these games, likely causing the entire site to grind to a halt.
 +
 
 +
[[Category:Warzone]]

Latest revision as of 20:52, 15 February 2019

The Warzone AI's behavior is determined by a set of algorithms. The source code behind these algorithms can be viewed on GitHub at https://github.com/FizzerWL/WarLight.AI. You can also read more about the AI at https://www.warzone.com/blog/index.php/2016/02/the-warlight-ai-goes-open-source/

Contents

[edit] Weighted Random

The AI constructs a list of actions it could take on each turn, along with a value of how strongly it feels it should do that action. It then does a weighted random against that list. This means that the AI is never perfectly predictable, but it does have tendencies.

[edit] General behaviour of the AI

Confirmed:

  • It prefers to expand as long as it still sees neutral bonuses to expand to, as long as the bonus meets its criteria for being a good bonus. [1]


[edit] Behaviour of the AI in team games

  • It will only attack teammates in two circumstances:
  1. If a bonus is entirely controlled by teammates and it has >= 50% of the territories. It will only do attacks of 2 then.
  2. If it's expanding into a new bonus that no teammates control. [2]


  • The AI will not play cards when teamed with a human teammate unless it must play cards by rule. The only circumstance where an AI must play cards when teamed with a human teammate is if the last player on a team turns into an AI via boot or surrender and cards must be used by that team that turn.

[edit] Playing With Itself

Under the single-player tab, you can set up a game full of AIs, no fog and watch the entire game play out on its own.

However, under the multi-player tab, the AI will not play a game without any humans involved. If only AIs remain in a game, the AIs will simply vote to end. If voting to end is not possible, such as in a tournament game, the AIs will just pick a winner randomly. This restriction is necessary due to the way that multi-player games work. Due to Warzone's flexible engine, someone could construct a game that took thousands or millions of turns to finish. For example, a game with no bonuses or large wastelands separating players. The Warzone server would strain to complete these games, likely causing the entire site to grind to a halt.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox