当前位置: 首页 > news >正文

星际争霸 —— AI游戏 —— 基于规则的硬编码AI如何取得优异的性能表现 (rule-based AI)—— 小型地图任务

星际争霸 —— AI游戏 —— 基于规则的硬编码AI如何取得优异的性能表现 (rule-based AI)—— 小型地图任务

游戏视频地址:


https://youtu.be/5dBEXAs8mOI


https://tl.net/forum/sc2-maps/488120-micro-ai-mod-arcade-game






提出问题:

That's really impressive .
A question, though: is the AI coded so that kiting units prefer to deal a lot of damage and take some as well, rather than dealing a bit less damage but take none at all? Because for example Phoenixes should be able to kite Mutalisks indefinitely without taking any damage, but here they do take some (if not much). Or does it have to do with the Phoenixes' unique ability to shoot while moving?


回答问题:

The main concept is that the AI searches for enemy units near to their own units. If enemy units are detected, the AI orders their own units to flee.

The AI searches for enemy units near to their own units by creating an "imaginary circle" for each unit. Basically, the center of this circle is each unit and the radius is defined by the program (which is eventually decided by me because I code the program xD)

For the case of the Phoenixes, the Phoenixes take a bit of damage because the radius is not "perfect". I tried to "perfect" it by increasing the radius, but this way, sometimes the Phoenixes do not have enough time to shoot (the Phoenixes turn around towards the Mutalisks but flee before they even have enough time to shoot). Therefore I am unable to set the radius to too high.

To answer your question, I prefer the kiting units to deal a lot of damage and take a bit of damage as well.

I'm not the best at explaining things but I hope you understand what I'm talking about xD