Skip to content

Commit

Permalink
Normalize playstyle vector prior to challenge matchmaking
Browse files Browse the repository at this point in the history
  • Loading branch information
SupraSummus committed Nov 18, 2024
1 parent 9d11908 commit 126abf2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions warriors/challenge_matchmaking.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from .models import Arena, Battle, WarriorArena
from .rating import compute_omega_matrix
from .rating_models import normalize_playstyle_len


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -50,6 +51,7 @@ def schedule_losing_battle(warrior_arena):


def get_strongest_opponents(warrior_arena):
normalize_playstyle_len(warrior_arena.rating_playstyle)
assert len(warrior_arena.rating_playstyle) == 2
omega = compute_omega_matrix(k=1) # it should be 2x2 matrix
our_playstyle = numpy.array(warrior_arena.rating_playstyle)
Expand Down

0 comments on commit 126abf2

Please sign in to comment.