Monday, August 23, 2010

Listerine Pre Brush And After

Hattrick - Digging in HO!







In questo articolo cerco di fare un po' di luce su come HO! pervenga alle sue stime delle valutazioni di campo. Tutti i files che vedete elencati qui li avete anche nel vostro pc se avete HO! installato, li trovate nella cartella "prediction" di HO!

* defaults.xml, readme.txt, si trovano nella cartelletta "prediction", tralascio epvWeights.mlp , un elenco di pesi per reti neurali a quanto ho capito, predictionTypes.conf che è un semplice elenco delle sottocartelle con i tipi di prediction e skeleton.dat che mi pare che non faccia altro che settare i valori di default per tutto quanto

* nelle sottocartelle ci sono playerstrength.dat , che definisce la forza del giocatore, tactics.dat , che stima l'efficacia delle tattiche e le prediction per le diverse zone di campo: midfield.dat, centraldefense.dat, sidedefense.dat, centralattack.dat, sideattack.dat


Procedo con ordine cominciando dal primo gruppo





1 defaults.xml

It does nothing but define unspecified "FormulaFactors" which leaves me a bit 'confused.



Puzzled because - as you see - do not explain the absence of values \u200b\u200bin the two rectangles that I highlighted.




2

readme.txt This file explains a bit 'all the logic, let's see.


"The rating parameters are split into Several files For Each one prediction type (midfield, central attack, defense side ...). They Contain at least
  • one [ general ] section and
  • one [SKILLNAME] or [SKILLNAME_SIDENAME] section.
  • SKILLNAME is one of {goalkeeping, defending, playmaking, passing, scoring, winger}.
  • SIDENAME is one of {allsides, thisside, middle, otherside} If the SIDENAME is omitted, we take ALLSIDES as default. The SIDENAME is especially usefully for side attack and side defense. In this context, we have to calculate two different ratings for the left side and the right side. A player on the left side has - of course - a higher rating impact for the left attack/defense side Than for the right side If we calculate the right side, right side and Otherside THISSIDE means-means-left side. "


Then in the files of the areas of the field will find a section on" general "and a weight training in relation to skill and area of \u200b\u200bfield.

"The players are classified in the Following Manner:
  • ALLSIDES: ___All Players
  • MIDDLE: ____Keeper, Extra Players, Single CD, Single IM Single FW (if not TowardsWing)
  • THISSIDE: ___CD, IM, FW on this side, if not the only one on this position (ie there are 2 in mezzo). Wingback and Winger on this side
  • OTHERSIDE: _Like THISSIDE, for the opposite side"

Questo consente di distinguere i diversi apporti dei giocatori, ad esempio, riprendendo dei grafici già postati in un altro articolo: questo giocatore relativamente agli apporti laterali si torverà in posizione "MIDDLE" e dividerà il suo apporto al 50% in entrambi i lati



Quest'altro invece si trova in posizione THISSIDE per la difesa laterale sinistra, a cui dà il 100% del suo apporto, non viene citato invece nella difesa destra (sarebbe il giocatore "OTHERSIDE"), per cui ad essa non dà alcun apporto



L'unico OTHERSIDE che troveremo citato sarà l'attaccante TW, che contribuisce all'attacco laterale opposto con la sola skill attacco, con valori circa il 40% di quelli dell'attacco laterale a cui è adiacente.




Poi

"How will the ratings be calculated?
  1. First, HO! parses the parameter file and searches for all [SKILLNAME] and [SKILLNAME_SIDENAME] sections.
  2. After that, HO! calculates the player strength for all players on the SIDENAME's side, based on the player's skill, form, stamina and xp using the parameters from the file playerstrength.dat.
  3. The PlayerStrength is multiplied with the PlayerWeight from the current section in the parameter file.
  4. For all players, PlayerStrength*PlayerWeight is added up.
  5. If there are general options (see below) in this section, they will be applied now.
We do this for every section and sum all these partial ratings together.
Eventually, the general options from the [general] section are applied."


L'ordine mi sembra piuttosto chiaro:
  1. Si cercano le skill e le posizioni rilevanti
  2. Si calcola la FORZA del giocatore, multiplying the skill for the parameters of FORM, STRENGTH and EXPERIENCE
  3. The UNDER is multiplied by the weights (coefficients) of that zone field
  4. summed products "Force * weights" of each player
  5. apply corrections

file is then introduced playerstrength.dat defining a range of functions

"In this file, the options are ALWAYS processed in The following order:
Option___________________Function

skillSubDeltaForLevelY x____if = (skill AND subskill = Y = 0) then x + skill = skill
(This is used for unknown subskills, ie the player did not get training yet and the user did not enter a subskill offset manually)


skillDelta=x________________skill = skill + x
staminaDelta=x_____________stamina = stamina + x
formDelta=x_______________...
xpDelta=x ________________ ...

staminaMin=x______________if stamina < stamina =" x" formmin="x" xpmin="x" skillmin="x" staminamax="x_____________"> x then stamina = x
formMax=x________________...
xpMax=x
skillMax=x

staminaMultiplier=x__________stamina = stamina * x
formMultiplier=x____________...
xpMultiplier=x
skillMultiplier=x

staminaPower=x_____________stamina = stamina^x (i.e. stamina raised by x)
formPower=x_______________... (Use 0.5 as x for square root)
xpPower=x
skillPower=x

staminaLog=x_______________stamina = log_x(stamina) (i.e. log of stamina with base x)
formLog=x_________________ ... (Use 10 as x for base-10-log)
xpLog=x
skillLog=x

finalStaminaMultiplier=x______stamina = stamina * x
finalFormMultiplier=x
finalXpMultiplier=x
finalSkillMultiplier=x

finalStaminaDelta=x__________stamina = stamina + x
finalFormDelta=x
finalXpDelta=x
finalSkillDelta=x

Now we can calculate the result using these options:
We start with result=skill

resultMultiStamina=x_________result = result * x * stamina
resultMultiForm = x___________ ...
resultMultiXp = x

resultAddStamina x__________result = result + = x * x = stamina
resultAddForm
resultAddXp = x "



it then goes on to introduce the" rating files "specific to each area of \u200b\u200bthe field, even here by defining the possible functions

"General options (useable in Every section, Including [general] and [SKILL]):
They Will Be Applied in The following order:

Option_________________Function

  • squareMod __rating = x = x * + rating rating rating * ________# dirty hack! Should be 0, if possible
  • cubeMod =x____rating = rating + x*rating*rating*rating __# even dirtier hack! Should be 0, if possible"

Tattiche:
  • tacticAIM=x______if Tactic=AIM then ___rating = rating * tacticAIM
  • tacticAOW=x_____if Tactic=AOW then ___rating = rating * tacticAOW
  • tacticCounter=x ...
  • tacticCreative=x
  • tacticPressing=x

Team Spirit
  • TSPreMulti=x ____rating = rating * (yourTS*TSPreMulti)^TSPower # new exponential calc
  • TSPower=x

Casa/Fuori
  • home=x _________if game is home game then ____rating = rating * home
  • away=x _________same for away
  • awayDerby=x ____same for away derby (since HO! 1.401)

PIC/MOTS
  • pic=x __________if you play PIC then ___________rating = rating * pic
  • mots=x ________same for MOTS
  • normal=x ______same for normal

COACH
  • trainerOff = x_____ if your trainer is offensive then ___rating = rating * trainerOff
  • trainerDef = x _____same for defensive trainer
  • trainerNeutral = x __same trainer for neutral
Correction
  • _____rating multiplier = x = x * rating
  • _________rating delta = x = x + rating
  • extraMulti = x _____multiplier for extra players (extraIM, extraCD, extraFW)
the last hour are set to 1 since there is no più penalità per i giocatori posti come "extra" in zone centrali.

Infine vengono definite le posizioni a cui applicare i Pesi (Coefficienti):

Player Weights (useable in all [SKILL] sections):

Option Function
allCDs=x ___This weight modifier will be multiplied with every CentralDef
allWBs=x ___This weight modifier will be multiplied with every Wingback
allIMs=x
___ This weight modifier will be multiplied with every InnerMid
allWIs=x
___ This weight modifier will be multiplied with every Winger
allFWs=x
___ This weight modifier will be multiplied with every Forward

keeper=_____x keeper

cd_norm=x
__ central defender normal
cd_off=x ____central defender offensive
cd_tw=x ____central defender to wing

wb_norm=x _wingback normal
wb_off=x ___wingback offensive
wb_def=x ___wingback defensive
wb_tm=x ___wingback to middle

im_norm=x _inner midfield norm
im_off=x___ inner midfield offensive
im_def=x___ inner midfield defensive
im_tw=x___ inner midfield to wing

wi_norm=x _winger normal
wi_off=x ___winger offensive
wi_def=x ___winger defensive
wi_tm=x ___winger to middle

fw_norm=x _forward normal
fw_def=x ___forward defensive
fw_tw=x ___forward to wing

extra_cd=x _extra central defender
extra_im=x _extra inner midfield
extra_fw=x _extra forward


e precisato che

Every position can have a .SPECIALTY appended, e.g. "fw_def.technical".
If so, the weight is applied to players with this specialty only
.

infine viene presentato un piccolo esempio

Example 1 (Midfield)
====================
Let's say, we want to predict the midfield parameters.
We have a midfield.dat with the following text:

[general]
multiplier=0.2
delta=0.8
squareMod=0.05
...

[playmaking]
allIMs=0.5 # Multiplier for ALL IMs
im_normal=1
im_off=0.9
extra_im=0.85
...

Therefore the PlayerStrength of all normal IMs is multiplied with 0.5 * 1 = 0.5,
the PlayerStrength of all offensive IMs is multiplied with 0.5 * 0.9 = 0.45 and so on.
After that, everything is added up to the PlaymakingSum.

In the end, the parameters from the [general] section are applied to this PlaymakingSum.
I.e.
PlaymakingSum = PlaymakingSum + squareMod*PlaymakingSum^2
PlaymakingSum = PlaymakingSum * multiplier
PlaymakingSum = PlaymakingSum + delta




I files nelle sottocartelle: i due "generici"
1 playerstrenght.dat


Allora, dopo tante presentazioni qui si comincia a fare sul serio. Il succo di questo file è questo:
riguardo alla SKILL

skillDelta=-1.0
skillMin=0
# SkillSubDeltas:
# Default is to add 0.5 subskill for skills 0 (non existant) up to 7 (solid)
# Uncomment the next line to ignore the skillSubDeltas
#[ignore]
skillSubDeltaForLevel0=0.5
skillSubDeltaForLevel1
skillSubDeltaForLevel2 = 0.5 = 0.5 = 0.5
skillSubDeltaForLevel3
skillSubDeltaForLevel4 = 0.5
skillSubDeltaForLevel5
skillSubDeltaForLevel6 = 0.5 = 0.5 = 0.5
skillSubDeltaForLevel7


Skills are reduced all of "1", to ensure that they are not below 0, you add 0.5 to the levels from 0 (nonexistent) to 7 (good). This addition is based on the principle that those skills are not likely to have been trained and then places unknown to Flattermann it seemed wise to ask everyone in the middle and add a standard 0.5
I'm not really agree with this procedure, because if it is true that I can accept a 2.5 and a 3.5 instead of 2 and 3, 6 and especially 7 skill may have been trained and then I well it seems necessary to add 0.5 to 7.5 7-Port (among other things, it is precisely for this reason that if an excellent player weighs only 0.5 HO in more than one good, because they end up just a bonus standard 7). I think it would be more 'prudent soften the curve and add a 0.3/0.4 and 0.2/0.3 to 6 to 7.

There are also a number of operations on strength, forms and experiences that are reduced to the following formulas:

stamina-Factor # =____(( stamina +6.5) / 14) ^ 0.6
# =______(( form-form-factor 0.5) / 7) ^ 00:45
=________ Factor # xp-1 + 7.16% * SQRT (XP-0.5)


determining this table



to be imposed on the previous value of skill

# result = skill
result = result # * 1 * stamina___ (resultMultiStamina)

# result = result * a * form _____( resultMultiForm)

result = result # * 1 * xp_______ (resultMultiXp)




2 tactics.dat

# Autogenerated with PredictionSimulation for HO by flattermann
# TacticLevelPrediction [chisquare=0.269985, using 7268 samples, 6637 runs]
[general]
version = 4.0
delta = 1.000000 # fixed
extraMulti = 0.850000 # fixed
squareMod = 0.000000 # fixed
cubeMod = 0.000000 # fixed

[aim_aow]
postMulti = 0.194912 # err=0.001890
squareMod = 0.009067 # err=0.001452
cubeMod = -0.000351 # err=0.000020

[counter]
postMulti = 0.235751 # err=0.007073
squareMod = 0.022976 # err=0.002754
cubeMod = -0.000422 # err=0.000021
multiPs = 0.923695 # err=0.035743
multiDe = 0.404393 # err=0.013345

[pressing]
postMulti = 0.062717 # err=0.001658
squareMod = 0.035617 # err=0.008675
cubeMod = -0.001443 # err=0.000171

[longshots]
postMulti = 0.001162 # err=0.000047
squareMod = -0.310785 # err=0.050769
cubeMod = 302.472449 # err=38.520727


Intuisco le formule, ma non mi è chiaro come e dove si applichino. Le posto per completezza.




I files nelle sottocartelle: le valutazioni di zona
Infine i files di rating veri e propri, quelli che siamo andati a modificare per elaborare le prediction nella ricerca della scorsa stagione, i valori dei pesi cambiano, per fare l'esempio ho scelto il 442 con 2 difensori centrali e due centrocampisti


1 midfield.dat

then

[general]
multiplier = 0.250000 # fixed
delta = 1.000000 # fixed


that eventually we will have to divide everything by 4 and add 1

tacticCounter = 0.930000 # fixed

loss of 7% with counter

home = # err = 1.199529 0.004183 1.113699
awayDerby = # err = 0.007379


+20% if be played at home, +11.3% if you play a derby away

pic = # err = 0.839949 0.003179 1.109650
mots = # err = 0.004748


-16% with the PIC and almost +11% with MOTS

teamspiritPreMulti = # err = 0.147832 0.003676
teamspiritPower = # err = 0.417779 0.005549


am stumped on this ... applying the values \u200b\u200bhere the accounts I do not come back ...

extraMulti = 1000 # fixed

here before was 0.85, a loss of 15% for the DC added

squareMod = # err = 0.008504 0.001206
cubeMod = -0.000027 # err = 0.000005


modifiers are "crafty" seen above, the rating of the DC must add
+ rating 0.008504 * * rating rating - 0.000027 rating * * * rating rating

tacticLongshots = # err = 0.950323 0.008919

loss of 5% of cc with tactical shots from afar


Finally here Weights for the various roles in directing

[playmaking_allsides]
CD_norm = 0.11328
CD_off = 0.15264
CD_tw = 0.07920
WB_norm = 0.07800
WB_off = 0.10800
WB_def = 0.03100
WB_tm = 0.07800
IM_norm = 0.43056
IM_off = 0.40664
IM_def = 0.40664
IM_tw = 0.37996
WI_norm = 0.21800
WI_off = 0.18300
WI_def = 0.18300
WI_tm = 0.27600
FW_def = 0.18330





2 centraldefense.dat

[general]
multiplier = 0.250000 # fixed
delta = 1.000000 #


fixed as before at the end I will have to divide by 4 and add 1

trainerOff = # err = 0.928162 0.003268 1.196307
trainerDef = # err = 0.004050 = 1.050000 #
trainerNeutral fixed


-7.2% with the offensive coach, defensive with +19.6%, +5% with normal

tacticAOW = # err = 0.858029 0.004653
tacticCreative = 0.930999 # err=0.005163


AOW fa perdere il 14.2%, LI il 7%

extraMulti = 1.000 # fixed

anche questo è un residuo del passato

squareMod = 0.008462 # err=0.000976
cubeMod = -0.000017 # err=0.000003


quindi rating + 0.008462 *rating*rating -0.000017 *rating*rating *rating

pullback = 0.25

believe that it means a 25% gain with the folding and not 20% as assumed by GM-Homerjay


Finally, here are the weights in defense and parades for the various roles

[goalkeeping_allsides]
keeper = 0.55750

[defending_allsides]
keeper
CD_norm = 0.26500 = 0.60192 0.42048
CD_tw
CD_off = = = 0.28000 0.44976
WB_norm
WB_off
WB_def = 0.23850 = 0.29850 0.42600
IM_norm
WB_tm = = = 0.12374 0.21804
IM_off
IM_def = 0.35788 = 0.19964
IM_tw
WI_norm
WI_off = 0.12550 =
WI_def = 0.05400 0.16750 = 0.16000
WI_tm




3 sidedefense.dat


[general]
multiplier = 0.250000 # fixed
delta = 1.000000 # fixed

as before the end I will have to divide by 4 and add 1

trainerOff = # err = 0.927577 0.002694
trainerDef = # err = 1.197332 0.003328 1.050000
trainerNeutral = # fixed

as Defence Central -7.2% with the coach offensive, defensive with +19.6%, +5% with normal

tacticCreative = # err = 0.930663 0.004241 0.853911
tacticAIM = # err = 0.003586

AIM lose 14.6% (a little ' more 'than AOW was losing the central defense), LI 7%

extraMulti = 1000 # fixed

the usual thing of the past

squareMod = # err = 0.011591 0.000943
cubeMod = -0.000029 # err = 0.000003

then + rating 0.011591 * * rating rating -0.000029 rating * * * rating rating

pullback = 0.25



Finally here are the weights in defense and parades for the various roles

[goalkeeping_allsides]
keeper = 0.61700

[defending_allsides]
keeper = 0.27650

[defending_thisside]
CD_norm = 0.49824
CD_off = 0.37680
CD_tw = 0.73200
WB_norm = 0.92250
WB_off = 0.65800
WB_def = 0.98000
WB_tm = 0.70600
IM_norm = 0.17388
IM_off = 0.09660
IM_def = 0.24932
IM_tw = 0.22954
WI_norm = 0.35000
WI_off = 0.18500
WI_def = 0.49800
WI_tm = 0.31250

[defending_middle]
CD_norm = 0.24960
CD_off = 0.18225
IM_norm = 0.08708
IM_off = 0.02563
IM_def = 0.12472




4 centralattack.dat

[general]
multiplier = 0.250000 # fixed
delta = 1.000000 # fixed

al solito, alla fine dovrò dividere per 4 e sommare 1

trainerOff = 1.135257 # err=0.004339
trainerDef = 0.927930 # err=0.005792
trainerNeutral = 1.050000 # fixed

+13.5% with the offensive coach, defensive with -7.2%, +5% with normal

confidence = 0.0525 # Educated guess by GM-Mjoelnir: - )

value of trust

extraMulti = 1000 # fixed

the usual thing of the past

squareMod = # err = 0.011339 0.001363 -0.000029
cubeMod = # err = 0.000005

then Rating + 0.011399 * * rating rating -0.000029 rating * * * rating rating

tacticLongshots = # err = 0.970577 0.008211

loss of 3% with the tactic of shooting from a distance

pullback = -0.25


which is the opposite of the value of defense


Finally, here are the weights in attack and steps to the various roles

[scoring_allsides]
FW_norm = 0.56306
FW_def = 0.34310
FW_tw = 0.34310

[passing_allsides]
IM_norm = 0.17756
IM_off = 0.26404
IM_def = 0.11960
IM_tw = 0.12650
WI_norm = 0.06100
WI_off = 0.08000
WI_def = 0.03100
WI_tm = 0.08800
FW_norm = 0.20774
FW_def = 0.32195
FW_def.technical = 0.32195
FW_tw = 0.14664





5 sideattack.dat

[general]
multiplier = 0.250000 # fixed

delta = 1.000000 # fixed

al solito, alla fine dovrò dividere per 4 e sommare 1

trainerOff = 1.133359 # err=0.003514
trainerDef = 0.921278 # err=0.004323
trainerNeutral = 1.050000 # fixed

+13.3% con l'allenatore offensivo, -7.9% col difensivo, +5% col normale

confidence = 0.0525 # Educated guess by GM-Mjoelnir :-)

valore della fiducia

extraMulti = 1.000 # fixed

the usual residual

squareMod = # err = 0.012093 0.001183 -0.000027
cubeMod = # err = 0.000005

then + rating 0.012093 * * rating rating -0.000027 rating * * * rating rating

tacticLongshots = # err = 0.972980 0.006620

loss of 2.7% of the shots with the tactics far

pullback = -0.25


e infine

[passing_middle]
IM_norm = 0.08714
IM_off = 0.09067
IM_def = 0.05602

[passing_allsides]
FW_norm = 0.10011
FW_def = 0.18612
FW_def.technical = 0.27495

[winger_allsides]
FW_norm = 0.15181
FW_def = 0.10340

[passing_thisside]
IM_norm = 0.17434
IM_off = 0.18538
IM_def = 0.11224
IM_tw = 0.21712
WI_norm = 0.18200
WI_off = 0.20900
WI_def = 0.15000
WI_tm = 0.13500
FW_tw = 0.14805

[winger_thisside]
CD_tw
WB_norm = 0.21360 = 0.43450 0.55000
WB_def
WB_off = = = 0.24150 0.27500
WB_tm
IM_tw
WI_norm = 0.39468 = 0.73900 0.83250
WI_def
WI_off = = = 0.54000 0.62250
WI_tm
FW_tw = 0.33887

[scoring_allsides]
FW_norm = 0.18424 = 0.09400
FW_def

[scoring_otherside]
FW_tw = 0.12757

[scoring_thisside]
FW_tw = 0.31255


PS. take a look at ' CONTENTS of the blog, there are several items that may be of interest.




Andreace (team in Hattrick ID 1730726)

Creative Commons License
This work is licensed by Andreace under a Creative Commons Attribution-Noncommercial 3.0 Unported License . Ie, this work may be freely copied, distributed or modified without the express permission of the author, provided that the author is clearly stated and the publication is not for commercial purposes.