You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A TypeScript/JavaScript library for calculating player rating changes in Preferans card games. This library implements a sophisticated rating algorithm that considers player performance, existing ratings, and game-specific parameters (bula) to determine fair rating adjustments after each game.
It's important to understand the distinction between "bula" and "final score" in Preferans:
21
+
22
+
**Bula:**
23
+
-**Starting Bula**: All players begin with an identical bula value, determining the length of the game.
24
+
-**Game End**: The game finishes when the combined bulas of all three players equal zero.
25
+
-**Bula Tracking**: Each player tracks their bula progression in the middle column of their scorecard.
26
+
27
+
**Final Score Calculation:**
28
+
The final score used in rating calculations is much more complex than just the final bula. It involves:
29
+
-**Middle Column**: Your bula progression (can be positive-bad or negative-good)
30
+
-**Side Columns**: Points from tricks taken when other players were leading (multiplied by -10)
31
+
-**Opponent Deductions**: Subtracting what opponents documented taking from you in games where you were leading
32
+
33
+
The `score` parameter in this library represents the **final calculated score** after all these complex scoring rules are applied, not the raw bula value.
**Key Insight**: Pedja had the best performance (-500 score) but **lost** rating points because his high initial rating (1200) created high expectations that even his excellent performance couldn't fully meet.
176
+
177
+
#### Differences from Chess ELO:
178
+
1.**3 Players**: Each player's change considers performance against both opponents
179
+
2.**No Draws**: Scores are always different (theoretically ties possible but extremely rare)
180
+
3.**Base Rating**: Uses 1000 instead of chess's 1200
181
+
4.**Score Normalization**: Performance scaled by bula (game length)
0 commit comments