So, with all the hype around the Seattle Kraken I decided to create the Seattle Kraken in NHL 20 and use a genetic algorithm to determine the best team (according to NHL 20).
Requirements
- Players only >= 80 overall
- Team must be salary cap compliant, that is, both below the cap and above the floor
- Line chemistry is ignored
- Player age is weighted so that younger players receive bonuses for every year they are under 35. If they are 35 or over they receive no bonuses.
- weight = (35 – age) / 500
- Player value = Overall * (1 + weight)
- 80 overall player at 20 years old gets the value of 82.4
- Fitness is based on how close to the cap without being over we can go with the highest overall rating
- Only 100 generations
So the list of available players for the GA are as listed below:
Team | Player | Position | Rating | Age | Salary | Adj. Rating |
---|---|---|---|---|---|---|
ANA | A.Henrique | C | 84 | 29 | 5.825 | 85.008 |
ANA | O.Kase | RW | 82 | 23 | 2.6 | 83.968 |
ANA | D.Shore | C | 80 | 24 | 2.3 | 81.76 |
ANA | R.Miller | G | 81 | 38 | 1.125 | 81 |
ARI | A.Goligoski | D | 82 | 33 | 5.475 | 82.328 |
ARI | J.Demers | D | 82 | 31 | 3.94 | 82.656 |
ARI | D.Kuemper | G | 83 | 29 | 1.85 | 83.996 |
ARI | C.Soderberg | C | 81 | 33 | 4.75 | 81.324 |
ARI | M.Grabner | LW | 81 | 31 | 3.35 | 81.648 |
ARI | V.Hinostroza | RW | 80 | 25 | 1.5 | 81.6 |
BOS | J.Halak | G | 83 | 34 | 2.75 | 83.166 |
BOS | T.Krug | D | 86 | 28 | 5.25 | 87.204 |
BOS | C.Coyle | C | 83 | 27 | 3.2 | 84.328 |
BOS | J.Moore | D | 80 | 28 | 2.75 | 81.12 |
BOS | K.Miller | D | 80 | 31 | 2.5 | 80.64 |
BUF | K.Okposo | RW | 81 | 31 | 6 | 81.648 |
BUF | J.McCabe | D | 81 | 25 | 2.85 | 82.62 |
BUF | C.Sheary | LW | 81 | 27 | 3 | 82.296 |
BUF | Z.Bogosian | D | 80 | 28 | 5.145 | 81.12 |
BUF | M.Scandella | D | 80 | 29 | 4 | 80.96 |
BUF | J.Vesey | LW | 80 | 26 | 2.275 | 81.44 |
BUF | C.Hutton | G | 81 | 33 | 2.75 | 81.324 |
CGY | C.Talbot | G | 81 | 31 | 2.75 | 81.648 |
CGY | M.Giordano | D | 89 | 35 | 6.75 | 89 |
CGY | M.Backlund | C | 84 | 30 | 5.35 | 84.84 |
CGY | T.Brodie | D | 84 | 29 | 4.65 | 85.008 |
CGY | T.Hamonic | D | 83 | 28 | 3.86 | 84.162 |
CGY | M.Frolik | RW | 82 | 31 | 4.3 | 82.656 |
CAR | J.Faulk | D | 84 | 27 | 4.835 | 85.344 |
CAR | J.Williams | RW | 82 | 37 | 4.5 | 82 |
CAR | E.Haula | C | 82 | 28 | 2.75 | 83.148 |
CAR | T.VanRiemsdyk | D | 80 | 27 | 2.3 | 81.28 |
CAR | B.Pesce | D | 80 | 24 | 4.025 | 81.76 |
CHI | E.Gustafsson | D | 84 | 27 | 1.2 | 85.344 |
CHI | A.Shaw | RW | 81 | 27 | 3.9 | 82.296 |
CHI | C.deHaan | D | 81 | 28 | 4.55 | 82.134 |
CHI | Z.Smith | C | 80 | 31 | 3.25 | 80.64 |
CHI | C.Murphy | D | 80 | 26 | 3.85 | 81.44 |
COL | J.Donskoi | LW | 81 | 27 | 3.9 | 82.296 |
COL | I.Cole | D | 81 | 30 | 4.25 | 81.81 |
COL | C.Wilson | LW | 80 | 29 | 2.6 | 80.96 |
COL | M.Calvert | RW | 80 | 29 | 2.85 | 80.96 |
COL | S.Girard | D | 80 | 21 | 5 | 82.24 |
CBJ | N.Foligno | RW | 82 | 31 | 5.5 | 82.656 |
CBJ | D.Savard | D | 82 | 28 | 4.25 | 83.148 |
CBJ | M.Nutivaara | D | 81 | 25 | 2.7 | 82.62 |
CBJ | B.Jenner | LW | 80 | 26 | 3.75 | 81.44 |
CBJ | O.Bjorkstrand | RW | 80 | 24 | 5.85 | 81.76 |
DAL | A.Sekera | D | 82 | 33 | 1.5 | 82.328 |
DAL | R.Faksa | C | 81 | 25 | 2.2 | 82.62 |
DAL | J.Oleksiak | D | 80 | 26 | 2.14 | 81.44 |
DAL | M.Janmark | LW | 80 | 26 | 2.3 | 81.44 |
DET | M.Green | D | 83 | 33 | 5.375 | 83.332 |
DET | F.Nielsen | C | 80 | 35 | 5.25 | 80 |
DET | V.Filppula | C | 80 | 35 | 3 | 80 |
DET | P.Nemeth | D | 80 | 27 | 3.85 | 81.28 |
EDM | A.Larsson | D | 83 | 26 | 4.165 | 84.494 |
EDM | M.Benning | D | 80 | 25 | 1.9 | 81.6 |
FLA | M.Hoffman | LW | 85 | 29 | 5.1 | 86.02 |
FLA | A.Stralman | D | 83 | 32 | 5.41 | 83.498 |
FLA | B.Connoly | RW | 80 | 27 | 3.415 | 81.28 |
LAK | T.Toffoli | RW | 82 | 27 | 4.6 | 83.312 |
LAK | D.Brown | RW | 81 | 34 | 5.875 | 81.162 |
LAK | D.Forbort | D | 80 | 27 | 2.525 | 81.28 |
MIN | E.Staal | C | 85 | 34 | 3.25 | 85.17 |
MIN | J.Spurgeon | D | 84 | 29 | 5.19 | 85.008 |
MTL | P.Byron | LW | 80 | 30 | 3.4 | 80.8 |
NSH | M.Granlund | C | 86 | 27 | 5.75 | 87.376 |
NSH | C.Smith | RW | 82 | 29 | 4.25 | 82.984 |
NJD | S.Vatanen | D | 83 | 28 | 4.875 | 84.162 |
NJD | W.Simmonds | RW | 82 | 30 | 5 | 82.82 |
NJD | T.Zajac | C | 80 | 34 | 5.75 | 80.16 |
NYI | T.Hickey | D | 82 | 30 | 2.5 | 82.82 |
NYI | B.Nelson | RW | 82 | 27 | 6 | 83.312 |
NYI | J.Boychuk | D | 81 | 35 | 6 | 81 |
NYI | A.Ladd | LW | 80 | 33 | 5.5 | 80.32 |
NYI | L.Komarov | C | 80 | 32 | 3 | 80.48 |
NYI | C.Cizikas | C | 80 | 28 | 3.35 | 81.12 |
NYR | C.Kreider | LW | 83 | 28 | 4.625 | 84.162 |
NYR | R.Strome | C | 80 | 25 | 3.1 | 81.6 |
NYR | J.Fast | RW | 80 | 27 | 1.85 | 81.28 |
NYR | V.Namestnikov | LW | 80 | 26 | 4 | 81.44 |
NYR | T.DeAngelo | D | 80 | 23 | 0.865 | 81.92 |
OTT | M.Boedker | RW | 81 | 29 | 4 | 81.972 |
OTT | A.Duclair | RW | 80 | 23 | 1.65 | 81.92 |
PHI | M.Niskanen | D | 83 | 32 | 5.75 | 83.498 |
PHI | J.Braun | D | 80 | 32 | 3.8 | 80.48 |
PIT | P.Hornqvist | RW | 83 | 32 | 5.3 | 83.498 |
PIT | J.Schultz | D | 83 | 28 | 5.5 | 84.162 |
PIT | B.Rust | C | 80 | 27 | 3.5 | 81.28 |
SJS | B.Dillon | D | 82 | 28 | 3.27 | 83.148 |
STL | A.Pietrangelo | D | 89 | 29 | 6.5 | 90.068 |
STL | B.Schenn | C | 86 | 27 | 5.125 | 87.376 |
STL | D.Perron | LW | 84 | 31 | 4 | 84.672 |
STL | T.Bozak | C | 82 | 33 | 5 | 82.328 |
STL | V.Dunn | D | 82 | 22 | 0.725 | 84.132 |
STL | J.Bouwmeester | D | 81 | 35 | 3.25 | 81 |
STL | A.Steen | LW | 81 | 35 | 5.75 | 81 |
TBL | R.McDonagh | D | 87 | 30 | 6.75 | 87.87 |
TBL | B.Coburn | D | 81 | 34 | 1.7 | 81.162 |
TBL | C.Cirelli | C | 80 | 21 | 0.73 | 82.24 |
TOR | T.Barrie | D | 86 | 27 | 2.75 | 87.376 |
TOR | J.Muzzin | D | 85 | 30 | 4 | 85.85 |
TOR | K.Kapanen | RW | 82 | 22 | 3.2 | 84.132 |
TOR | Z.Hyman | RW | 81 | 27 | 2.25 | 82.296 |
TOR | J.Spezza | C | 80 | 36 | 0.7 | 80 |
TOR | A.Johnsson | LW | 80 | 24 | 3.4 | 81.76 |
VAN | C.Tanev | D | 83 | 29 | 4.45 | 83.996 |
VAN | T.Pearson | LW | 80 | 26 | 3.75 | 81.44 |
WSH | R.Panik | RW | 81 | 28 | 2.75 | 82.134 |
WSH | N.Jensen | D | 80 | 28 | 2.5 | 81.12 |
WPG | M.Perreault | LW | 80 | 31 | 4.125 | 80.64 |
CAR | J.Reimer | G | 81 | 31 | 3.43 | 81.648 |
CHI | R.Lehner | G | 86 | 27 | 5 | 87.376 |
DAL | A.Khudobin | G | 83 | 33 | 2.5 | 83.332 |
DET | J.Howard | G | 84 | 35 | 4 | 84 |
DET | J.Bernier | G | 81 | 30 | 3 | 81.81 |
EDM | M.Smith | G | 82 | 37 | 2 | 82 |
LAK | J.Cambell | G | 80 | 27 | 0.7 | 81.28 |
MIN | A.Stalock | G | 80 | 31 | 0.785 | 80.64 |
MTL | K.Kinkaid | G | 82 | 29 | 1.75 | 82.984 |
NSH | J.Saros | G | 81 | 24 | 1.5 | 82.782 |
NJD | C.Schneider | G | 82 | 33 | 6 | 82.328 |
NYI | T.Greiss | G | 83 | 33 | 3.335 | 83.332 |
NYR | A.Georgiev | G | 81 | 23 | 0.795 | 82.944 |
OTT | C.Anderson | G | 83 | 38 | 4.75 | 83 |
PIT | C.DeSmith | G | 81 | 27 | 1.25 | 82.296 |
SJS | A.Dell | G | 81 | 30 | 1.9 | 81.81 |
STL | J.Allen | G | 81 | 28 | 4.35 | 82.134 |
TBL | M.Condon | G | 80 | 29 | 2.4 | 80.96 |
TOR | M.Neuvirth | G | 80 | 31 | 0.7 | 80.64 |
TOR | M.Hutchinson | G | 80 | 29 | 0.7 | 80.96 |
VAN | J.Markstrom | G | 85 | 29 | 3.365 | 86.02 |
WPG | L.Brossoit | G | 81 | 26 | 1.225 | 82.458 |
WPG | E.Comrie | G | 80 | 23 | 0.7 | 81.92 |
Mutation
I attempted several different mutations using the top two rated individuals in each generation. Swapping players from the same team in the DNA string, swapping multiple players from the same team in the DNA string and finally choosing a new random player for one specific team and multiple teams.
One Player Swap Mutation
Team | Position | Player | Rating | Age | Salary | Adj. Rating |
---|---|---|---|---|---|---|
ANA | C | D.Shore | 80 | 24 | 2.3 | 81.76 |
ARI | LW | M.Grabner | 81 | 31 | 3.35 | 81.648 |
BOS | C | C.Coyle | 83 | 27 | 3.2 | 84.328 |
BUF | G | C.Hutton | 81 | 33 | 2.75 | 81.324 |
CAR | D | T.VanRiemsdyk | 80 | 27 | 2.3 | 81.28 |
CBJ | LW | B.Jenner | 80 | 26 | 3.75 | 81.44 |
CGY | D | T.Hamonic | 83 | 28 | 3.86 | 84.162 |
CHI | D | E.Gustafsson | 84 | 27 | 1.2 | 85.344 |
COL | D | S.Girard | 80 | 21 | 0.7 | 82.24 |
DAL | LW | M.Janmark | 80 | 26 | 2.3 | 81.44 |
DET | G | J.Bernier | 81 | 30 | 3 | 81.81 |
EDM | G | M.Smith | 82 | 37 | 2 | 82 |
FLA | LW | M.Hoffman | 85 | 29 | 5.1 | 86.02 |
LAK | G | J.Cambell | 80 | 27 | 0.7 | 81.28 |
MIN | G | A.Stalock | 80 | 31 | 0.785 | 80.64 |
MTL | G | K.Kinkaid | 82 | 29 | 1.75 | 82.984 |
NJD | D | S.Vatanen | 83 | 28 | 4.875 | 84.162 |
NSH | RW | C.Smith | 82 | 29 | 4.25 | 82.984 |
NYI | D | T.Hickey | 82 | 30 | 2.5 | 82.82 |
NYR | D | T.DeAngelo | 80 | 23 | 0.865 | 81.92 |
OTT | RW | A.Duclair | 80 | 23 | 1.65 | 81.92 |
PHI | D | M.Niskanen | 83 | 32 | 5.75 | 83.498 |
PIT | G | C.DeSmith | 81 | 27 | 1.25 | 82.296 |
SJS | D | B.Dillon | 82 | 28 | 3.27 | 83.148 |
STL | LW | D.Perron | 84 | 31 | 4 | 84.672 |
TBL | C | C.Cirelli | 80 | 21 | 0.73 | 82.24 |
TOR | G | M.Hutchinson | 80 | 29 | 0.7 | 80.96 |
VAN | LW | T.Pearson | 80 | 26 | 3.75 | 81.44 |
WPG | LW | M.Perreault | 80 | 31 | 4.125 | 80.64 |
WSH | RW | R.Panik | 81 | 28 | 2.75 | 82.134 |
Salary | 79.51 | |||||
Overall | 82.484 |
Two Player Swap Mutation
Team | Position | Player | Rating | Age | Salary | Adj. Rating |
---|---|---|---|---|---|---|
ANA | RW | O.Kase | 82 | 23 | 2.6 | 83.968 |
ARI | LW | M.Grabner | 81 | 31 | 3.35 | 81.648 |
BOS | D | J.Moore | 80 | 28 | 2.75 | 81.12 |
BUF | D | Z.Bogosian | 80 | 28 | 5.145 | 81.12 |
CAR | C | E.Haula | 82 | 28 | 2.75 | 83.148 |
CBJ | D | D.Savard | 82 | 28 | 4.25 | 83.148 |
CGY | RW | M.Frolik | 82 | 31 | 4.3 | 82.656 |
CHI | D | E.Gustafsson | 84 | 27 | 1.2 | 85.344 |
COL | D | S.Girard | 80 | 21 | 0.7 | 82.24 |
DAL | D | A.Sekera | 82 | 33 | 1.5 | 82.328 |
DET | C | V.Filppula | 80 | 35 | 3 | 80 |
EDM | D | M.Benning | 80 | 25 | 1.9 | 81.6 |
FLA | RW | B.Connoly | 80 | 27 | 3.415 | 81.28 |
LAK | D | D.Forbort | 80 | 27 | 2.525 | 81.28 |
MIN | C | E.Staal | 85 | 34 | 3.25 | 85.17 |
MTL | G | K.Kinkaid | 82 | 29 | 1.75 | 82.984 |
NJD | RW | W.Simmonds | 82 | 30 | 5 | 82.82 |
NSH | G | J.Saros | 81 | 24 | 1.5 | 82.782 |
NYI | G | T.Greiss | 83 | 33 | 3.335 | 83.332 |
NYR | D | T.DeAngelo | 80 | 23 | 0.865 | 81.92 |
OTT | RW | A.Duclair | 80 | 23 | 1.65 | 81.92 |
PHI | D | J.Braun | 80 | 32 | 3.8 | 80.48 |
PIT | G | C.DeSmith | 81 | 27 | 1.25 | 82.296 |
SJS | D | B.Dillon | 82 | 28 | 3.27 | 83.148 |
STL | G | J.Allen | 81 | 28 | 4.35 | 82.134 |
TBL | C | C.Cirelli | 80 | 21 | 0.73 | 82.24 |
TOR | C | J.Spezza | 80 | 36 | 0.7 | 80 |
VAN | G | J.Markstrom | 85 | 29 | 3.365 | 86.02 |
WPG | LW | M.Perreault | 80 | 31 | 4.125 | 80.64 |
WSH | D | N.Jensen | 80 | 28 | 2.5 | 81.12 |
Salary | 80.825 | |||||
Overall | 82.33 |
Random Player Mutation (from same team)
Team | Position | Player | Rating | Age | Salary | Adj. Rating |
---|---|---|---|---|---|---|
ANA | RW | O.Kase | 82 | 23 | 2.6 | 83.968 |
ARI | G | D.Kuemper | 83 | 29 | 1.85 | 83.996 |
BOS | C | C.Coyle | 83 | 27 | 3.2 | 84.328 |
BUF | D | J.McCabe | 81 | 25 | 2.85 | 82.62 |
CAR | C | E.Haula | 82 | 28 | 2.75 | 83.148 |
CBJ | D | D.Savard | 82 | 28 | 4.25 | 83.148 |
CGY | C | M.Backlund | 84 | 30 | 5.35 | 84.84 |
CHI | RW | A.Shaw | 81 | 27 | 3.9 | 82.296 |
COL | LW | J.Donskoi | 81 | 27 | 3.9 | 82.296 |
DAL | C | R.Faksa | 81 | 25 | 2.2 | 82.62 |
DET | D | P.Nemeth | 80 | 27 | 3.85 | 81.28 |
EDM | D | M.Benning | 80 | 25 | 1.9 | 81.6 |
FLA | LW | M.Hoffman | 85 | 29 | 5.1 | 86.02 |
LAK | G | J.Cambell | 80 | 27 | 0.7 | 81.28 |
MIN | G | A.Stalock | 80 | 31 | 0.785 | 80.64 |
MTL | LW | P.Byron | 80 | 30 | 3.4 | 80.8 |
NJD | RW | W.Simmonds | 82 | 30 | 5 | 82.82 |
NSH | G | J.Saros | 81 | 24 | 1.5 | 82.782 |
NYI | D | T.Hickey | 82 | 30 | 2.5 | 82.82 |
NYR | D | T.DeAngelo | 80 | 23 | 0.865 | 81.92 |
OTT | RW | A.Duclair | 80 | 23 | 1.65 | 81.92 |
PHI | D | J.Braun | 80 | 32 | 3.8 | 80.48 |
PIT | G | C.DeSmith | 81 | 27 | 1.25 | 82.296 |
SJS | D | B.Dillon | 82 | 28 | 3.27 | 83.148 |
STL | D | V.Dunn | 82 | 22 | 0.725 | 84.132 |
TBL | C | C.Cirelli | 80 | 21 | 0.73 | 82.24 |
TOR | D | T.Barrie | 86 | 27 | 2.75 | 87.376 |
VAN | D | C.Tanev | 83 | 29 | 4.45 | 83.996 |
WPG | G | L.Brossoit | 81 | 26 | 1.225 | 82.458 |
WSH | RW | R.Panik | 81 | 28 | 2.75 | 82.134 |
Salary | 81.05 | |||||
Overall | 82.847 |
Two Player Random Swap
Team | Position | Player | Rating | Age | Salary | Adj. Rating |
---|---|---|---|---|---|---|
ANA | RW | O.Kase | 82 | 23 | 2.6 | 83.968 |
ARI | RW | V.Hinostroza | 80 | 25 | 1.5 | 81.6 |
BOS | C | C.Coyle | 83 | 27 | 3.2 | 84.328 |
BUF | LW | C.Sheary | 81 | 27 | 3 | 82.296 |
CAR | C | E.Haula | 82 | 28 | 2.75 | 83.148 |
CBJ | LW | B.Jenner | 80 | 26 | 3.75 | 81.44 |
CGY | D | T.Brodie | 84 | 29 | 4.65 | 85.008 |
CHI | D | E.Gustafsson | 84 | 27 | 1.2 | 85.344 |
COL | D | S.Girard | 80 | 21 | 0.7 | 82.24 |
DAL | LW | M.Janmark | 80 | 26 | 2.3 | 81.44 |
DET | G | J.Howard | 84 | 35 | 4 | 84 |
EDM | D | M.Benning | 80 | 25 | 1.9 | 81.6 |
FLA | LW | M.Hoffman | 85 | 29 | 5.1 | 86.02 |
LAK | G | J.Cambell | 80 | 27 | 0.7 | 81.28 |
MIN | C | E.Staal | 85 | 34 | 3.25 | 85.17 |
MTL | G | K.Kinkaid | 82 | 29 | 1.75 | 82.984 |
NJD | D | S.Vatanen | 83 | 28 | 4.875 | 84.162 |
NSH | RW | C.Smith | 82 | 29 | 4.25 | 82.984 |
NYI | D | T.Hickey | 82 | 30 | 2.5 | 82.82 |
NYR | G | A.Georgiev | 81 | 23 | 0.795 | 82.944 |
OTT | RW | A.Duclair | 80 | 23 | 1.65 | 81.92 |
PHI | D | J.Braun | 80 | 32 | 3.8 | 80.48 |
PIT | C | B.Rust | 80 | 27 | 3.5 | 81.28 |
SJS | D | B.Dillon | 82 | 28 | 3.27 | 83.148 |
STL | LW | D.Perron | 84 | 31 | 4 | 84.672 |
TBL | C | C.Cirelli | 80 | 21 | 0.73 | 82.24 |
TOR | D | T.Barrie | 86 | 27 | 2.75 | 87.376 |
VAN | G | J.Markstrom | 85 | 29 | 3.365 | 86.02 |
WPG | G | E.Comrie | 80 | 23 | 0.7 | 81.92 |
WSH | RW | R.Panik | 81 | 28 | 2.75 | 82.134 |
Salary | 81.285 | |||||
Overall | 83.199 |
Results
Using the two player random swap generated the best lineup with a salary cap of $81.285M and an overall team rating of 83.199.
Note that if you use any of these rosters the salary might be slightly off due to expiring contracts.