public void dump(String filename) {
        LinkedList<Integer> scores = new LinkedList<Integer>(scoreHistory);
        int size = scores.size();
        double avg = average();
        double std = stdev();
        Collections.sort(scores, Collections.reverseOrder());
        try {
            PrintWriter writer = new PrintWriter(filename+".txt");
            for (int i = 1; i < 100; i++) {
                // rank top 1/i
                int rank = (int)(size / i - 1);
                if (rank < 0)
                    rank = 0;
                double score = scores.get(rank);
                double coeff = (score - avg) / std;
                writer.println(coeff);
            }
            writer.flush();
            writer.close();
            writer = new PrintWriter(filename+"_raw.txt");
            for (int i = 1; i < nround; i++) {
                writer.println(scores.get(i));
            }
            writer.flush();
            writer.close();
        }
        catch (Exception e) {
            System.err.println(e.toString());
        }
    }