中国战地技术资源网 技术专区 官方教程学习园地 Welcome to HABAI - Hardware Accelerated Battlefield AI    (回复:5/浏览:577)
字号: ﹣中﹣
头衔 少校
积分 3671
帖子 304
注册 2012-01-02

Welcome to HABAI - Hardware Accelerated Battlefield AI

1 楼 发表于 2012-12-16 20:27 打印 只看楼主
Welcome to HABAI - Hardware Accelerated Battlefield AI

Give your bots the CPU cycles they deserve. They have earned it!

    Welcome to HABAI - Hardware Accelerated Battlefield AI
Hardware Accelerated Battlefield AI (HABAI) improves AI bot performance. At the present time it is only available for the Forgotten Hope mod for Battlefield 2. Support for other mods like AIX2 may follow. What does this mean ? For the player it means more intense game play, with bots using and performing better with weapons and vehicles. That means blistering game play with more bullets flying, more explosions, more aggressive AI, more fun ! Mods without servers full of human players can be given a new lease of life. The AI is more difficult to play with as it responds faster. Clans can use this mod to improve training in BF2 with bots.

The mod will also allow easy switching of maps using the in game map voting menu. There will also a be a custom quick start GUI so single player and coop players can get quickly into a multicore accelerated game with the AI.

Welcome to HABAI - Hardware Accelerated Battlefield AI
This screen shot shows the in game map chooser (map vote menu).

The mod will also fix the "autobalance.py" Python script provided by DICE as the current version does not balance bots when using more than 96 bots. At the present time the maximum 50/50 team balance can be achieved with 96 bots, with 48 on each team.

Yes, there really can be 96 bots balanced 50/50 in Battlefield 2 (plus one, me, the human player).

More bots can be added (up to 255 but that is a theoretical maximum) but one team will always be set at 48. With a fixed "autobalance.py" script balancing should be achievable for more than 96 bots. A solution will also be provided for becoming squad leader as when the maximum number of squads is reached it is not yet possible to become the squad leader. Other fixes and innovations may be developed.


As the AI has a seperate CPU core all to itself the engine does not scale down AI performance. DICE have stated that their engine does indeed do this when resources are limited ...
Tobias_Karlsson_(DICE) wrote:"Battlefield [...] is a real time system, which means that all subsystems have a very limited amount off time to perform their calculations [...] The AI system is time sliced, that means that all the major [AI] systems can abort, break, or postpone their calculations if they run out of time."

Quoted from "An Introduction to AI in Battlefield 1942" [Battlefield 2 AI is an almost identical system], Tobias Karlsson, Digital Illusions CE AB, p4, 2003-11-07.

This is done by splitting server (AI/bots) and client (graphical) operations between cores (CPU affinity) on a single machine with a multicore CPU. This is currently working but was not easy to achieve because various server options are sometimes poorly documented and sometimes don't work as expected. More so the Battlefield 2 engine architecture, especially the operation of the AI, is not widely understood (I thank Void here for his help, see his ESAI ).

My testing shows much improved frame-rates ... for example there are no slow downs when there are lots of AI in one area. Benchmarks prove that there is an improvement. The important figure in the following tables is the "Avg" (average) number for FPS - Frames Per Second. The benchmarks were all taken on the same Forgotten Hope level, Anctoville, as all 48 bots of one side spawn in a single area. This is where AI slow down often occurs as well as framerate glitches. Benchmarks taken on Quadcore Q6600 and Nvidia 9800GT machine.

Fraps benchmark for a game started using the in game server creator.

Frames, Time (ms), Min, Max, Avg
1485, 60000, 15, 42, 24.750

Server and client on single core.


This improves AI performance as well as keeping the framerate in the graphical client as high as possible.

CREDITS

Very special thanks to everyone at battlefieldsingleplayer.com for keeping single player / coop alive. Thanks to the Forgotten Hope team for their high quality mod and for supporting AI. Thanks to Forgotten Hope single player fans in the FHSP forum section. Thanks to bfeditor.org for technical support. Thanks to djinn for moral support. Thanks to Void for AI enlightenment.
图片不知道怎么搞的,这么乱啊
[本帖由帖主于 2012-12-17 19:14 编辑]
Welcome to HABAI - Hardware Accelerated Battlefield AI
Welcome to HABAI - Hardware Accelerated Battlefield AI
3
狂顶
0
猛踩
头衔 少校
积分 3671
帖子 304
注册 2012-01-02
2 楼 发表于 2012-12-16 20:33
图片不知道怎么弄的,搞乱了[晕]
头衔 版主
积分 37604
帖子 1402 (2)
注册 2009-07-10
3 楼 发表于 2012-12-16 20:37
修改BF2.exe 给予更多的CPU核心支持? 让多核CPU分担AI和渲染?
头衔 少校
积分 3671
帖子 304
注册 2012-01-02
4 楼 发表于 2012-12-16 22:44
引用
原帖由DoragonKong于 2012-12-16 20:37 发表
修改BF2.exe 给予更多的CPU核心支持? 让多核CPU分担AI和渲染?

感觉画面有本质的一个飞跃,我看截图还不错[强]
头衔 上尉
积分 1893
帖子 206
注册 2012-10-04
5 楼 发表于 2012-12-17 21:36
额,能不能说中文
头衔 少校
积分 5781
帖子 370
注册 2014-06-19
6 楼 发表于 2014-09-06 22:55
俺们学渣English不好