1.3.10 • Published 10 years ago
dominioneer v1.3.10
Domioneer
Dominioneer suggests dominion games based on users ratings of previous games.
Examples
Creating a game
var Dominioneer = require('dominioneer'),
deck = new Dominioneer.Deck(null),
builder = new Dominioneer.GameBuilder(),
game = builder.createGame(deck, null)
Creating a game with a required set of cards
var Dominioneer = require('dominioneer'),
builder = new Dominioneer.GameBuilder(),
deck = new Dominioneer.Deck(null),
// Now provide a function that picks out required cards.
// The builder has one for you already.
var builder.createGame(deck, ['Cellar', 'Witch']),
Rating a game
Assuming you have created a game as, in above, its pretty easy!
// if you want to store the results permanently, history builder can
// take a reference to an AWS.dynamodb
var histories = new Dominioneer.HistoryBuilder(null);
histories.get("Dana", function (history) {
// 0 (dislike) or 1 (liked) is allowed
history.rate(game, 1);
});
Decide how much you will like a game
var histories = new Dominioneer.HistoryBuilder(null);
histories.get("Dana", function (history) {
// note that prediction is asynchronous
history.predict(game, function(rating) { console.log(rating) });
});
Installation
npm install dominioneer
Todo's
- Improve predictions at lower sample sizes
- Allow more variety of parameters to control random games
- Expansion weight * Better prediction at small sample size
1.3.10
10 years ago
1.3.9
10 years ago
1.3.8
10 years ago
1.3.7
10 years ago
1.3.6
10 years ago
1.3.5
10 years ago
1.3.4
10 years ago
1.3.3
10 years ago
1.3.2
10 years ago
1.3.1
10 years ago
1.3.0
10 years ago
1.2.6
10 years ago
1.2.5
10 years ago
1.2.4
10 years ago
1.2.3
10 years ago
1.2.2
10 years ago
1.2.1
10 years ago
1.2.0
10 years ago
1.1.1
10 years ago
1.1.0
10 years ago
1.0.0
10 years ago