Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Stef

#481
General Discussion / Re: Better AI when?
04 April 2017, 10:43:06 AM
Quote from: david.g on 04 April 2017, 09:18:01 AM
Hi, I know nothing of programming etc, so forgive me if its naive to expect the AIs to be better than they presently are. They do quite well in some situations, but so often seem to throw games they could feasibly win, or at least do better in. Are there plans soon to improve overall play from our robot friends?

Better AI is both very important and a lot of work. If I'd have to guess now I'd say I start working on this halfway during May, and you'll see the (first significant) results by then end of June. But please don't pin me down on that. Improving the AI is probably something that can go on forever.
#482
After a lot of useful feedback last month and getting some of the most desired features implemented I'd like to revive this idea.


  • Please state your personal opinion on top 3 of things you'd like to see changed
  • Please don't discuss the opinion of others in this thread. If they ask for something you don't think is important at all, well, they're still entitled to that opinion. If you think a suggestion is interesting and warrants a discussion, feel free to start a new thread about it.

Regardless of what people post, the next thing to work on will be a bit of a sad one. Personal blacklists, reporting users, banning users... we just need to invest some time in that because there are a few players out there who are spoiling a lot of fun for others, and those negative experiences can carry a lot of weight.
#483
Other Bugs / Re: Rating calculation of sigma
02 April 2017, 03:55:38 PM
Quote from: markus on 02 April 2017, 02:43:24 PM
If you fix that and just set all players' sigma to 0.06 again, it should be fine.

Ok thanks I fixed it. Will be released tomorrow (most likely).
#484
Other Bugs / Re: Rating calculation of sigma
02 April 2017, 02:14:47 PM
I tried to be careful but of course it's possible there is a mistake. The easiest way to spot that would be... to just post the code here?


package matching.ratings;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;

public class RatingCalculator {

    public static final double DEFAULT_TOLERANCE = 0.000001;
    public static final double DEFAULT_TAU = 0.42;

    private final double TOLERANCE;
    private final double TAU;


    public RatingCalculator(double TOLERANCE, double TAU) {
        this.TOLERANCE = TOLERANCE;
        this.TAU = TAU;
    }


    public RatingCalculator(double TAU) {
        this.TOLERANCE = DEFAULT_TOLERANCE;
        this.TAU = TAU;
    }


    public RatingCalculator() {
        TAU = DEFAULT_TAU;
        TOLERANCE = DEFAULT_TOLERANCE;
    }


    public double g(double phi) {
        double tmp = 1 + ((3 * phi * phi) / (Math.PI * Math.PI));
        return 1 / Math.sqrt(tmp);
    }


    public double E(double mu, double muj, double phij) {
        double tmp = -g(phij) * (mu - muj);
        return 1 / (1 + Math.exp(tmp));
    }


    public double v(Rating oldRating, ImmutableList<Result> results) {
        double sum = results.stream().mapToDouble(r -> {
            double g = g(r.getOpposition().getDeviation());
            double E = E(oldRating.getSkill(), r.getOpposition().getSkill(), r.getOpposition().getDeviation());
            return g * g * E * (1 - E);
        }).sum();
        return 1 / sum;
    }


    public double d(double v, Rating oldRating, ImmutableList<Result> results) {
        return v * sumResults(oldRating, results);
    }


    public double sumResults(Rating oldRating, ImmutableList<Result> results) {
        return results.stream().mapToDouble(r -> {
            double E = E(oldRating.getSkill(), r.getOpposition().getSkill(), r.getOpposition().getDeviation());
            return g(r.getOpposition().getDeviation()) * (r.getScore() - E);
        }).sum();
    }


    public double f(double x, Rating oldRating, double v, double d) {
        double phi2 = phi2(oldRating);
        double tolerance = Math.pow(TOLERANCE, x);

        double leftNumerator = tolerance * (d * d - phi2 - v - tolerance);
        double leftDenominator = 2 * Math.pow(phi2 + v + tolerance, 2);
        double left = leftNumerator / leftDenominator;

        double rightNumerator = x - a(oldRating);
        double rightDenominator = TAU * TAU;
        double right = rightNumerator / rightDenominator;

        return left - right;
    }

    public double phi2(Rating oldRating) {
        return oldRating.getDeviation() * oldRating.getDeviation();
    }

    public double a(Rating oldRating) {
        return Math.log(oldRating.getVolatility() * oldRating.getVolatility());
    }


    public double newVolatility(Rating oldRating, double v, double d) {
        double phi2 = phi2(oldRating);
        double A = a(oldRating);
        double B;
        if (d * d > phi2 + v) {
            B = Math.log(d * d - phi2 - v);
        } else {
            int k = 1;
            while (f(A - (k * TAU), oldRating, v, d) < 0) k++;
            B = A - (k * TAU);
        }
        double fA = f(A, oldRating, v, d);
        double fB = f(B, oldRating, v, d);

        while (Math.abs(B - A) > TOLERANCE) {
            double C = A + (A - B) * fA / (fB - fA);
            double fC = f(C, oldRating, v, d);
            if (fC * fB < 0) {
                A = B;
                fA = fB;
            } else {
                fA /= 2;
            }
            B = C;
            fB = fC;
        }

        return Math.exp(A / 2);
    }



    public Rating updateRating(Rating oldRating, ImmutableList<Result> results) {
        double v = v(oldRating, results);
        double d = d(v, oldRating, results);
        double newVolatility = newVolatility(oldRating, v, d);
        double phiStar = Math.sqrt(phi2(oldRating) + newVolatility * newVolatility);

        double tmp = 1 / (phiStar * phiStar) + 1 / v(oldRating, results);
        double newDeviation = 1 / Math.sqrt(tmp);

        double newD2 = newDeviation * newDeviation;
        double newSkill = oldRating.getSkill() + newD2 * sumResults(oldRating, results);
        return Rating.builder()
                .setDeviation(newDeviation)
                .setSkill(newSkill)
                .setVolatility(newVolatility)
                .setNumberOfResults(oldRating.getNumberOfResults() + countGames(results))
                .build();
    }


    private int countGames(ImmutableList<Result> results) {
        return results.stream().map(Result::getGameId).collect(ImmutableSet.toImmutableSet()).size();
    }


}
#485
General Discussion / Re: Pro leaderboard with bugs
01 April 2017, 10:50:22 PM
no
#486
General Discussion / Re: Leaderboard
01 April 2017, 05:45:47 PM
Quote from: serakfalcon on 01 April 2017, 04:27:16 PM
So is there going to be a way to see more than the top 20??

Most likely not in the client. It should show everyone you're interested in. If there is a good demand for a full leaderboard we could put it somewhere on the web though, or I could generate an export of the ratings history database at some point if someone is interested in creating statistics on that.
#487
Quote from: overconvergent on 31 March 2017, 06:30:38 PM
Quite often when trying to join a game, the client will just hang on the loading page with the castle instead of bringing me to a table with another player.

What I usually do then is refresh to see the "Cancel & Resign" button which takes me back to the lobby.

2 questions:

1. Why are my new games often stuck on the loading screen?
2. Will using the Cancel & Resign button affect my rating?

Thanks!

1. There is an annoying bug I haven't been able to track down yet. When this happens, the problem is that your opponent does never connect to that game, so it won't start. On your side it looks like it's loading forever but actually on your side there is no problem. TBH, I've been quite busy with release 1.2 so now that that's live fixing this bug will be the next thing to do, and adding some dedicated logging should help me track it down.

2. In general yes using "cancel & resign" will affect your rating, but in this particular case no.
Resigning a game before the first player makes a decision counts as a loss, but resigning a game before all players are connected to the gameserver does not.
#488
Announcements / Re: Releases
31 March 2017, 05:30:11 PM
Version 1.2

  • Ratings, Leaderboard. (see here)
  • Inheritance
  • Fix: status bar referenced previous game on first join
  • Fix: champion after enchantress
  • Fix: already logged instead of loop
  • Several fixes to German translations
#489
Announcements / Rating Details
31 March 2017, 03:42:00 PM
This post is only for people interested in the underlying details

Your rating in glicko-2 consists of three numbers (μ, φ, σ).

μ is your estimated skill which starts at 0 and will go up for players better then average and down for players below average.
φ is your deviation, which starts at 2 and will go down whenever results come in and go up when they don't.
σ is your volatility, which starts at 0.06 and impacts how quickly your skill will change based on new results.

Glicko2 claims it's 95% certain your actual skill is between (μ-2φ) and (μ+2φ), and suggests using (μ-2φ) for rating / leaderboard, so we're doing that. It's also common to translate this (μ-2φ) to a more human-friendly number. We decided to go with levels, which are 50 + 7.5 * (μ-2φ), rounded to the nearest integer, but never below 0.

The 2P leaderboard updates are computed with τ=0.4; for 3-4P τ=0.3. These are relatively low values, because Dominion is a game with a relatively high chance that a weaker player beats a stronger player.

It's quite possible that 50 + 7.5 * (μ-2φ) is not very good at mapping everyone to the 0-100 range. If too many people end up at 0, or if someone goes above 100, we'll change the 50 or the 7.5 later on, but that won't impact the actual rating system under the hood.

----

There is only one queue with ranked players, even though there are several buttons to enter this queue. When you enter the queue, the system first looks at eligible opponents already in the queue. For every opponent it tries to assess the suitability on a scale of 0-1 on three different factors:

- level suitability = 1 - (atan(levelDifference / 20) * 2 / π)
- waiting suitability = atan(duration / 10000) * 2 / π
- familiar cards suitability = percentage of cards your opponent familiarized of the cards that you "expect to see". (you "expect to see a card" if you both subscribed to it and are familiar with it).

Both players have to say yes to eachother. For this decision, both the time and the familiarity factor are irrelevant.

- players who are "searching for a suitable opponent" will say yes to anyone with level suitability > 0.6 (~14.5 levels)
- players who are "searching for any opponent" will actually say yes to anyone with level suitability > 0.2 (~61 levels)
- players who are "waiting for expansions" will say yes to anyone who has subscribed to half the sets or more.

If there is at least one match (i.e. both players say yes to eachother) you will instantly find a game. You will be matched with the player where (level suitability + waiting suitability) is highest. If you're not matched, you're added to the queue.

familiar cards suitability is only used for the unrated queue, because that's the queue that will actually respect familiar cards. In that queue, players say yes to eachother if the familiar cards suitability is at least 0.4, and when selecting the best opponent this is based on the sum of all three (level suitability + waiting suitability + familiar cards suitability).
#490
Announcements / Automatching
31 March 2017, 01:28:47 PM
Automatch basic


  • Two Player will find you a rated game against a human opponent of similar level (your own level +/- 10).
  • Three Player will find you a rated game against two human opponents of similar level (your own 3P level +/- 10).
  • Practice Game will find you an unrated game against a human opponent of similar level (your own level +/- 10). The game will respect the familiar card settings of both players.
  • Bot Game will create an unrated game against the computer. The game will respect your familiar card settings.


Automatch advanced

  • Two Player will find you games with one other human.
  • Three Player will find you games with two other humans.
  • Rated game will find you rated games that don't respect familiar cards.
  • Practice games will find you unrated games that do respect familiar cards.
  • Wait for expansions means you'll only accept games with at least half the expansions. If you subscribed yourself this option is meaningless because all your games will have expansions anyway.
  • Min Rating Is the minimum level of your opponent compared to your own. It will use your 2-player-level for 2-player-games, and your 3/4-player-level for games with 3 players.
  • Max Rating is the maximum level of your opponent compared to your own.

you can search for both two and three player games; you'll be looking for either.
you can search for both rated and practice games; you'll be looking for either.
you can change your options while searching; this will affect your search.
when you search the server will automatically save your search options.

Automatch queue
(this is only visible if you have 'advanced' checked and are currently searching)
This box gives you a bit of feedback about the other searching users, and tries to explain to you why you're not in a match with any of those players. If you click on the name of another player, the colors of the searching options will change to reflect this. Green means there is no problem with this option. Red indicates there is a problem you can't solve (but the other player can). Yellow implies there is a problem which you could solve by relaxing your search criteria.
#491
Announcements / Ratings & Leaderboard
31 March 2017, 12:55:05 PM
Since release 1.2 players have a rating, based on glicko-2.

Every player is assigned a level, which we try to keep between 0 and 100.
- New players start at 20.
- You can go up by winning games.
- The only thing that matters is win/tie/lose (point margin is irrelevant; resigning is the same as losing).
- You can also go up if the system gets to know you better (e.g. after winning a game and losing one).
- You will go up more if you beat a higher ranked opponent.

There are two rating systems. One for 2-player games, one for 3-4 player games. This is because we intend to add an automatch queue for 3-4 player games in the near future. These rating systems are completely independent of each other. If you win a 3 player game, it counts as a win against both opponents. If you end up 2nd in a 3 player game, it counts as a loss against the winner and a win against the loser.

The leaderboard will update on a daily basis at 0:00 UTC. Players who haven't played any games that day will see their level go down a tiny bit. You will not be visible on the leaderboard if you haven't played any rated games. The leaderboard displays you, your friends and the top 20 players.

If you don't use automatch but create a table of your own, you can select whether or not this game will be rated. Games with bots, games with 5+ players and games respecting familiar cards will always be unrated though.

While it's possible to beat up dummy accounts in order to game the leaderboard, this is not a good idea if you're interested in the longevity of your account.
#492
Card Bugs / Re: Enchantress and Champion
31 March 2017, 10:25:02 AM
Quote from: TheSeal on 31 March 2017, 03:24:39 AM
So am I missing something as usual or is this really a bug?  Thanks!
There was actually a bug... I made Champion/Hireling always stay out, in stead of only when they're actually played.
Fixed it now (which doesn't mean the fix is released yet).

Quote from: TheSeal on 31 March 2017, 03:24:39 AM
P.S. As I was reading my post before hitting the post button, I just realized the log was showing me what my opponent was drawing. That really seems wrong.
The gamelog has a lot more info after the game is over. You don't see this during the game.
#493
Quote from: LastFootnote on 29 March 2017, 11:05:26 PM
And it's happening again. At least now it gives a dialog: "No gameserver available."

I assume customers' subscriptions will be extended to compensate for all this downtime?

There has been no gameserver available for ~3 min. Sure if this is something continuing I'm willing to compensate, but it will have to be more significant than this.

#494
If the biggest issue you name is "the embarrassment of the journey token stuff" I would say the testers group is doing pretty well. Personally I preferred the journey token before the change, some other group of people preferred it this way, fine, we changed it.

The fact that games couldn't start for some hours yesterday was a big issue; I'll happily invest time in trying to prevent that from ever happening again. The fact that some group of players preferred an image flip... I'm perfectly fine with correcting something like that in the next live release.
#495
Support / Re: Ready button not working
29 March 2017, 12:31:18 AM
Quote from: Linda B on 28 March 2017, 10:51:00 PM
THE FIX (temporarily anyway) is to keep hitting that READY button over and over and it will eventually let you in.

Sorry about that. The problem was with one of our gameservers, and when you hit ready it picks one sort of at random, except that that broken one (frankfurt) was really quiet so almost always preferred. If you were lucky you got connected to the tokyo gameserver which was fine.

The reboot solved it though, now both gameservers are working and I'll start the 3rd one (oregon) soon as well.