Il bilanciamento delle valutazioni dei giocatori in un gioco di carte competitivo non è facile — e siamo stati iterating su un sistema Elo personalizzato che si adatta a Sedma, gameplay semice ispirato con metriche prestazioni uniche.
🎯 Cosa c’è di nuovo nel nostro sistema Elo?
✅ Dinamico K-fattore Il K-fattore controlla come le valutazioni veloci si adattano. Il nostro gioco adatta K in base alla tua attuale valutazione:
- <1200 Elo: K = 40 (i nuovi giocatori si adattano più velocemente)
- 1200–1800 Elo: K = 32 (regolazione normale)
- 1800–2200 Elo: K = 24 (più stabile)
- >2200 Elo: K = 16 (molto stabile)
✅ Performance-based bonus Il vostro aggiornamento Elo non è solo vincere / perdere:
- +0.05 per round vinto dai punti 16 (max +0.15)
- +0.1 per round vinto dai punti 24 (max +0.2)
- +0.03 per round ha vinto con 4 e ultimo (max +0.09)
Ogni mossa negativa applica un piccolo malus (–0.02), tappato al –0.3 totale.
✅ Bonus scaling Se si perde ma giocato bene? I tuoi bonus si applicano ancora — ma alla forza 10%.
💡 Perché questo approccio?
Vogliamo che Elo rifletta come si vince (o si perde), non solo il risultato. Una prestazione forte in una perdita dovrebbe ancora contare per qualcosa. Allo stesso modo, le vincite sconsiderate con molte mosse cattive non dovrebbero gonfiare le valutazioni.
public static void CalculateNewRatings(
ref int ratingA,
ref int ratingB,
bool playerAWon,
int badMovesA,
int badMovesB,
int wonBy16A,
int wonBy16B,
int wonBy24A,
int wonBy24B,
int wonBy4AndLastA,
int wonBy4AndLastB
)
{
// K determines how sensitive the Elo rating is to each match outcome.
// Higher K means faster rating changes (good for new players),
// lower K means more stable ratings (good for experienced players).
int kA = GetKFactor(ratingA);
int kB = GetKFactor(ratingB);
// Bonus and malus coefficients
const float BonusPer16 = 0.05f;
const float BonusPer24 = 0.1f;
const float BonusPer4AndLast = 0.03f;
const float MalusPerBadMove = 0.02f;
// Caps
const float MaxBonus16 = 0.15f;
const float MaxBonus24 = 0.2f;
const float MaxBonus4AndLast = 0.09f;
const float MaxMalus = 0.3f;
float baseScoreA = playerAWon ? 1f : 0f;
float baseScoreB = 1f - baseScoreA;
// Bonus for player A (full if won, 1/10 if lost)
float multiplierA = playerAWon ? 1f : 0.1f;
float bonusA =
Mathf.Min(wonBy16A * BonusPer16, MaxBonus16) +
Mathf.Min(wonBy24A * BonusPer24, MaxBonus24) +
Mathf.Min(wonBy4AndLastA * BonusPer4AndLast, MaxBonus4AndLast);
bonusA *= multiplierA;
// Bonus for player B (full if won, 1/10 if lost)
float multiplierB = playerAWon ? 0.1f : 1f;
float bonusB =
Mathf.Min(wonBy16B * BonusPer16, MaxBonus16) +
Mathf.Min(wonBy24B * BonusPer24, MaxBonus24) +
Mathf.Min(wonBy4AndLastB * BonusPer4AndLast, MaxBonus4AndLast);
bonusB *= multiplierB;
float malusA = Mathf.Min(badMovesA * MalusPerBadMove, MaxMalus);
float malusB = Mathf.Min(badMovesB * MalusPerBadMove, MaxMalus);
float adjustedScoreA = Mathf.Clamp(baseScoreA + bonusA - malusA, 0f, 1f);
float adjustedScoreB = Mathf.Clamp(baseScoreB + bonusB - malusB, 0f, 1f);
double expectedA = 1.0 / (1.0 + Math.Pow(10, (ratingB - ratingA) / 400.0));
double expectedB = 1.0 / (1.0 + Math.Pow(10, (ratingA - ratingB) / 400.0));
//Debug.Log($"[ELO CALCULATION]");
//Debug.Log($"Player A: baseScore={baseScoreA}, bonus={bonusA}, malus={malusA}, adjustedScore={adjustedScoreA}, expected={expectedA}");
//Debug.Log($"Player B: baseScore={baseScoreB}, bonus={bonusB}, malus={malusB}, adjustedScore={adjustedScoreB}, expected={expectedB}");
//Debug.Log($"Old Ratings - A: {ratingA}, B: {ratingB}");
ratingA = (int)Math.Round(ratingA + kA * (adjustedScoreA - expectedA));
ratingB = (int)Math.Round(ratingB + kB * (adjustedScoreB - expectedB));
//Debug.Log($"New Ratings - A: {ratingA}, B: {ratingB}");
}
private static int GetKFactor(int rating)
{
if (rating < 1200) return 40; // Fast adaptation for new players
if (rating < 1800) return 32; // Balanced default for most players
if (rating < 2200) return 24; // More stable for advanced players
return 16; // Very stable for top-ranked
}
📝 Qual è il prossimo?
⚠️ Questo sistema è sperimentale! Stiamo attivamente accordando i coefficienti e possiamo regolare:
- Quanti bonus/maluse pesano
- Quando i valori K cambiano
- Come gestire partite di squadra o pareggi
💬 Vogliamo il tuo feedback! Questa valutazione si sente giusto? Un match ti ha lasciato pensare che il cambiamento di valutazione non è stato giustificato? 👉 Commento qui sotto o raggiungere – il tuo input ci aiuta a perfezionare il sistema!
