Post feature RSS Island War ai - What is it, and how does it work?

An overview of exactly what Island War's Artificial Intelligence is

Posted by on

Island War began 8 years ago after the release of a modification I created called Ultimate AI.

Ultimate AI was a reconfig of the games built-in AI to fix its many issues, and increase the games over-all realism and difficulty. However only so much could be done by fixing the built in AI, and so I began looking at using the Mission Editor to fix other areas of the AI.

What started as a simple dynamic ordering system has since grown into a full-fledged goal based behavior system that is the most complex AI system I have written.

It works under the simple premise of past/present/future, or What I did, What I am doing and What I will do.

When the AI decides on a goal, that becomes its present goal. It makes this decision by looking at its current situation, and the situation of the others around it. It then acts on that goal and that goal becomes the past goal. The result of the actions it took then become the present goal, and a future goal is generated by comparing the past and present goal against the current situation the ai is in. Between each "decision" loop, the ai can react to situations by using its past/present/future state to dictate how it will react.

This complex inter-connected system allows each AI unit to work as a team while having dependant and often different goals they are achieving, as well as enabling them to react to situations in a manner that best helps achieve their goal.

There are 15 Goals that are available to IWai. Here is a brief description of each :

Covers all types of location defense. The AI will work together with other defenders to cover a location (or locations) and defensive lines and hard points to secure that location. They will attack any unit that threatens their location, but will not chase them down past their location boundary.
Attack and Armored Vehicles as well as Helicopters will be utilized if available to increase the defensive capability of a location by creating strong points (for vehicles) or overwatch routes for helicopters

Covers all types of area defense. The AI will work alongside the defenders of a location, patrolling the immediate surroundings looking for advanced units and scouts. They search and clear sectors in teams and assist the defenders in setting up defense lines and hardpoints at optimal positions
Attack vehicles can be used to increase the effectiveness of patrolling if available

Covers occupation of "no mans land" on the island. Used by AI to search and wander the large open areas of the Island and give surprise encounters in unorthodox areas.
Any ground vehicle will be used as a priority to increase the distance they can cover

Covers all attack planning. Used during active combat by the AI to coordinate attacks on larger locations and concentrate fire on dangerous and key targets.
Any form of combat effective vehicle will be acquired (including capturing enemy vehicles) to help with the attack.

Covers all location capturing. The AI will evaluate a location and determine the required number of units to successfully attack that location, and then attempt to gather that number of units into a single squad near the location in preparation for their attack.
Transport vehicles will be utilized to gather and transport troops to the intended target

Covers all clearing and hunting of enemies. Used after a successful attack to "mop up" a location by working together to search and clear the location of hidden enemies.
Helicopters may be utilized to assist with arial searches.

Defend Unit
Special Goal which can be used to help particularly encroached units from being wiped out. A call for help can be answered with this goal, redirecting fire on the enemy causing the trouble

Defend Player
Special Goal used by the US forces to help keep the action around the player. Also allows a unit to join the player under their control. When unable to join you, the AI use this to assist you in your goal, by directly manipulating their past/present/future state to one that focuses on the location you are approaching/at. Finally also similar to "Defend Unit" but for the player and his team.

Defend Self
Covers all heavy combat and "bad situations". Used by the AI to temporarily pause their main goal to focus on keeping themselves alive. Frees up movement and vehicle usage when things go south to allow the AI the freedom it requires to give itself the best survivability. Focuses on suppressive fire and heavy cover.

Covers strategic withdrawals from locations. Used by the AI when too heavily outnumbered to retreat to a nearby stronghold to regroup and gather larger forces for a counter-attack.

Special goal used by a single chosen AI from a location that comes under attack. This unit will run to a nearby stronghold (if one exists) to request support for the location under attack. They will avoid combat and use transport vehicles if immediately available.
If successful, defenders from the stronghold will be repurposed to "Advance" on the location. The AI will notify you via comms should they notice a messenger on the run.

Covers all movement between held locations. Allows the AI to move between friendly locations along the road network in groups utilising any transport vehicles not needed for anything else.

Wait Till Bored
Special sub-goal used by Defenders and Advancers to pass time without repeating the same orders each time. Allows more reactive advancement paths and varied defenders activity.

Moving For Order
When an order is given that is particularly far away, this allows the AI to bypass decision making for a while while they make a start on their journey. Prevents the reactive system from repurposing the AI before they have a chance to act out their distant goal.

Ontop of this, there are 7 Reactive Events, as described below :

Switches non-defenders into the "Defend Self" goal until their next decision update.

Under Fire
Causes Roamers fallback to defence, Patrols to search for the shooter as well as advancers to attack.
Also calculated the best positions for good cover and directs the AI to it

Similar to Under Fire with the addition of requesting for "Defend Unit" assistance and checking fallback status.

Hit by Weapons Fire
May force "Defend Self" depending on goal, re-prioritizes targets for attackers and changes defender placement if at an allied location.

Unit Death
Forces "Defend Self" and sends a request for "Defend Unit" assistance. May also force a decision update depending on suppression, morale and current goal.

Morale Break
Forces a decision update to check if its time to fallback, defend ourselves and or switch to attack depending on the current goal.

Command Failure
May force a decision update if the order ended up being invalid for whatever reason.

Other special functions include :

Tank For Cover
Special system which combines armored vehicles and soldiers together to provide mobile cover to troops in open fields and heavy combat situations as well as grant additional AT defense for the tank.

Helicopter Attack
Exclusive goal used by Attack Helicopter crew. Patrols controlled locations and harasses adjacent enemy locations as well as providing armor-priority support to troops advancing or attacking the enemy

To Intelligently choose when and how to use any of the above each IWai has an awareness of the following information about the world :

Size of their Team compared to its original
Their current leader, mount, weapons and speciality
Morale, Mood, Doctrine and Rules of Engagement currently in place
Nearest friendly units and their current goal, morale, mood, doctrine and ROE
Nearest enemy unit and its effectiveness and danger level
Location, Distance and occupation of Non Combat, Combat, Armored and Air vehicles nearby
Location, Distance and occupation of Locations nearby, the size and value of the location, expected/required defenders, known enemy counts and nearby friendly units for each
Player location and calculated action and current situation
Overall Mood/Morale/State of each side and total occupation of the Island
Current Time of Day

Finally, to really individualize each unit under IWai's control, they have an individual seed which is generated on their creation. Before making any decision, the AI first invokes its seed fixing the random number generator. This ensures that each AI unit acts differently, but not randomly. One unit may fallback consistently due to their seed, while another may aggressively attack. Each AI unit seed is saved in Long-Play mode and non-killed units seeds are saved and repurposed to "keep them in play"

Put all this together and you get an artificial intelligence I can confidently say you will have not experienced before. They have personality, they are intelligent, they know how to fight and they do not require you to be there. Island War can actually be run without the player at all, IWai will fight for control of the Island against itself without any interaction from a player.
Even like this, no two runs are ever the same. "The Butterfly Effect" very aptly applies to Island War, with the slightest of differences ending up in huge consequences down the track.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.