AI: Difference between revisions
Diabolicus (talk | contribs) mNo edit summary |
No edit summary |
||
| (23 intermediate revisions by 8 users not shown) | |||
| Line 1: | Line 1: | ||
The | The '''War.app AI''' allows computer-controlled players to participate in games alongside human players. | ||
The AI's decisions are determined by a set of algorithms designed to play the game autonomously. While its behavior is generally consistent, it is not entirely predictable. | |||
For more information about the AI's implementation, see the War.app blog post on the AI's design and source code. | |||
# | == Decision Making == | ||
# | |||
The AI evaluates a set of possible actions each turn and assigns a value to each one based on how desirable it believes that action to be. | |||
It then selects from those actions using a weighted random process. As a result, the AI tends to make similar decisions in similar situations, but it will not always make the exact same move. | |||
== General Strategy == | |||
The following AI behaviors have been confirmed: | |||
* The AI prefers expansion while there are still desirable [[neutral]] [[bonuses]] available. | |||
* The AI evaluates bonuses and expands only into those that meet its criteria for being worthwhile targets. | |||
Because of this, AI players often focus on securing nearby bonuses before shifting their attention to opponents. | |||
== Team Games == | |||
The AI is generally designed to cooperate with teammates. | |||
=== Attacking Teammates === | |||
The AI will only attack a teammate in the following situations: | |||
# A bonus is entirely controlled by teammates and the AI owns at least 50% of the territories in that bonus. In this case, it may perform small attacks to consolidate ownership. | |||
# The AI is expanding into a bonus that no teammate currently controls. | |||
=== Card Usage === | |||
When teamed with a human player, the AI will not voluntarily play [[cards]]. | |||
The primary exception occurs when all human players on the team have been eliminated and card play is required by the game settings. In that case, the AI may be forced to play cards on behalf of the team. | |||
== AI-Only Games == | |||
Single-player games can be configured to contain only AI players. With [[fog]] disabled, this can be a useful way to observe how the AI plays and interacts with itself. | |||
=== Multiplayer Games === | |||
In multiplayer games, at least one human player must remain active. | |||
If all remaining players are AIs, they will attempt to [[vote to end]] the game. If ending the game is not possible, such as in some [[tournament]] games, a winner will be selected automatically. | |||
This restriction exists to prevent multiplayer AI-only games from consuming excessive server resources. Because War.app supports highly customizable game settings, it is possible to create scenarios that could take thousands or even millions of turns to complete. | |||
== See Also == | |||
* [[Cards]] | |||
* [[Vote to End]] | |||
* [[Bonuses]] | |||
* [[Fog]] | |||
[[Category:War.app]] | |||
Latest revision as of 03:30, 14 June 2026
The War.app AI allows computer-controlled players to participate in games alongside human players.
The AI's decisions are determined by a set of algorithms designed to play the game autonomously. While its behavior is generally consistent, it is not entirely predictable.
For more information about the AI's implementation, see the War.app blog post on the AI's design and source code.
Decision Making
The AI evaluates a set of possible actions each turn and assigns a value to each one based on how desirable it believes that action to be.
It then selects from those actions using a weighted random process. As a result, the AI tends to make similar decisions in similar situations, but it will not always make the exact same move.
General Strategy
The following AI behaviors have been confirmed:
- The AI prefers expansion while there are still desirable neutral bonuses available.
- The AI evaluates bonuses and expands only into those that meet its criteria for being worthwhile targets.
Because of this, AI players often focus on securing nearby bonuses before shifting their attention to opponents.
Team Games
The AI is generally designed to cooperate with teammates.
Attacking Teammates
The AI will only attack a teammate in the following situations:
- A bonus is entirely controlled by teammates and the AI owns at least 50% of the territories in that bonus. In this case, it may perform small attacks to consolidate ownership.
- The AI is expanding into a bonus that no teammate currently controls.
Card Usage
When teamed with a human player, the AI will not voluntarily play cards.
The primary exception occurs when all human players on the team have been eliminated and card play is required by the game settings. In that case, the AI may be forced to play cards on behalf of the team.
AI-Only Games
Single-player games can be configured to contain only AI players. With fog disabled, this can be a useful way to observe how the AI plays and interacts with itself.
Multiplayer Games
In multiplayer games, at least one human player must remain active.
If all remaining players are AIs, they will attempt to vote to end the game. If ending the game is not possible, such as in some tournament games, a winner will be selected automatically.
This restriction exists to prevent multiplayer AI-only games from consuming excessive server resources. Because War.app supports highly customizable game settings, it is possible to create scenarios that could take thousands or even millions of turns to complete.