A Word On AI Servers

edited October 2024 in Server Support

Greetings! I've been playing around with a bot server and have noted some things over the course of the last few months.


With 32 bots playing the server doesn't have much cpu time devoted to T2 due the relatively efficient code but didn't like the fact the server would consume around 200w of power with just about any exertion. i remedied this by swapping in a low wattage Xeon of the same socket and setting the power subsystem to only use full performance of the mem and drive systems, turbo boost is disabled. This brought idle watts down to 80 and lower and play was unaffected. So there's that if you want to run a server and not have it noticed in your power bill.


Another thing noted was increasing priority seemed to have a detrimental effect on gameplay. One issue noted at higher than normal priority is nonreg laser hits, setting the server back to normal pri seemed to allow for a noticeable increase in laser rifle registers. This may also tie in with odd random crashes, if you run at high or real time pri you may be causing the code to stall as the parent may be waiting for the child thread to say something while the child's waiting for the parent to say something and the pri is keeping that from happening, with 4 threads per T2 server noted in task manager. There may be some disk issue involved if disk access is preempted, net activity should not be in question regardless the pri. So in my case higher pri isn't always better.

My server bios gives options for how an admin wants their memory system used, either as active ecc or simple memory mirroring. In memory mirroring the total ram count is halved as the memory contents are mirrored. I tried this and after a few hours running weird things came up in gameplay. I restarted the server and selected ecc as the mem protocol and weirdness was resolved. This reminded me of an old tale told me by T2 vets ages ago that T2 didn't like to live on RAID0 disks, that said memory mirroring isn't like RAID0 at all, more like RAID1. Also right now my T2 server install is on a hardware 15krpm sas RAID0 array and seems to be happy.

Something that did provide a bit smoother gameplay was setting affinity to only one core or a specific few cores instead of all 8 or whatever n cores you have. At issue with my specific server is HT, hyperthreading is enabled; some of the cores are in essence vestigial, meaning they're not full cores. If you set affinity to some cores but not others in a HT system you need to know what specific cores are literal and what are virtual or weird things may happen. So in this server I gave up on setting affinity and suggest you do the same if you have a system that employs HT but it will work fine in a server that isn't HT.


One of the things I note in several bot servers I've visited recently is stuttering during gameplay, in some cases severe enough to be unplayable and even nauseating.

This detriment is almost always resolved with the simple application of this control typically found either in serverprefs or in your autoexec folder;

"SetPerfCounterEnable(0);"

I have to assume each server that stutters has perfcounter set to 1 meaning it's enabled and this is the number one cause of stutter in servers, set it to 0 and enjoy a smooth server.

Comments

  • After finding a link to some very interesting Tribes 2 related projects I noted this one;

    Of interest to me was the use of raytracing to allow the ai to only see what is within a defined virtual cone of vision, the ability to virtually "hear" nearby explosions regardless if they are within the cone of vision and to move away from such, and the ability to dodge a projectile if that projectile is "seen" before hand and is able to be dodged. What I didn't want is the ai weighting/priority changes as well as si loadouts, Roboto and Lagg have that down pat.


    So I looked over the code and started editing out the undesired functions and left in the desired, fully expecting the result to;

    1 Crash

    2 be unplayable due to all the raytracing (more or less what happened when I tested the scripts as dl'd)

    3 if it did play it wouldn't work as edited



    I started the server and it fired up with no complaints, then I started the client to do some tests. First thing after spawn I tried was to say hi to a bot that was directly in front of me a few meters and it had no response, I did a dance and the bot didn't giggle. I was like well I fooched the bots so now they aren't working at all and the match is going to have 36 bots standing in the place they spawned.

    Then it dawned on me since no bot was facing me they all ignored me; I was simply out of their new virtual cone of vision. I waited for the match to start then got in front of a bot coming my way and said hi, the bot greeted me as did the rest that I tested facing me. I especially wanted to see how the server would lag from raytracing but nope, it runs like normal and cpu use is at times as low as 2 percent. The match is still running and no untoward ai issues have arisen so far. The combat I did engage in resulted in play that was as-advertised in the newly scripted bots.


    (not the same raytracing as in this instance but you get an idea)

    :D

  • Lol sorry not raytracing but raycasting;

    https://www.youtube.com/watch?v=n28UT7ESdg0

Sign In or Register to comment.