View Full Version : Updated balancer

12-31-2014, 11:34 PM
Here it comes. Instead of nagging all the time I'll try and offer my help with a (hopefully) improved balancer in siege. Will be my first game related code project so I'll ask for help after reading into it. Do you guys have a test environment I could use? Higor? Chamberly? Any documentation? Location of current balancer code?

01-01-2015, 12:21 AM
If you are making the balancer for |uK| then you might have to test it on their servers but I could provide a test for you on my server (I have 2 separate ones, different host, different file/game set up) if you'd like to test.

Meanwhile don't forget to let .seVered.][ know as well... he a junkie when it come to make new stuff. Watch him spill out some ideas.. rofl.

I'm not sure what is the current balancer but there could be some found in such places like www.ut-files.com Index of ./ (http://ut-files.com/) and see what is given.
I did know Higor made one but it's hella tight, can't even switch myself from nexgen. :P Can be only seen if you are playing with Ferbotz in Siege. :D

01-01-2015, 12:45 AM
Hello, you have three starting points:

- AutoTeamBalancer, currently in use:
-- Initial balancing by strenght (single strength value based on score over time).
--- Requires an unreleased tool of mine to operate with NexGen.
-- Mid-game balancing by strength (undesired in siege, disabled by nexgen)
-- Super hardcoded for 2 teams (good luck making that logic work with 4 teams).
--- Automatically disabled in 3way, 4way using a third party tool.
-- Lots of admin commands that shouldn't be in there.
-- 4096 profiles, based on Name+IP

- AdvancedTeamBalancer r1x, tested on uK over a year ago.
-- Balancing by strenght (dual strength value: kills/time, score/time)
-- Mid game balancing can operate to keep teams balanced by:
--- Exact strenght: shuffles players (ideal for CTF, bad for siege)
--- Ignore player count when assigning new players (expect 8 v 11 if games are too lopsided, too extreme)
--- Gets fucked when lots of players on one team leave and mid game balancing gets locked.
-- Limbo mode while ACE validates a player for HWID ID (player kept in a fake spectator state)
--- Limbo mode breaks when lots of players enter/leave in a short amount of time.
--- Players leaving Limbo mode into a team may not be registered as valid players, causing more imba.
-- Completely shuts down Nexgen's team control, moderators may not be able to do adjustments.
-- ~900 profiles, based on HWID.
-- Siege team elimination support.

- CacusTeamBalancer, private update of AdvancedTeamBalancer, running in cham's server.
-- Native code, heavy usage of binary serialization and dynamic arrays for registering players and stats. (Get ready for VC++6 and GCC 2.94.5)
-- Limbo mode completely removed, player ID's done via NexGen instead of HWID.
--- Team rosters no longer break, still tends to fail when players leave.
-- Uses last 16 games' scores for strength instead of last 1.
-- ~900 profiles, based on NexGenID.
-- Siege team elimination support.
-- Player profile remembers old team, reapplies when rejoins if possible.

Common point in all three:
- The code is an ancient alien language, get ready for long sessions of 'decoding' before starting.

- Initial balancing works fine on all three already.
- Identify players via NexGen is the recommended option.
- Mid game balancer should not switch players that have been over 5 minutes in a team.
- Mid game balancer should return players that have been lame-switched by !s !t when a new player joins (within a short time span).
- Balancer should not pair Score STR players against Kill STR players, instead mix them up.

The best bet, is to put the code available in a dropbox repository and then apply updates as they are posted in a forum thread, this way I can do stuff to it as well.

--- Updated ---

I'd start with CacusTeamBalancer.

- Learn the parts of UnrealScript most modders don't bother understanding:
-- How UnrealScript operates with native code.
-- Handling non-actor objects as actor extensions.
-- Optimized iterators, everywhere.
-- Balancing logic using goto loops (I can resume that for you... if I get to understand my own code lol)
(I highly suggest you to lurk at the IRC channels Cham and I can tell you to go via PM)

The project itself is of simple nature, you'll have a harder time understanding the balancer logic rather than the very weird UnrealScript fundamentals used.

The native code has already been compiled, and as long as you don't change some structs you can edit the UnrealScript code just fine.
Otherwise I can rebuild the DLL and SO when needed... yes, I'm one of the very few mortals alive that can build native code for Linux UT.

01-01-2015, 01:18 AM
different host, different file/game set up
I had no idea of this O.o always thought it was at least same host.
Quite a funfact

01-01-2015, 01:20 AM
Thanks folks.

Higor, why do you suggest starting with the CacusTeamBalancer instead of the current balancer? With the current balancer I could start make notes on how to improve it while playing and go from there. If you could provide me with the current UnrealScript code I'll go through it and figure out if I can read the semantic somewhat or how much learning I'll have to do first.

PM me IRC server and chan, I'll install client.

01-01-2015, 03:01 AM
PM me IRC server and chan, I'll install client.


Imo, the CTB (short word for CacusTeamBalaner) have an already prepared set of better balancer strategy than the other one which only limited to a few things that you may need to work harder to put codes in to change a lot of things. If that make sense for you. lol.

01-01-2015, 09:41 AM
why dont you run CTB Higor alongside the current to collect all necessary data and say after maybe a month or two's collection of data we switch? - if its as good if not better than the current balancer that is...

just an idea

01-01-2015, 11:53 AM
IronMaiden SAM
This is the project source: https://www.dropbox.com/sh/mc9k1vha2cvaxw2/AACBYHiqZQTR2mAoAljIV0rna?dl=0

I'll be doing a redesign in the timer and player detection events to make the code a lot more readable, but at least you can checking it out.

01-06-2015, 07:31 AM
You can may be update for ctf4 .. there is no working one for ctf4 AutoTeamBalance mutator for even games - Page 6 - The Unreal Admins Page - Forums (http://www.unrealadmin.org/forums/showthread.php?t=23777&page=6)

01-13-2015, 04:15 PM
I'm not sure what is the current balancer but there could be some found in such places like www.ut-files.com Index of ./ (http://www.ut-files.com) Index of ./ and see what is given.
I did know Higor made one but it's hella tight, can't even switch myself from nexgen. :P Can be only seen if you are playing with Ferbotz in Siege.

Actually, I believe I have the code for the balancer, although not current I'm sure. It has not been a target for review, since I haven't reviewed anything for quite some time..

I do hope soon we can gather again and conquer the TeamBalancer, and bring harmony once again to our |uK| Uneal community.

01-13-2015, 05:42 PM
If you stop AFKing we can go ahead and bring tools and blueprints to play with. lol.