Rounds

{% for round_data in metadata.rounds %} {% set round_num = round_data.round_num %}
{% if round_num > 0 and round_num in trajectories_by_round %} {% for trajectory in trajectories_by_round[round_num] %} {% include 'includes/trajectory.html' %} {% endfor %} {% endif %} {% if round_data.results %}
Round {{ round_num }} Results {% if round_data.results.winner and round_data.results.scores %} {%- set total_games = round_data.results.scores.values() | sum -%} {%- set winner = round_data.results.winner -%} {%- if winner != 'Tie' and total_games > 0 -%} {%- set winner_wins = round_data.results.scores.get(winner, 0) -%} {%- set ties = round_data.results.scores.get('Tie', 0) -%} {%- set win_percentage = ((winner_wins + 0.5 * ties) / total_games * 100) | round(1) -%} - Winner: {{ winner }} with {{ win_percentage }}% {%- if round_data.results.p_value is not none %} (p={{ "%.2f"|format(round_data.results.p_value) }}){% endif %} ( {%- for player, score in round_data.results.scores.items() -%} {{- score -}} {%- if not loop.last -%}-{%- endif -%} {%- endfor -%}) {%- elif winner == 'Tie' and total_games > 0 -%} - Winner: Tie {%- if round_data.results.p_value is not none %} (p={{ "%.2f"|format(round_data.results.p_value) }}){% endif %} ( {%- for player, score in round_data.results.scores.items() -%} {{- score -}} {%- if not loop.last -%}-{%- endif -%} {%- endfor -%}) {%- else -%} - No games played yet ( {%- for player, score in round_data.results.scores.items() -%} {{- score -}} {%- if not loop.last -%}-{%- endif -%} {%- endfor -%}) {% endif %} {% endif %}
{% endif %} {% if not loop.last %}
{% endif %} {% endfor %}