サンプルとして、縦軸のプロット関数を変えられるようにしてみました。linear1200は、pSigmoid(原点付近での勾配が1/1200)との比較用です。
const f = { pSigmoid: (score) => Math.asin(Math.atan(score * ((Math.PI * Math.PI) / 4800)) * (2 / Math.PI)) * (2 / Math.PI), linear1000: (score) => Math.min(Math.max(score / 1000, -1), +1), linear1200: (score) => Math.min(Math.max(score / 1200, -1), +1), linear2000: (score) => Math.min(Math.max(score / 2000, -1), +1), linear3000: (score) => Math.min(Math.max(score / 3000, -1), +1) };
https://lab.mzr.jp/shogi/floodgate/
|