Archive

Archive for the ‘AI’ Category

Unit AI Finite State Machine

March 10th, 2012 admin No comments
Finite State Machine

Finite State Machine

This is the top level unit AI finite state machine. Square are states and diamonds are transients between states.

There initial state is IDLE. The combat unit will remain IDLE until an unexplored hex becomes detected, or an area needs to be patrolled.

The need to explore a hex could be determined by another combat unit already on another mission.

The need to patrol a hex is determined by lack of intelligence about a hex. Intel and Visible are different status for a hex.

The EXPLORE state is a higher priority than the PATROL state.

THE AI will ensure that only 1 combat unit is assigned to an EXPLORE or PATROL mission in a hex area. While in the EXPLORE state the combat unit will continue to explore unexplored hexs until either it comes into contavt with an enemy combat unit, ( <Enemy Unit Seen> transient to ATTACK UNIT) ,
or the combat unit discovers an Enemy Depot (<Enemy Depot Seen> transient to ATTACK ENEMY DEPOT>,
or the combat unit discovers a new Strategic Point (<Vacant Strategic Point Seen> transient to DEFEND STRATEGIC Point),
or unit is notified of a support request from another combat unit. <<Respond to Support Request> transient to SUPPORT ATTACK

 

 

 

 

Categories: AI Tags:

Supply AI Agent

February 17th, 2012 lplayer No comments

First AI agent implemented

The following is an explanation of how the Supply AI, Comat AI and Unit Move AI are working. Only the Supply AI is complete the other agents are really basic.

Im using a Finite State Machine based AI system for this. Running on both XBox and Windows 7

0:00 Green starts with 6 Infantry units in Explore mode. These AI controlled units go out looking for unexplored territory, strategic points (yellow dots and enemies)
0:12 The first 2 strategic points have been found and connected to the capital.

0:17 The first enemy units found. No tactical code written for this encounter yet!

0:25 Depot just right of screen centre is being attacked by enemy and is captured and connected to enemy supply network

1:05  Green loses SP close to capital, but is vacated by enemy and reconnected by Green

1:46  Green concentrates on capturing Blues capital in north.

1:51 Movement markers switched on to indicate how many turns to get to a hex. (Orange is movement cost)

2:00 Due to extra SP from north Green is able to build new Cavalry units in capital to try and take Grey in centre

2:28 Blue is trying to take back lost SP in centre but should really be trying to take its own capital back (code needed!).

2:46 Large battle forming in centre but without combat agent AI these will just stand and look at each other.

3:02 Zoom shows deadly embrace situations which AI needs to resolve (more code)

3:26 For some strange reason Green is attacking coast line, but then realises istake and starts to move north again.

3:45 Deadly embrace between friendly units continues

3:54 Why has Green AI ignored to load Blue Depot?

4:01 There are unseen Blue units there! because they are moving in on Green capital

5:07 Minimap confirms that Green AI has beat the other 3 AI players.

Categories: AI, Demo Video Tags:

HexWorld AI started

May 27th, 2010 admin No comments

AI started, using Finite State Machine to control exploration and economic growth.
Multiple player AI added (currently 4).
Early transport animation added.
First 3D model added.
The AI is far more time consuming than i expected, but it was important to get the base AI engine working correctly before building on it.

Categories: AI, Demo Video, Map Tags: