Jump to content
GriefCo.de
Sign in to follow this  
  • entries
    2
  • comments
    0
  • views
    79

About this blog

General ideas through the process of creating the GHost++ bot

Entries in this blog

GriefCode

Hey,

I just thought I should share some information I recently made on storing the game data, especially for DotA games in a better way to have it:

  1. Better accessible, not across 4 different tables. & having at least 2 queries
  2. Faster
  3. Lower disk usages for database servers
  4. & maybe some more

So let's start up on getting into details.
The current situation is that our data is stored across 6 tables:

  • dotaplayers
  • gameplayer
  • games
  • dotagames
  • gameevents
  • gamechatevents

This is all currently merged and selected when we want to get the data of one game. The first step would be to merge 4 major tables:

  • dotaplayers
  • gameplayer
  • games
  • dotagames

The solution is pretty simple. Since MySQL 5.7 JSON is supported which is perfect for this solution, we can just put each player or all players into one column and store them there. dotagames & games can be easily merged and would not be a big deal.

A player database set could look like this for now:

{
	"2k":3,
	"3k":0,
	"4k":0,
	"5k":0,
	"gain":23.915174363808,
	"gold":1924,
	"hero":"EC77",
	"name":"eliteshadow",
	"items":[
		"I0P1",
		"I08O",
		"I05Y",
		"I09H",
		"I095",
		"I0AI"
	],
	"kills":15,
	"level":18,
	"realm":"europe.battle.net",
	"colour":1,
	"deaths":0,
	"assists":6,
	"firstdead":0,
	"leavetime":1713,
	"creepkills":90,
	"firstblood":0,
	"leftreason":"has left the game voluntarily",
	"towerkills":2,
	"creepdenies":3,
	"neutralkills":1
}

While we got rid of some columns that are not required anymore, we also have a whole player with all information, which is easy to extend, adding new information to a player would no longer require to change the database structure. 

The entries in the old tables can be removed after the transformation.

So far, I found only one issue across the system.
Players would be no longer trackable, especially by ip, as I have found a solution for that already, I will create a new blog entry for that to explain details and database structures.

The whole system will be fully implemented with IPS-Stats 1.2.

 

Greetings,
Grief

GriefCode

This blog article will describe my thoughts on the current autoban system and steps to enhance it. At the end we will try to provide a better autoban system, that is:

  1. Easy to configure
  2. Easy to understand
  3. Easy to use

For archiving that, we need to take care of the current situation and issues.

For being more specific in the further text, the grace time is set to 3 minutes.

 

Current known issues:

  • The bans are not directly executed, that is due to the grace time. We allow people to leave within a grace time until a game ends.
  • The ban length is too low

 

What do we want to archive?

  • Dynamic ban length, based on previous bans, potentional leavers & player stats, therefore we need a good algorithm to determine the situation
  • Direct bans, without delay, the previous algorithm can help in first way and additional ingame stats can be measuered when a game potentionally will be finished and indicate if the gracetime is close or not
  • Blocking from newer lobbies until a game has been finished, once the game has been finished and the leave was within the gracetime, we prioritize the players that left in the gracetime

Let's collect up the points and how this could be solved.

Dynamic ban length
The ban length is based on the player stats and its percentage of leaving in previous games. The minimum and maximum ban length can be defined in the config as well as steps between it. For now, we will split it up in 5 ban lengths. As example take:

  • 12 hours
  • 1 day
  • 3 days
  • 7 day 
  • 14 days

The ban length assigned to a player underlays certain conditions to be summed up togethere:

A player leaves within 5 minutes into the game
Immidiatly banned on 5th step. That does mean 14 days, we do not take care of any other conditions. The reason for that is, if you join a game, you should know the measure of time a game takes. In our games the common time for a game is around 40 minutes. If for any reason there was an issue which caused the leave, he  can still appeal. The same rule applies to any other leaver within the first 5 minutes, except the game has been drawn (2 leavers within the 5 minutes)

< 5 games on the bot, no leave 
The player is immediately banned after leaving the game for the 4th punishment step. Which in our example means 7 days.

< 5 games on the bot, 1 or more leaves
The player is immediately banned after leaving the game for the 5th punishment step. Which in our example means 14 days.

< 10 games on the bot, no leave 
The player is immediately banned after leaving the game for the 3rd punishment step. Which in our example means 3 days.

< 10 games on the bot, 1 leave 
The player is immediately banned after leaving the game for the 4th punishment step. Which in our example means 7 days.

< 10 games on the bot, 1 or more leaves
The player is immediately banned after leaving the game for the 5th punishment step. Which in our example means 14 days.

At the point over 10 games wer are switching to a caluated leave percentage. That does mean each game where the player did not stay until the game has been finished (- grace time) is counted as a leave.

> 10 games, > 98% leave
Nothing, the player wont be banned

> 10 games, > 94% leave
The player is banned for the 1st step, that means in our example 12 hours

> 10 games, > 90% leave
The player is banned for the 2nd step, that means in our example 1 day

> 10 games, > 80% leave
The player is banned for the 3rd step, that means in our example 3 days

> 10 games, > 75% leave
The player is banned for the 4th step, that means in our example 7 days

> 10 games, > 70% leave
The player is banned for the 5th step, that means in our example 14 days

Generally, a player is not banned on a disconnect. However, if it appears to be unnatural, a disconnect is counted as leave. Unnatural does mean when someone is disconnecting on more of 10% if his games. If a player is known having issues with disconnects, he can request to be whitelisted. However, as soon as an abuse is detected on that, he will be permanently banned from the system.


As previous defined, some players are not directly banned, that is commonly everyone with 10 games+. The following algorithm will describe wethere a player is now directly banned or only blocked for a periodic time.

Direct ban (XOR):

  • No rax was killed
  • No one is currently forfeiting the game
  • The game time is lower than 40 minutes

Blocking (XOR):

  • Any rax has been killed
  • At least one or more is currently forfeiting the game
  • The game time is longer than 40 minutes

Blocking will redirect the player to a virtual lobby which will notify him on the current situation. However, if someone was blocked and tried to join the game, he should not be punished too hard.
As redemption, we will prioritize him and grant him a reserved slot for one more game, that does mean 2 times a reserved slot.

If a player is blocked and the grace time expiry, the block is converted to a ban.

 

Overall the whole system can prevent people from joining new lobbies when they should be banned. For that we will announce that people should stay till the end. If they leave earlier and are being blocked it will be their fault. At least, we will have a redemption attemp for that case.

For having all the above said to get working, there are some modifications to the bot required which will follow the next days.

The blog will be updated with more information and further handling.

 

Regards,
Grief

Sign in to follow this  
×