Jump to content

We need a smarter shuffle


paroxysm

Recommended Posts

Today, we played a no mercy round where we ended up scrambling 3 times and the same team that was winning remained that way. We need a smarter team placement algorithm at the beginning. If a team loses then, the other team is just better( most of the time).

Link to comment
Share on other sites

I think rank would work at least it would even out the regulars across both teams. If you got a game with 4 non regulars 3 on one team is essentially game over.

Link to comment
Share on other sites

If we ranked everyone using every available statistic that we're already recording, we'd have quite a few categories for ranking. From those, we could generate an overall rank which would probably be a better representation of a player's value than the current 'points' ranking.

 

I'll list all the categories I can think of just now that we're already recording the stats for, or at least round-based stats:

 

Accuracy, HS ratio?

avg # points earned/round

 

avg # achievements/round

 

total playing time

total points earned

 

avg # SI kills/round

avg # incaps/round

avg # survivor kills/round

 

 

I'm sure there are more categories we could have to make the system more comprehensive, but that's not the point

 

So we rank everyone in all of these categories, add up all of your ranks to get an overall rank (lower number is better). Sound good?

Link to comment
Share on other sites

Personally, I think ppm (points per minute) is the absolute best way to separate people. It's nothing fancy, but shows a lot.

 

How does the infected team dominate the survivors? By buying tanks. If we can evenly distribute people who are able to quickly buy tanks across the teams, it would be fairly balanced every round. On the flip side, how does a survivor earn high ppm? The ability to kill infected very fast with head shots and being a team player. The better a player is, the higher his ppm is.

 

However, there is also another factor that I know that should be considered: People with microphones. For every team that I've been on, even filled with regulars, that did not consistently use mics, we've lost. I believe it has to do with keeping people on target, knowing where to target (b&w, incaps, setting up, rushers), and implicitly giving directions to beginners. I don't know how, if at all, this can be considered as an element, but if possible it should.

 

To make sure the exact same teams aren't formed everything single time using ppm, I'd suggest up to +2/-2 to a person's ppm and then scramble. That way everyone has a chance of being on anyone's team. I generally hover around 20 ppm, so at worst case, I'd be considered equivalent to someone who's at 24 ppm, who would be obviously significantly better than me but would still be scrambled separately from people who earn say 15 ppm.

Link to comment
Share on other sites

PPM is not a great indicator imho. Most people hover around the 20-30 ppm range. You can also get quite a lot of points just by shooting commons off people for protection points. Common headshots also count for headshot ratio.

Link to comment
Share on other sites

Well that's the thing, there should be an even distribution of people who hoover around the 20-30 range. Also an even distribution among the 10-20 range. And the 0-10. Basically, each team should get half the regulars and half the beginners. as regulars are among the 20-30 range while newcomers are somewhere below that. Sticking purely to ppm may not be the optimal choice but I think it's the simplest way to be able to rank people from new players to the best players to scramble.

 

Rank would also probably work. The more a person plays, the better he/she is and the higher their rank would be. I just don't like the whole "encompass multiple factors into some complicated formula" thing because it's too complicated, but if it'll work then I'm all for it.

Link to comment
Share on other sites

There already is a scramble by ppm in place... though I think something is wrong with it since it rarely gets used (?)

It needs an admin to start it. If and when I'll get around to it, I'll have to edit the source for the l4dstats plugin where if it detects that the l4dstats plugin is active it will scramble based on PPM, but if it's disabled, it will use the scramble where it doesn't go based off of anything.

Link to comment
Share on other sites

Well, I ended up throwing something together where if the current scramble plugin finds a convar in the stats plugin, it disables the scramble plugin's votescramble command and uses the stats one instead, but if it doesn't find the convar in the stats plugin, it uses the scramble plugin's votescramble...hope that makes sense...

 

Maybe this'll make more sense:

 

	if(FindConVar("l4d_stats_rankvotefound") != INVALID_HANDLE)
{
	WasRankVoteFound = true;
	//This means that the rank plugin's vote scramble will be used
}
if(FindConVar("l4d_stats_rankvotefound") == INVALID_HANDLE)
{
	WasRankVoteFound = false;
	RegConsoleCmd("sm_votescramble", Request_ScrambleTeams, "Allows Clients to call Scramble votes");
	//This means that the old vote scramble will be used instead
}

 

I haven't tested it yet and I'm pretty sure it's not going to work properly as nothing I do does on it's first try...or several tries later, but we'll see. I'll have to hop on the server when we try this.

Link to comment
Share on other sites

Yeah, I was testing it late yesterday and everything seems to be working. You can type in "!check" in chat and it will output if it found a cvar or not. If it did, the rank PPM scramble will be used, and if it didn't it'll use the crappy scramble.

 

I made it so a ConVar gets created at the very end of everything being executed so if the rank plugin goes into a fail state due to it not being able to connect to the mySQL database the ConVar won't be created, thus falling back to the crappy scramble as a fail-safe.

 

It's really the only way I can get two separate plugins to talk to each other...I feel there is probably a better way, but I haven't found out about it yet...if one exists.

 

You could simplify your code by using an else statement, that way it catches any errors too.

There are really only two states for it to be in. An INVALID_HANDLE state, or anything other than an INVALID_HANDLE state.
Link to comment
Share on other sites

Yes, the only problem w/ that is that you're calling FindConVar twice, 1 too many times. But, the night which you said this will take effect, the next round, it started doing the random swaps that it had done in the past.

Link to comment
Share on other sites

The code that's quoted is outdated by the way since I had uploaded it. I just used it as an example.

 

I think the teams getting mixed up only happened because I had to upload an updated version of the plugin that fixes teams from getting mixed up and such so it had to reload. Has it happened at all since then?

Link to comment
Share on other sites

The overhead here is for the most part negligible. If your plugin is lagging, such an optimization would do very little to help. I assume, ofc, that FindConVar function doesn't require loads of cpu cycles to return such as querying an external server.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...