Age of empires Ai sort off thing

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

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

Has any one got any on how to do one

Ok I think I get it but it will invlolves types

Doesn't it always?

lol By the way any help availble

Use types, I definitely remember someone saying it would involve types.

"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?

yes

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.

Ahah! this 'might' have something to do with Agamers secret project hmm.. ;)

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}

Yes maybe it does well my new secret project the old ones onm the modler at the moment

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.

yeh I have done that