Skip to content

Instantly share code, notes, and snippets.

View Noxville's full-sized avatar
🎮
esports

Ben Steenhuisen Noxville

🎮
esports
View GitHub Profile
@Noxville
Noxville / LeagueListingUpdateJob.groovy
Created April 1, 2015 17:10
LeagueListingUpdateJob
package twopee;
class LeagueListingUpdateJob {
def concurrent = false
def leagueListingService
static triggers = {
simple name:'leagueListingUpdateTrigger', startDelay: 1000, repeatInterval: 60000 * 60
@Noxville
Noxville / PatchService.groovy
Created April 22, 2015 08:25
Patch Service
package twopee
import grails.transaction.Transactional
import org.hibernate.Session
@Transactional
class PatchService {
String getPatch(Mtch match) {
return getPatch(match.matchId)
@Noxville
Noxville / compare_tournament_format.py
Created April 26, 2015 13:34
Comparison of Tournament Finals Formats
A = 0.5
B = 1 - A
import random
def boX(X, a_chance, adv=0):
"""
Given two teams where team A has an `a_chance` to win and an `adv`
game advantage, this simulations one best-of-`X` game.
"""
@Noxville
Noxville / EloSnippet.groovy
Created May 7, 2015 15:41
Elo Calculation Snippet
final static double K_WEIGHTING = 64.0
final static double MEAN_RATING = 1000.0
def newRadElo = calculateElo(radElo, direElo, (winner == "Radiant"))
def newDireElo = calculateElo(direElo, radElo, (winner == "Dire"))
double calculateElo(Elo thisTeam, Elo otherTeam, boolean win) {
double diff = (win ? 1.0 : -1.0) * (thisTeam.rating - otherTeam.rating) / 400.00
double _d = 1.0 / (1.0 + Math.pow(10.0, diff))
Hey I only saw this now, but I think it's still reasonable to comment.
In short, I agree with the conclusion of your article - Newbee absolutely don't deserve an invite - just not some of the intermediate steps.
Winrate is, on it's own, not a good indicator of performance. If Newbee had a 40% winrate against just Vici, iG and LGD with a large sample- then they would legitimately be one of the top teams in the world and worthy of an invite. It matters *who* you're winning and losing to as much as it does how much you're winning or losing by.
KDA can be also be misleading. Sure - the very top teams generally have a very high KDA because they have so few deaths, but around the middle it's heavily dependent on who you play against; and what style of game you play. At The Summit 3 for example, a lot of the games are finishing *very* early - this creates highly polarised KDA's compared to longer games that we've seen in 6.84. Also, even if all teams are playing a similar style: to have a lower KDA when playing
dota_embers 0
dota_toggle_asssisted_camera 1
@Noxville
Noxville / game_votes.py
Created August 29, 2015 16:47
TI5 Replay Votes
#!/usr/bin/python
import sys
import requests
import time
def get_votes(m_id):
if len(sys.argv) <= 1:
print "You need to add an API key as a sys arg"
return
url = "https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?match_id={}&key={}".format(m_id, sys.argv[1])
def oneMonthAgo = new Date(System.currentTimeMillis() - 1L * 30 * 24 * 60 * 60 * 1000)
def teams = Team.list()
.findAll { ((it.lastPlayed > oneMonthAgo) && (((it.wins + it.loses) > 50) || (it.rating > 1200))) }
.sort { -it.rating }
@Noxville
Noxville / riddler.py
Created January 8, 2016 14:07
Salesman Ridder Problem on Five Thirty Eight
#!/usr/bin/python
from itertools import permutations
from math import e, ceil
cutoff = int(ceil(5. / e)) # for verbosity - it's 2
def solve(left, best):
for remaining in left:
if remaining < best:
return remaining
@Noxville
Noxville / Glicko2.groovy
Created May 25, 2016 13:01
Glicko 2 Groovy Implementation
static class Glicko2 {
double _MU
double _SIGMA
double _PHI
double _TAU
double _EPSILON
Glicko2(Double mu, Double sigma, Double phi, Double tau, Double epsilon) {