AllegianceZone / Allegiance

Allegiance is a multiplayer online game providing a mix of real-time strategy and player piloted space combat gameplay.
http://allegiancezone.com
MIT License
10 stars 7 forks source link

Bot AI - DM - 1v1 - Fight or Run decision. #27

Open BigBetaTester opened 10 years ago

BigBetaTester commented 10 years ago

If a bot finds itself in the position where the enemy has a blind side advantage and that bot will take or is taking damage, the bot needs to decide whether it is advantageous to boost away or instead turn to fight.

The decision will eventually have to take into consideration many factors down the road such as in conquest games, but in the case of a 1v1 DM, this decision should be relatively simple and maybe applicable to DMs greater than 1v1.

If a bots ability to inflict damage upon the enemy (taking into consideration turn rate / distance / fire lead time) exceeds a given time such as: .4 seconds, then the bot should boost in the direction which provides the maximum acceleration and distance from the enemy until it can acquire the most advantageous position for the chosen attack behavior. I imagine the bot will choose to boost on a flight path that delivers both great (or maximum) acceleration and increases distance where it will change behavior from "Run" to "Attack".

Perhaps it will be necessary to break this down further to define "Flight (run)" and "Fight (attack)" behavior which will be further broken down for any given scenario. For now I would try the threshold of target acquisition to be .4 seconds for "Flight (run)" and to return to "Fight (attack)" at say in-gun range value + whatever distance is necessary to facilitate a turn to re-acquire enemy.

Run decision = Bot takes damage and cannot acquire target in .4 seconds or (maybe) deliver damage within 1.5 seconds? Bot runs on flight path that favors acceleration (within say 30 degrees of current flight path avoiding rocks of course) which also provides an increasing, or soonest to be increasing, distance from enemy.

Return to Attack decision = Bot reaches (yet to be defined) distance which allows bot to face, acquire target and deliver damage at optimum range.