Update on the game:
Multiplayer has been started. Currently it works but things get out of sync quickly as I just send the unit orders between computers.
Computer Player AI is also coming along.
AI levels 3, 5, and 6 are all added, but not finished. The AI can make power plants, make factories, make tanks, expand, attack, retreat, and scout start locations (expansion and general map scouting haven't been implemented yet). Defending hasn't been added yet, so the AI won't know how to protect its base.
Currently the Level 6 AI looks like this:
for p=1 to 8
if player(p).exist=1
if player(p).typ="AI"
if player_commands(p,"at most",0,"any","building","military")
ai(p).priority.economy=80
ai(p).priority.military=0
ai(p).priority.expand=0
ai(p).priority.scout=0
ai(p).army_size=30
endif
if player_commands(p,"at least",8,"any","unit","worker")
ai(p).priority.economy=80
ai(p).priority.military=0
ai(p).priority.expand=0
ai(p).priority.scout=1
ai(p).army_size=30
endif
if player_commands(p,"at least",10,"any","unit","worker") or ai(p).projected_minerals>200
ai(p).priority.economy=45
ai(p).priority.military=45
ai(p).priority.expand=0
ai(p).priority.scout=1
ai(p).army_size=30
endif
if player_commands(p,"at least",2,"any","building","military")
ai(p).priority.economy=25
ai(p).priority.military=45
ai(p).priority.expand=0
ai(p).priority.scout=1
ai(p).last_expand=timer()
ai(p).army_size=125
endif
if player_commands(p,"at least",2,"any","building","military") and player_commands(p,"at least",6,"any","unit","military")
ai(p).priority.expand=40
ai(p).priority.economy=40
ai(p).priority.military=50
ai(p).priority.scout=1
if ai(p).projected_base_amount<1
ai(p).request_expansion=1
endif
ai(p).army_size=250
endif
if player_commands(p,"at least",2,"any","building","military") and player_commands(p,"at least",12,"any","unit","military")
ai(p).priority.expand=40
ai(p).priority.economy=40
ai(p).priority.military=50
ai(p).priority.scout=1
if ai(p).projected_base_amount<2
ai(p).request_expansion=1
endif
ai(p).army_size=350
endif
endif
endif
next p
So you can see from this that the AI's build order is never concretely defined, but rather is guided by the priority system.
The army_size guides out big of an army it should make before it tries to attack, but it is a concentration of damage rather than saying how many units it should attack with.
Other random info about the AI:
- The AI keeps a running estimate of the rate at which it gets minerals, and sends builders to build locations several seconds in advance to save time.
- By calculating how many units it can make in the time it takes to build a power plant, the AI plans when to build power plants such that it doesn't max out its supply.
- The AI calculates the rate at which it can spend minerals, and if that rate is less than the rate at which it gathers minerals, it knows it can build another war factory. So basically the AI can macro a a huge army together pretty quickly.
- When the AI expands, it calculates how long it will be before the new command center is complete and sends workers 13 seconds in advance so it can start making use of the new command center immediately.
- Computer player buildings are currently just randomly placed around the main base, but clustering power plants is planned to be added soon.
- Before the game starts, an algorithm analyzes the locations of all the mineral patches and figures out possible expansion locations. Soon I hope to make an algorithm that analyzes the map for choke points.
- The combat micro works with the help of the pressure map. In the pressure map, each unit exerts a pressure, proportional to its damage, attack range, and other things. When the AI looks at it, it adds the AI player pressure and subtracts the human player pressure. When the resulting pressure is greater than ai(p).army_size, it sends its units to attack. Also, when the pressure gets too low, the AI knows to retreat. When a unit is below a certain health it moves that unit to a safer place in an attempt to save the unit. Any group behavior that currently exists is just what has resulted from the pressure maps. Also, the AI knows how to focus fire, but it is also just the result of each unit considering what other nearby units are attacking.
Here's some screen shots of me against the AI:
http://img518.imageshack.us/img518/2166/game44li5.jpg
http://img296.imageshack.us/img296/8633/game43fn6.jpg
This shows the scout AI:
http://img63.imageshack.us/img63/4214/game41uc3.jpg
The unit micro is currently really slow, bringing the fps down to 25-40, but I hope to make it faster soon.