Skip to content

Instantly share code, notes, and snippets.

"use strict";
var matches = 0;
function LL (x) {
return 1/(1+Math.pow(10,(-x/400)));
}
function LLR(W, L, elo0, elo1) {
//if (W==0 || L==0) return 0;
"use strict";
var matches = 0;
// 'Borrowed' from http://www.math.ucla.edu/~tom/distributions/binomial.html
function LogGamma(Z) {
var S=1+76.18009173/Z-86.50532033/(Z+1)+24.01409822/(Z+2)-1.231739516/(Z+3)+.00120858003/(Z+4)-.00000536382/(Z+5);
var LG= (Z-.5)*Math.log(Z+4.5)-(Z+4.5)+Math.log(S*2.50662827465);
return LG
#!/usr/bin/env node
'use strict';
process.title = 'gtp2ogs';
let DEBUG = false;
let PERSIST = false;
let KGSTIME = false;
let NOCLOCK = false;
let GREETING = "";
// config.js
export.ranked = getConfigObject(true);
export.unranked = getConfigObject(false);
function getConfigObject(isRanked) {
return {
boardsize: checkBoardSetting(getRuSetting(arv["boardsize"], isRanked)
komi: checkSetting(getRuSetting(arv["komi"], isRanked)
}