Age of empires Ai sort off thing

Blitz3D Forums/Blitz3D Beginners Area/Age of empires Ai sort off thing

Agamer(Posted 2004) [#1]
Ok so I want to do a Aai for real time stratergy and I found this one and I think I usnerstand the 6th case part b

http://www.gamedev.net/reference/articles/article545.asp


Agamer(Posted 2004) [#2]
Has any one got any on how to do one


Agamer(Posted 2004) [#3]
Ok I think I get it but it will invlolves types


Shambler(Posted 2004) [#4]
Doesn't it always?


Agamer(Posted 2004) [#5]
lol By the way any help availble


Shambler(Posted 2004) [#6]
Use types, I definitely remember someone saying it would involve types.


puki(Posted 2004) [#7]
"Agamer" - AI for real-time strategy is potentially huge (and complex). You need to start off small - can you currently move an entity via waypoints?


Agamer(Posted 2004) [#8]
yes


Neo Genesis10(Posted 2004) [#9]
The best way to tackle AI is to put yourself in the position of the character you're trying to manipulate and think like they would. Then you translate that into code. Example:

Soldier A is 2 blocks away from Soldier B
Soldier A is armed with a rifle with a 1 block range
Soldier A must move closer to Soldier B
Soldier A is now within firing distance
Soldier A fires

Or, in code...

If SoldierDistance(soldierA, soldierB) < soldierA\gunrange
	Shoot(soldierA, soldierB)
Else
	Move(soldierA, soldierB)
EndIf
A very simple example of how you can implement AI. But this is just one of many checks. You'll need to give a 'score' value to each possible action and have your soldier select the action with the greatest score potential. Example: Shooting a soldier is worth 10 points whereas shooting an officer is worth 20 points. So soldier A shoots the officer instead.


cermit(Posted 2004) [#10]
Ahah! this 'might' have something to do with Agamers secret project hmm.. ;)


BlackJumper(Posted 2004) [#11]
Shooting a soldier is worth 10 points whereas shooting an officer is worth 20 points. So soldier A shoots the officer instead


But a really well-coded AI might actually decide that the sanctity of human life over-rides any arbitrary points system and decide to just, y'know "give peace a chance."

Nik Kelly (Ace Pilot): "Go for the pilot... planes can be replaced, men can't" {Warlord comic circa 1975}


Agamer(Posted 2004) [#12]
Yes maybe it does well my new secret project the old ones onm the modler at the moment


eBusiness(Posted 2004) [#13]
For the economy, try making some "want values", for instance: Want for a barrack equals to amount_of_resources_being_collected_per_round * some_factor + resources_in_stock * some_factor - number_of_barracks * some_factor. Then do the most wanted stuff first.


Agamer(Posted 2004) [#14]
yeh I have done that