Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This is an implementation of ELO for Node.js (ELO is named after Arpad Elo, hence the package name). This module is heavily tested and has many features used in real-world ELO situations.
npm install arpad
This is a fairly simple example showing the most common usage for Arpad:
var Elo = require('arpad');
var elo = new Elo();
var alice = 1600;
var bob = 1300;
var new_alice = elo.newRatingIfWon(alice, bob);
console.log("Alice's new rating if she won:", new_alice); // 1605
var new_bob = elo.newRatingIfWon(bob, alice);
console.log("Bob's new rating if he won:", new_bob); // 1327
This is a more complex example, making use of K-factor tables and score values:
var Elo = require('arpad');
var uscf = {
default: 32,
2100: 24,
2400: 16
};
var elo = new Elo(uscf, 100);
var alice = 2090;
var bob = 2700;
var odds_alice_wins = elo.expectedScore(alice, bob);
console.log("The odds of Alice winning are about:", odds_alice_wins); // ~2.9%
alice = elo.newRating(odds_alice_wins, 1.0, alice);
console.log("Alice's new rating after she won:", alice); // 2121
odds_alice_wins = elo.expectedScore(alice, bob);
console.log("The odds of Alice winning again are about:", odds_alice_wins); // ~3.4%
alice = elo.newRating(odds_alice_wins, 1.0, alice);
console.log("Alice's new rating if she won again:", alice); // 2144
If you'd like to contribute be sure to run npm install
to get the required packages and then make changes.
Afterwards simply run the tests.
If everything passes your should be Pull Request ready.
npm test
MIT
FAQs
An implementation of the ELO Rating System
The npm package arpad receives a total of 0 weekly downloads. As such, arpad popularity was classified as not popular.
We found that arpad demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.